Here's some sample code; I've stripped out everything to make it simple. Specifically, I'm having trouble with the LABEL l_L1: and with the LOOP statement that loops back to the LABEL l_L1. Everything else works, it just seems that I'm not implementing the LABEL and LOOP to the LABEL correctly in my procedure below--I keep getting a compiler error stating that l_L1 is not defined or is unrecognized:
Code: Select all
EnableASM
OpenConsole()
Global a.l = 0
Global c.l = 100
; Example inline ASM code
Procedure myInlineProc()
MOV Eax, [v_a] ; put contents of memory location [v_a] into eax register
MOV Ecx, [v_c] ; put contents of memory location [v_c] into ecx register
l_L1:
INC Eax ; add 1 to global variable eax register
LOOP l_L1
ProcedureReturn
EndProcedure
; Use myInlineProc
variable1.l = myInlineProc()
PrintN("Contents of EAX register = " + Str(variable1))
; Exit program
Print("Press [ENTER] to exit... ")
Input()
CloseConsole()
End
Thanks in advanced.
Logman



