Amiga-C (5/223)

From:Sensei
Date:9 Aug 2001 at 01:14:20
Subject:[amiga-c] Re: BOOPSI and Asm

Czesc dave@digital.prestel.co.uk!

Dnia 08-Aug-01, dave@digital.prestel.co.uk napisa�:

> DoMethod(obj,SOME_Method,SOME_Param1,data1,SOME_Param2,data2)
> but i'm unsure how to convert this into asm code
> Dave

DoMethod() is vararg equivalent of DoMethodA(), and DoMethodA() is the same as
CoerceMethodA() with OCLASS() class and it's the same as CallHookPkt() ;), so
you can write:

MOVE.L data2,-(SP)
MOVE.L SOME_Param2,-(SP)
MOVE.L data1,-(SP)
MOVE.L SOME_Param1,-(SP)
PEA #SOME_Mathod or MOVE.L #SOME_Method,-(SP)
MOVE.L SP,A1
MOVE.L obj,A2
MOVE.L -4(A2),A0 ; hook address == dispatcher == OCLASS( obj );
MOVE.L _UtilityBase,A6
JSR _LVOCallHookPkt(A6)
LEA 5*4(SP),SP

or instead of CallHookPkt() (you'll don't need to open utility.library in that
case):

MOVE.L h_Entry(A0),A3
JSR (A3)

or if you don't want to waste another register:

PEA end(PC)
MOVE.L h_Entry(A0),-(SP)
RTS
end:

Regards!



Can your ImageFX paint like bitmap painters?
Download: gfx/ifx/REDFiX.lha, ftp.novadesign.com

Przemyslaw 'SENSEI' Gruchala

code/gfx2d/gfx3d/webmaster

Amiga 1200
Apollo 1240/33 MHz, 18 MB RAM, BTC 33.6 bps
HDD 3.2 GB, HDD 520 MB, CD x12



Chcialbys zarobic lub "dorobic" naprawde dobre pieniadze?
Otrzymasz do 300zl za kazda firme ktora wprowadzisz do Centrum e-biznesu
Poszukaj wsrod znajomych, znajdz firme i wypelnij z nia prosty formularz
Aby rozpoczac wejdz do http://praca.getin.pl i zostan Partnerem Getin

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think!
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/dpFolB/TM
---------------------------------------------------------------------~->

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/