flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar 14 Mar 2005, 13:37
The CALL instruction stores on the stack the address of the instruction that follows it, and then the RET instruction pops that value from the stack and continues execution from that point - this way calling the subroutines works.
In this case CALL is used differently, since the called routine never return control back, and there are no instructions defined after the CALL, but data (error message). So CALL stores on the stack the address of that data as if it was the next instruction. |
|||
![]() |
|
Alan Illeman 14 Mar 2005, 23:38
Yes of course, for a non-returning call. Neat trick
that I didn't think through. Thanks. While I have your attention <grin> does your macro implentation include a variable number of arguments? - like the 'vararg' in Masm. ..and a similiar 'vararg' for writing e.g. a 'printf' function in asm? Best Wishes. Alan p.s. I was weaned on Tasm and very much like what I see in Fasm so far. |
|||
![]() |
|
Tomasz Grysztar 15 Mar 2005, 04:40
Yes, look in the section 2.3.3 of fasm's manual. My general advice for you is to read through all the materials from Documentation page, also the excellent vid's guide to preprocessor (the part of Tajga Tutorial).
|
|||
![]() |
|
Alan Illeman 16 Mar 2005, 23:19
Thanks Privalov.
I found it in the source e.g. CDECL.INC Best Wishes, Alan |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.