News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

error A2206: missing operator in expression

Started by gelatine1, April 22, 2014, 05:46:28 AM

Previous topic - Next topic

gelatine1

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


GoneFishing


gelatine1

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 ?

GoneFishing

You're reading debugger reference
A few days ago qWord uploaded MASM reference . You may download it here.

qWord

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
MREAL macros - when you need floating point arithmetic while assembling!