Skip to content

Instantly share code, notes, and snippets.

@slavanap
Created November 3, 2018 14:55
Show Gist options
  • Save slavanap/3cecee72938e0a8ac335f825b30cf0b1 to your computer and use it in GitHub Desktop.
Save slavanap/3cecee72938e0a8ac335f825b30cf0b1 to your computer and use it in GitHub Desktop.
MASM_bug_demo listing
Microsoft (R) Macro Assembler Version 14.15.26732.1 11/03/18 17:47:56
test.asm Page 1 - 1
.386
.MODEL flat, stdcall
OPTION casemap: none
00000000 .CONST
00000000 2A label1 DB 42
00000001 = 00000001 size1 = $-label1
00000000 .CODE
00000000 Pos proc cbSubStr:DWORD
RET
00000007 Pos endp
00000007 Start:
; This doesn't compile
INVOKE Pos, size1
test.asm(17) : error A2070:invalid instruction operands
; Expected code gen
0000000C 6A 01 PUSH byte ptr size1
0000000E E8 FFFFFFED CALL Pos
00000013 C3 RET
END Start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment