flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > [bug] Error with procedure definition macros in PROC64.INC |
Author |
|
macomics 02 Nov 2024, 14:52
I can't reproduce this with the standard PROC64.INC file from fasmw17332.zip dated 21 Sep 2024 12:13:15 UTC.
Code: ~ $ cat test_proc.asm use64 include 'PROC64.INC' proc proc1 ret endp proc proc2 stdcall fastcall proc1 ret endp ~ $ fasm test_proc.asm test_proc flat assembler version 1.73.30 (16384 kilobytes memory) 1 passes, 0 bytes. |
|||
02 Nov 2024, 14:52 |
|
Bird of Hermes 02 Nov 2024, 18:59
macomics wrote: I can't reproduce this with the standard PROC64.INC file from fasmw17332.zip dated 21 Sep 2024 12:13:15 UTC. Aren't you confused by the fact that the output file contains 0 bytes? Try adding the line a = proc2 to the code. _________________ If something can't be done with macros, then there were too few macros. |
|||
02 Nov 2024, 18:59 |
|
macomics 02 Nov 2024, 19:50
Ok. Well
Code: ~ $ cat test_proc.asm use64 include 'PROC64.INC' proc proc1 ret endp proc proc2 stdcall fastcall proc1 ret endp a = proc2 ~ $ fasm -m 102400 test_proc.asm test_proc flat assembler version 1.73.30 (102400 kilobytes memory) test_proc.asm [9]: fastcall proc1 PROC64.INC [300] fastcall [292]: call proc processed: ..arg?I proc1 error: illegal instruction. But! Code: ~ $ cat test_proc.asm use64 include 'PROC64.INC' proc proc1 ret endp proc proc2 stdcall fastcall proc1 ret endp call proc2 ~ $ fasm -m 102400 test_proc.asm test_proc flat assembler version 1.73.30 (102400 kilobytes memory) test_proc.asm [13]: call proc2 processed: ..arg?I proc2 error: illegal instruction. |
|||
02 Nov 2024, 19:50 |
|
Bird of Hermes 03 Nov 2024, 07:59
macomics wrote: Ok. Well Use jmp instead. Because the proc macro tried to convert fastcall to a local variable using equ, the fastcall macro was called instead and converted call to a local variable _________________ If something can't be done with macros, then there were too few macros. |
|||
03 Nov 2024, 07:59 |
|
revolution 03 Nov 2024, 09:47
Replacing stdcall fix fastcall in proc64.inc with macro stdcall arg& { fastcall args } appears to fix the problem.
Code: ~ cat test.asm use64 include 'macro/proc64.inc' proc proc1 ret endp proc proc2 stdcall fastcall proc1 ret endp jmp proc2 call proc2 a = proc2 ~ fasm test.asm flat assembler version 1.73.31 (16384 kilobytes memory) 4 passes, 32 bytes. ~ |
|||
03 Nov 2024, 09:47 |
|
Bird of Hermes 04 Nov 2024, 09:42
revolution wrote: Replacing stdcall fix fastcall in proc64.inc with macro stdcall arg& { fastcall args } appears to fix the problem. Yes, as I said at the very beginning, it works, but I would like this error be fixed in the official package _________________ If something can't be done with macros, then there were too few macros. |
|||
04 Nov 2024, 09:42 |
|
revolution 04 Nov 2024, 10:20
This thread has been stickied and marked with [bug], so it has the best chance to get the attention of the author.
|
|||
04 Nov 2024, 10:20 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.