Syntax errors on MASM

Graham Anderson 0 Reputation points
2024-06-23T11:42:04.3966667+00:00

None of your tags seem to be applicable so I chose the first one! I have recently installed Visual Studio 2022 so that I can write assembler code. I have previously written assembler under MSDOS and Windows XP. I have installed IRVINE library and when I try to build my code I am getting errors on all PROTO statements that have parameter being passed. Can you let me know what I need to do to stop these syntax errors. Here are some examples

Severity Code Description Project File Line Suppression State Details

Error A2008 syntax error : , SET4X4 C:\Irvine\SmallWin.inc 299

299 CloseHandle PROTO, ; close file handle

hObject:DWORD

Severity Code Description Project File Line Suppression State Details

Error A2008 syntax error : , SET4X4 C:\Irvine\Irvine32.inc 22

22 GetDateTime PROTO, ; get system date and time

startTime:PTR QWORD

Severity Code Description Project File Line Suppression State Details

Error A2008 syntax error : INVOKE SET4X4 C:\Users\graha\source\repos\SET4X4\SET4X4.asm 86

Error A2008 syntax error : IF SET4X4 C:\Users\graha\source\repos\SET4X4\SET4X4.asm 91

Error A2008 syntax error : . SET4X4 C:\Users\graha\source\repos\SET4X4\SET4X4.asm 95

86 INVOKE CreateFile,

  ADDR filename, GENERIC_WRITE, FILE_SHARE_READ, NULL,

  CREATE_NEW, FILE_ATTRIBUTE_NORMAL, 0

mov fileHandle,eax			; save file handle

91 .IF eax == INVALID_HANDLE_VALUE

  mov  edx,OFFSET errMsg		; Display error message

  call WriteString

  jmp  QuitNow

95 .ENDIF

I would be grateful for any help as this is stopping me from proceeding.

Thanks

Graham

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,262 questions
0 comments No comments
{count} votes