void main()
{
DWORD error;
char szBuf[1024];
_asm
{
mov ah, 16h
mov al, 8Eh
mov di, seg szBuf
mov es, di
mov di, offset szBuf
mov cx, 1024
mov dx, 3
int 2Fh
cmp ax, 1
je error
}
}
{
DWORD error;
char szBuf[1024];
_asm
{
mov ah, 16h
mov al, 8Eh
mov di, seg szBuf
mov es, di
mov di, offset szBuf
mov cx, 1024
mov dx, 3
int 2Fh
cmp ax, 1
je error
}
}
解决方案 »
- 求教一个创建Connection对象失败的问题
- 从文本文件中读取数据并显示的问题
- error C2065: 'GetModuleHandleEx' : undeclared identifier
- 求CPropertySheet的应用实例,谢谢
- 高手帮忙:mfc中sdi程序菜单的机制。
- 关于临界区
- WINAPI有什么用?
- 我用的是vc6,怎么在建立一个project以后,更改project的名称
- 请教:界面中父---子-----孙的问题(菜鸟提问)!!
- 新书《COM与.NET组件服务》
- 哪位仁兄告诉我Numega TrueTime的下载地址,给100分
- ★紧急求助!!如何在CListCtrl中的非第一列贴图?或者设个标记?在线等待!★
Windows95, get virtual machine title
这个服务是16位的。不知道里边是如何做,假如是stosb,那你可以
lea edi, szBuf试试,es不改。
我是98,试了试,编译通过,但是死掉了。
{
char lpCaption[] = "Caption";
char lpText[] = "Text";
__asm
{
mov eax, MB_OK
push eax
mov eax, dword ptr [lpCaption]
push eax
mov eax, dword ptr [lpText]
push eax
mov eax, NULL
push eax
call MessageBox ; 这句出错
pop ebx
pop ebx
pop ebx
}
}编译通过了为什么运行出错?
我有20000多可用分,重谢帮助我的人!!
char szBuf[1024];
定义成全局试试
{
char lpCaption[] = "Caption";
char lpText[] = "Text";
__asm
{
mov eax, MB_OK
push eax
mov eax, dword ptr [lpCaption]
push eax
mov eax, dword ptr [lpText]
push eax
mov eax, NULL
push eax
call MessageBox ; 这句出错
pop ebx
pop ebx
pop ebx
}
}编译通过了为什么运行出错?
mov eax, dword ptr [lpCaption]
这句意思是把lpCaption开头的4字节给eax,不是地址。同样还有:
mov eax, dword ptr [lpText]改为
lea eax, lpCaption
lea eax, lpText
{
char lpCaption[] = "Caption";
char lpText[] = "Text";
__asm
{
mov eax, MB_OK
push eax
// mov eax, dword ptr [lpCaption]
lea ax, lpCaption
push eax
// mov eax, dword ptr [lpText]
lea ax, lpCaption
push eax
mov eax, NULL
push eax
// call MessageBox ; 这句出错
call dword ptr MessageBox
// pop ebx
// pop ebx
// pop ebx
//不用,MessageBox恢复栈指针。况且三个pop对应四个push?
}
}
第二个lea ax, lpCaption应该是lea eax, lpText
接分!
// 好象从这段代码看不出你想做点啥
// 把seg 也改成OFFSET 就可以编译通过了
// di(es at last) would hold the low-part of the addr
//
void main()
{
// var should be modified
static DWORD error;
static char szBuf[1024]; error = 888;
strcpy (szBuf, "ee2ee");
_asm
{
mov ah, 16h
mov al, 8Eh
mov EDI,OFFSET szBuf
mov es, di
mov EDI,offset szBuf
mov cx, 1024
mov dx, 3
int 2Fh
cmp ax, 1
je SHORT error
}
}