flat assembler
Message board for the users of flat assembler.
Index
> Windows > Local variables in windows procedures |
Author |
|
Tomasz Grysztar 18 Sep 2004, 12:28
1)
Code: proc myproc,x,y a dd ? enter mov [a],123 return endp (by the way: you don't have to put the "enter" word there unless you declare some local variables) 2) Code: mov eax,1.0 mov [myvar],1.0 (for 32-bit FP values, for 64-bit ones it cannot be done with single instruction, you would have to use some macro). |
|||
18 Sep 2004, 12:28 |
|
madmatt 18 Sep 2004, 19:13
Ok, thanks, can you also do something like fld 1.0 also? I've tried this one and it didn't work correctly.
|
|||
18 Sep 2004, 19:13 |
|
Tomasz Grysztar 18 Sep 2004, 19:15
There is no such instruction in general, but you can use fld1, etc.
And you could still make some macro for it - but there is no such FPU instruction. |
|||
18 Sep 2004, 19:15 |
|
madmatt 18 Sep 2004, 21:27
Ok, thanks, I'll probably use a local float constant the same way you would do an integer.
*MadMatt* |
|||
18 Sep 2004, 21:27 |
|
madmatt 22 Sep 2004, 18:05
Hello everyone, problem only partly solved. I need a macro that would reserve DWORD sized varaibles on the stack,set some or all of those variables to values, and when finished, delete the stack space, and allow the same names of the variables to be used in other assembly procedures. Any Ideas?
MadMatt |
|||
22 Sep 2004, 18:05 |
|
pelaillo 23 Sep 2004, 13:14
madmatt wrote: ... allow the same names of the variables to be used in other assembly procedures. Any Ideas? MadMatt, do you mean to use the same names, not the same variable contents? If yes, the standard proc macro does everything you want exactly as you want if you keep your variable names local (preceded by dots). |
|||
23 Sep 2004, 13:14 |
|
madmatt 23 Sep 2004, 18:51
Quote: MadMatt, do you mean to use the same names, not the same variable contents? Yep, the same names. Quote: If yes, the standard proc macro does everything you want exactly as you want if you keep your variable names local (preceded by dots). Haven't tried proceding the names with dots. Sounds like what I am looking for, thanks. |
|||
23 Sep 2004, 18:51 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.