Code: Select all
Procedure.i DoSomething()
Static dummy.i
!mov [???_dummy],123;<-
ProcedureReturn dummy
EndProcedure
Code: Select all
Procedure.i DoSomething()
Static dummy.i
!mov [???_dummy],123;<-
ProcedureReturn dummy
EndProcedure
Code: Select all
Procedure.l DoSomething()
Static dummy.l
!mov dword [so_DoSomething.v_dummy], 123
ProcedureReturn dummy
EndProcedure
Code: Select all
Procedure.l DoSomething()
Static dummy.l
Protected *dummy = @dummy
!mov rdx, [p.p_dummy]
!mov dword [rdx], 123
ProcedureReturn dummy
EndProcedure
I looked at the asm code PureBasic generated.Mijikai wrote:I did not find any information about this in the helpfile is there
another documentation for asm?
Code: Select all
Procedure.l DoSomething()
Static dummy.l
!lea rax, [so_DoSomething.v_dummy]
!mov dword [rax], 123
ProcedureReturn dummy
EndProcedure
Procedure.f DoSomething2()
Protected dummy.f
!lea rax, [p.v_dummy]
!mov dword [rax], 0.123
ProcedureReturn dummy
EndProcedure
Debug DoSomething()
Debug DoSomething2()
I know.mk-soft wrote:Asm 'lea' get the adress of variable...
Code: Select all
Procedure.l DoSomething()
EnableASM
Static dummy.l
mov dummy, 123
ProcedureReturn dummy
DisableASM
EndProcedure
Debug DoSomething()
I always forget about that optionwilbert wrote:I looked at the asm code PureBasic generated.Mijikai wrote:I did not find any information about this in the helpfile is there
another documentation for asm?
I know...mk-soft wrote:Asm 'lea' get the adress of variable...