Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

How can I give value to registersymbol address? #28

Open
sesey opened this issue Apr 17, 2022 · 1 comment
Open

How can I give value to registersymbol address? #28

sesey opened this issue Apr 17, 2022 · 1 comment

Comments

@sesey
Copy link

sesey commented Apr 17, 2022

Hi,
How can I assign value to registersymbol from library?
I tried as below but failed.
I don't want to do value assignment with script.

Script:

alloc(testad,8)
registersymbol(testad)

C# code:

lib.iAddAddressManually("testad", TVariableType.vtDword);
lib.iSetValue(0,"100",false);
@fenix01
Copy link
Owner

fenix01 commented Apr 19, 2022

Hi sesey,

I'm note sure it is possible to assign a value to a register symbols without using script. But if you need to dynamically assign a value maybe you can forge the script manually in your code.
Something like this :

var
myScript: string;
begin
myScript := "
alloc(testad,8)
registersymbol(testad)
mov testad, %d"
myScript := format(myScript,[1]);
end;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants