Код: Выделить всё
0xC0000005: Access violation executing location 0x00007FF6AA2F3000.
Вот мой код:
main.cpp
Код: Выделить всё
#include
#define ASSEMBLY
#ifdef ASSEMBLY
extern "C" int Print();
#else
int Print()
{
printf("Hello, World!");
return 0;
}
#endif
int main()
{
Print();
}
< /code>
print.asm
INCLUDELIB ucrt.lib
INCLUDELIB legacy_stdio_definitions.lib
EXTERN printf: PROC
.DATA
string DB "Hello, World!", 10, 0
.CODE
Print PROC
sub rsp, 20h
lea rcx, string
call printf
mov rax, 0
ret
Print ENDP
END
Подробнее здесь: https://stackoverflow.com/questions/796 ... -violation