flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar
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
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
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
Thanks Privalov.
I found it in the source e.g. CDECL.INC Best Wishes, Alan |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.