I used vs 2015 to write x64 masm program.
ExitProcess PROTO
MessageBoxA PROTO
.data
text db "Winter hat", 0Ah, "Upon my head - ", 0Ah, "My head stays warm,", 0Ah, "But my nose is red!;", 0
header db "Task1", 0
.code
main proc
xor rcx, rcx
mov r9b, 0
lea rdx, text
lea r8, header
call MessageBoxA
call ExitProcess
main endp
end
From time to time i get next error:
Exception thrown at 0x00007FF9C65261BE (gdi32.dll) in ConsoleApplication1.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
If there is a handler for this exception, the program may be safely continued.
Could you clarify where can be mistake in my code?