flat assembler
Message board for the users of flat assembler.
Index
> Windows > how to understand INC EDI and ADD EDI, 4? |
Author |
|
Artlav 11 Oct 2007, 06:28
inc edi is add edi,1, not 4. You have array of long, 4 bytes per element, so add edi,4 seems right to access array[1].
That is, if i got it right what you were asking. |
|||
11 Oct 2007, 06:28 |
|
jacky_zz 11 Oct 2007, 06:35
yes, it is, when i call "inc edi", and edi's address add 1, if address before call "inc edi" is 0012FEA4, after call, the current address is 0012FEA5, then i call "mov [edi], 20H", i want to know what is value of adress 0012FEA5?
|
|||
11 Oct 2007, 06:35 |
|
LocoDelAssembly 11 Oct 2007, 11:44
Code: mov edi, $0012FEA4 ; EDI = $0012FEA4 inc edi ; EDI = $0012FEA5 mov dword [edi], $20 ; memory at address range $0012FEA5..$0012FEA8 = $00000020 ($0012FEA5 = $20, the other 3 addresses are $00) |
|||
11 Oct 2007, 11:44 |
|
jacky_zz 12 Oct 2007, 03:36
oh, i get it, thanks!
|
|||
12 Oct 2007, 03:36 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.