Line continuation problem
Brought to you by:
japheth
include \masm32\include\masm32rt.inc
xData MACRO dest, src
.data
dest db src
.code
ENDM
.code
start: ; OK for ML.exe, JWasm chokes with Error A2166: Missing quotation mark in string
xData M$, "This is an ANSI string, and there is no reason to assume that Masm cannot handle really long declarations \
of Unicode data provided you follow the rules and respect the syntax established by Microsoft when they designed \
Masm more than a decade ago",0
inkey offset M$
invoke ExitProcess, 0
end start
Confirmed.
However, there won't be a fast fix because
- there's a workaround: you can enclose your quoted string in <> and it works
- the fix is complicated to implement. The following source, although rather unrelated at first glance, may illustrate why:
.386
.model flat, stdcall
option casemap:none
.code
TM1 equ <db>
TM2 equ <equ>
v1 TM1 "abcd \ ; "
v2 TM2 "abcd \ ; "
efgh"
start:
ret
end start
The problem is not the \ as last character, but \ followed by ; and then optionally followed by ". Masm treats this case depending on the directive, after the line has been expanded, and this is too late for jwasm.