What is wrong with my code ? I am getting the error for the line 'integer db 0y01010101' where I am simply trying to define a binary number.
This is my code:
.386
.model flat, stdcall
option casemap :none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib
.data
integer db 0y01010101
.code
start:
lea eax,integer
push eax
call StdOut
push 0
call ExitProcess
end start
.data
integer db 01010101b
http://msdn.microsoft.com/en-us/library/windows/hardware/ff552157(v=vs.85).aspx
According to that page i should use the 0y prefix and it doesnt even say anything about the b suffix. Why is that ? Is it only working for other assemblers ?
You're reading debugger reference
A few days ago qWord uploaded MASM reference . You may download it here (http://masm32.com/board/index.php?topic=3116.msg32323#msg32323).
For MASM y and b can be used as suffix for binary numbers, whereas the first one is independent of the current radix setting.
e.g.: 101010y