flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Get value from dd |
Author |
|
sts-q 10 Feb 2020, 15:33
zval = 1055h
zval_location dd zval mov eax, zval ; eax = 1055h mov ax, [zval_location] ; ax = 1055h Last edited by sts-q on 10 Feb 2020, 15:35; edited 1 time in total |
|||
10 Feb 2020, 15:33 |
|
revolution 10 Feb 2020, 15:35
If you mean the address of Zval then:
Code: org 0x100 Zval dd 1,2,3,4 mov eax, Zval ;<--- the address, 0x100 mov ebx, [Zval} ;<--- the first value, 1 mov ecx, [eax] ;<--- also the first value, 1 |
|||
10 Feb 2020, 15:35 |
|
Roman 10 Feb 2020, 16:00
Not I mean get value from Zval,
But not Mov eax, [Zval] Its read from memory slow I want get to eax 10 from Zval! Unusual method. And for this need unusual macros! |
|||
10 Feb 2020, 16:00 |
|
Tomasz Grysztar 10 Feb 2020, 16:06
You probably mean this then:
Code: Zval dd 10,55 load tmp dword from Zval Mov eax, tmp Code: __DATA:: Zval dd 10,55 ; ...in another section: load tmp dword from __DATA:Zval Mov eax, tmp |
|||
10 Feb 2020, 16:06 |
|
Roman 10 Feb 2020, 16:09
Thanks this is I want.
|
|||
10 Feb 2020, 16:09 |
|
Roman 10 Feb 2020, 16:34
What about load tmp peace of code from?
Code: Lb: Inc ebx Load tmp lb Tmp ; in this place we get Inc ebx |
|||
10 Feb 2020, 16:34 |
|
Tomasz Grysztar 10 Feb 2020, 16:47
Roman wrote: What about load tmp peace of code from? Code: Lb: Inc ebx
Load tmp byte from Lb
db tmp Code: Lb: Inc ebx .size = $ - Lb repeat Lb.size Load tmp byte from Lb+%-1 db tmp end repeat |
|||
10 Feb 2020, 16:47 |
|
Roman 10 Feb 2020, 17:22
Amazing and cool!
Thanks. |
|||
10 Feb 2020, 17:22 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.