Today I stumbled into an odd behaviour of polink:
ORG $+BufLen-1
; db ?
Without the db ?, data was overwritten. MS link doesn't do that...
However, I haven't been able to isolate this behaviour - the snippet below works.
include \masm32\include\masm32rt.inc
crtbuf MACRO var, BufLen, msAlign:=<4> ; cb pBuffer, 1000 [, 16]
LOCAL cblabel
.data?
align msAlign
cblabel LABEL BYTE
var equ offset cblabel
ORG $+BufLen-1
; db ?
.code
ENDM
.data?
somevalue dd ?
.code
start: crtbuf buffer, 80
mov eax, offset buffer
int 3
invoke lstrcpy, offset buffer, chr$("This is a text that is exactly 44 bytes long")
print offset buffer, 13, 10
mov somevalue, "tihs" ; no effect
print offset buffer, 13, 10
exit
end start