Re: A92: Re: Quitting ASM or not -- please answer these q


[Prev][Next][Index][Thread]

Re: A92: Re: Quitting ASM or not -- please answer these q




In a message dated 12/6/98 1:24:42 PM Eastern Standard Time,
don.barnes@wmich.edu writes:

> The parameters to these functions aren't put into any registers, they are
>  pushed onto the stack, and, this is very important, THEY ARE PUSHED IN
>  REVERSE ORDER.
>  
>  Here's an example using
>    void tios::DrawStrXY(WORD x,WORD y,BYTE *string,WORD color)
>  
>       move.w #4,-(a7)    ; push fourth parameter, WORD color
>       move.l  mylabel,-(a7)    ; push third parameter, BYTE *string
>       move.w #64,-(a7)    ; push second parameter, WORD y
>       move.w #10,-(a7)    ; push first parameter, WORD x
>       jsr tios::DrawStrXY    ; call rom function
>       lea   10(a7),a7    ; update stack pointer (2+4+2+2 = 10)

okay so whenever the call DOES NOT SHOW the arguments in the .h or .htm files
or whatever, then it means that you use the stack to pass info to them?
wouldn't it be faster to use registers?