How can I use a constant in assembler?
Posted: Sun Jul 07, 2019 2:31 pm
How can I use the content #myValue instead of the value 8 in this example?
Code: Select all
#myValue = 8
!add edx, 8
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
#myValue = 8
!add edx, 8
Code: Select all
#myValue = 8
Procedure foo()
EnableASM
XOr rax,rax
add rax, #myValue
ProcedureReturn
DisableASM
EndProcedure
! myValue equ 16
Procedure foo2()
!xor rax,rax
!add rax, myValue
ProcedureReturn
EndProcedure
Debug foo()
Debug foo2()