flat assembler
Message board for the users of flat assembler.
Index
> Windows > Insight into register-values |
Author |
|
RedGhost 30 Mar 2006, 15:06
hey, after the call to GetModuleHandle eax holds the handle since eax is used for return values, if you send 0 to GetModuleHandle it returns the current module, or you can specify the name for a specific handle (see the MSDN)
about xor: "Each bit of the result is 1 if the corresponding bits of the operands are different; each bit is 0 if the corresponding bits are the same." since its xor eax, eax, each bit would be the same (obviously) so all 32bits get set to 0, its a trick to make eax 0 without using an immediate or memory and its generally faster so Code: xor eax, eax mov [wc.style],eax is the same as Code: mov [wc.style],0 i hope that clears it up _________________ redghost.ca Last edited by RedGhost on 30 Mar 2006, 15:08; edited 1 time in total |
|||
30 Mar 2006, 15:06 |
|
vid 30 Mar 2006, 15:07
when you xor something with itself then it becomes zero. so it is just moving zero to wc.style. about xoring: 1 xor 1 = 0, 0 xor 0 = 0, so when you xor something with itself it always becomes 0.
|
|||
30 Mar 2006, 15:07 |
|
RedGhost 30 Mar 2006, 15:09
vid wrote: when you xor something with itself then it becomes zero. so it is just moving zero to wc.style. about xoring: 1 xor 1 = 0, 0 xor 0 = 0, so when you xor something with itself it always becomes 0. i guess you were writing yours just as i posted my reply :p _________________ redghost.ca |
|||
30 Mar 2006, 15:09 |
|
kasake36 30 Mar 2006, 15:12
Ah, that's clear now! Thx for the help!
|
|||
30 Mar 2006, 15:12 |
|
vid 30 Mar 2006, 15:38
redghost: yup...
|
|||
30 Mar 2006, 15:38 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.