Page 1 of 1

store register in pb variable?!

Posted: Sun May 29, 2005 9:18 pm
by Kendrel
i wonder if there is an easy way to store register values (eax etc) into "normal" purebasic variables... i have some complex functions in mind for that, and just wanted to make sure that there isnt an easy way to do this... :)

Posted: Sun May 29, 2005 9:45 pm
by thefool

Code: Select all

a=0 ;Initialize the value!
MOV a,eax
Debug a
:D

easy to forget that you need to initialize the value.

...

Posted: Sun May 29, 2005 9:59 pm
by Kendrel
ahhh... thx again... seems you are my hero tonight ;)

Posted: Sun May 29, 2005 10:13 pm
by thefool
hehe i would suggest you to look more carefully in your helpfile :)
- The used variables or pointers must be declared before to use them in an assembler keyword
but of course its easy to miss. Ow if you want a nice helpfile & !optimization tips! for assembler there is a nice link in the helpfile under the
Inline x86 ASM
topic too!

it have description and syntax for all the commands, jump table & more.!

the optimizing is also nice to look through when one learns a bit more!