flat assembler
Message board for the users of flat assembler.
Index
> Main > How to write subroutine and call subroutine? |
Author |
|
LocoDelAssembly 15 Feb 2009, 23:14
Have you spelled RET as "ret" (i.e. all lowercase)? It is important because the proc macro defines the ret macro but not RET nor any other combination of lower and upper case.
|
|||
15 Feb 2009, 23:14 |
|
whileloop 15 Feb 2009, 23:24
Oh! I didn't know that ret is macro, while RET is mnemonic.
Problem solved. Thank you very much!! |
|||
15 Feb 2009, 23:24 |
|
LocoDelAssembly 15 Feb 2009, 23:45
It is a macro under the proc context, otherwise it is also a mnemonic of the CPU instruction RET (endp macro purges ret macro). There is no case sensitivity for CPU instructions but macros are case sensitive.
Code: macro endp { purge ret,locals,endl finish@proc purge finish@proc restore regs@proc match all,args@proc \{ restore all \} restore args@proc match all,all@vars \{ restore all \} } |
|||
15 Feb 2009, 23:45 |
|
vid 15 Feb 2009, 23:48
By default, "ret" in any combination of lowcase/upcase case letters is mnemonic too, it is just aliast for "retn". But inside "proc", this instruction is overloaded by "ret" macro. Problem is, macro names in FASM are case sensitive, so only "ret" gets overloaded, and "RET", "Ret", "ReT" etc. all remain just aliases for "retn".
|
|||
15 Feb 2009, 23:48 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.