NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: jdubya on November 22, 2013, 06:13:12 PM
-
Can someone explain this label to me? It's in an example and I've never seen one declared like this. Thanks.
var: dd 2D,1
-
I don't think I've seen one quite like that, either. It defines two dwords, 2 (decimal) and 1 (also decimal). Seems like "overkill" to me.
Best,
Frank
-
Hi!
Confirm, it works:
cmp dword [var],dword 2
je .equal
; was equal
It makes sense, define vars by numerical system:
var1: dd 10o; Octal 10 equals 8 Decimal
var2: dd 08h; Hex
var3: dd 08d; Decimal
var4: dd 1000b; Binary
Compare:
cmp dword [var1],dword 8
je .equal
; was equal
Bye, Encryptor!
-
Yeah... we can also use uppercase 'O' to indicate octal. Anyone who does so deserves the confusion they will get!
Best,
Frank
-
Yeah... we can also use uppercase 'O' to indicate octal. Anyone who does so deserves the confusion they will get!
Best,
Frank
No tag:
var1: dd 10O; Octal 10 equals 8 Decimal
Code tag:
var1: dd 10O; Octal 10 equals 8 Decimal
Yeah, Frank! :D