0
我用vs 2015寫了x64 masm程序。錯誤「訪問違規讀取位置」
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
不時我得到一個錯誤:
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.
你能否澄清哪裏可以在我的代碼錯誤?