Visual Studio를 사용하여 어셈블리 코드를 컴파일하는 방법은 무엇입니까?Visual Studio에서 어셈블리 컴파일
Visual Studio 2010에 어셈블리 소스 파일을 컴파일하고 실행하고 싶습니다.
나는 비주얼 C++ 프로젝트를 생성하고 파일 code.asm
일부 어셈블리 코드를 삽입 한 :
.586 ;Target processor. Use instructions for Pentium class machines
.MODEL FLAT, C ;Use the flat memory model. Use C calling conventions
.STACK ;Define a stack segment of 1KB (Not required for this example)
.DATA ;Create a near data segment. Local variables are declared after
;this directive (Not required for this example)
.CODE ;Indicates the start of a code segment.
clear PROC
xor eax, eax
xor ebx, ebx
ret
clear ENDP
END
당신이 시도하고이를 컴파일 할 때 문제가 그러나, 당신은 얻을 :
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
내가 가서 사용자 정의 빌드 masm.targets
(오른쪽 클릭 프로젝트 > 사용자 정의 빌드 ..)을 활성화했지만 아무런 효과가 없습니다.
Visual Studio에서 * debug * asm (레지스터 및 단일 단계 중단 점보기) : https://stackoverflow.com/questions/46394685/debugging-asm-with-visual-studio-register-content -will-not-display. [x86 태그 위키] (https://stackoverflow.com/tags/x86/info)의 다른 x86 asm 링크도 참조하십시오. –