Pelles C > Bug reports
Macro freezing Poasm
(1/1)
Vortex:
Hi Pelle,
Poasm is freezing while trying to assemble the code below. The assembler does not return back the control to the command prompt. The problem is the retx macro :
--- Code: ---PUBLIC start
ExitProcess PROTO :DWORD
includelib \PellesC\Lib\Win64\kernel32.lib
retx MACRO
db 0C3h
retx ENDM
.code
start:
mov rcx,20
mov rdx,10
call main
invoke ExitProcess,0
OPTION PROLOGUE:NONE
OPTION EPILOGUE:NONE
main PROC
mov rax,rcx
add rax,rdx
; ret ; ret is ignored
retx ; Poasm is freezing
; at this point
; db 0C3h
main ENDP
OPTION PROLOGUE:PrologueDef
OPTION EPILOGUE:EpilogueDef
END
--- End code ---
Test with Poasm Version 12.00.1
Vortex:
Hello,
The retn instruction is the best option to terminate the procedure but the assembler should not freeze as I mentioned in my first posting.
--- Code: ---PUBLIC start
ExitProcess PROTO :DWORD
includelib \PellesC\Lib\Win64\kernel32.lib
retx MACRO
db 0C3h
retx ENDM
.code
start:
mov rcx,20
mov rdx,10
call main
invoke ExitProcess,0
OPTION PROLOGUE:NONE
OPTION EPILOGUE:NONE
main PROC
mov rax,rcx
add rax,rdx
retn
main ENDP
OPTION PROLOGUE:PrologueDef
OPTION EPILOGUE:EpilogueDef
END
--- End code ---
Pelle:
I will look at it...
Pelle:
This seems easily fixed by using the correct syntax:
--- Code: ---retx MACRO
db 0C3h
ENDM
--- End code ---
Navigation
[0] Message Index
Go to full version