[SOLVED] Question on label calls
Posted: Sat May 04, 2024 1:09 am
Hello,
Dumb question...
Below, what I'd like to achieve.
I know that a label address is "fixed" at compile time but is there a technique to recuperate and variabilize it?
Dumb question...
Below, what I'd like to achieve.
I know that a label address is "fixed" at compile time but is there a technique to recuperate and variabilize it?
Code: Select all
Procedure Test(ArgAddress)
Protected.u Count,Counter
Protected.s String
Restore Address ; Don't work
Read.u Count
For Counter=1 To Count
Read.s String
Debug String
Next
EndProcedure
;
Debug ?Etiq1
Address=?Etiq1
Test(Address)
Address=?Etiq2
Test(Address)
;
End
;
DataSection
Etiq1:
Data.u 1
Data.s "Test1-1"
Etiq2:
Data.u 2
Data.s "Test2-1"
Data.s "Test2-2"
Etiq3:
Data.u 3
Data.s "Test3-1"
Data.s "Test3-2"
Data.s "Test3-3"
EndDataSection