vc中嵌入汇编的一个问题?
我想在vc中加入下面的汇编语言程序,这是我的汇编程序,void HDOutWord(WORD Addr,WORD Value)
{
asm{
push dx
push ax
mov dx,Addr
mov ax,Value
#ifndef _DEBUG_HD_
out dx,ax
#endif
pop ax
pop dx
}
}
结果编译时候出现错误:
E:\2004.8.26\Control.cpp(15) : error C2065: 'push' : undeclared identifier
E:\2004.8.26\Control.cpp(15) : error C2146: syntax error : missing ';' before identifier 'dx'
E:\2004.8.26\Control.cpp(15) : error C2065: 'dx' : undeclared identifier
E:\2004.8.26\Control.cpp(15) : error C2146: syntax error : missing ';' before identifier 'push'
E:\2004.8.26\Control.cpp(16) : error C2146: syntax error : missing ';' before identifier 'ax'
E:\2004.8.26\Control.cpp(16) : error C2065: 'ax' : undeclared identifier
E:\2004.8.26\Control.cpp(16) : error C2146: syntax error : missing ';' before identifier 'mov'
E:\2004.8.26\Control.cpp(16) : error C2065: 'mov' : undeclared identifier
等等,我不知道这是什么原因,是没有包含头文件之类吗?若是应该是什么文件?