Page 1 of 1
Label as argument for Procedure ???
Posted: Sun Jun 19, 2005 1:19 pm
by Ralf
Is there any way, to parse a labeladress to a procedure like following "not working" example
Code: Select all
; ---- Label as argument in Procedure? ----
Procedure LabelTest(?LabelAdress)
Restore ?LabelAdress
Read text.s
Debug text.s
EndProcedure
LabelTest(?label2)
End
DataSection
label1:
Data.s "Text from Label 1"
label2:
Data.s "Text from Label 2"
label3:
Data.s "Text from Label 3"
EndDataSection
Posted: Sun Jun 19, 2005 1:34 pm
by jack
Code: Select all
; ---- Label as argument in Procedure? ----
Procedure LabelTest(LabelAdress.l)
! MOV eax,[esp]
! MOV dword [PB_DataPointer],eax
Read text.s
Debug text.s
EndProcedure
LabelTest(?label2)
End
DataSection
label1:
Data.s "Text from Label 1"
label2:
Data.s "Text from Label 2"
label3:
Data.s "Text from Label 3"
EndDataSection
Posted: Sun Jun 19, 2005 1:36 pm
by Ralf
very cool jack! many thanks! *GREAT*
Your example with strings and modifing to read vals works fine! But in my example i get everytime "invalied memory adress" message... (does not work) - now i am trying to check where the problem is...
possible the labeladress is doublelong?
Posted: Sun Jun 19, 2005 2:07 pm
by Ralf
why does this doesnt work.. inline asm enabled..
Code: Select all
Procedure WhatsWrong(LabelAdress.l)
! MOV eax,[esp]
! MOV dword [PB_DataPointer],eax
Read Value.w
Debug Value.w
EndProcedure
WhatsWrong(label1)
DataSection
label1:
Data.w 4096 ; anzahl
EndDataSection
Posted: Sun Jun 19, 2005 2:16 pm
by sec
you're missing ? , it would be WhatsWrong(?label1)
Posted: Sun Jun 19, 2005 2:24 pm
by Ralf
sec wrote:you're missing ? , it would be WhatsWrong(?label1)
oh my god
i havent noticed that while searching for the bug... thanks