16H中断读键盘缓冲区,再写21H写文件。设为回车退出, WinMain....char ascii=0; __asm{ clear: mov AH,1 int 16h jz next mov ah,0 int 16h jmp clear next: mov ah,0 int 16h ;wait for input mov ascii,al ;ah holds ASCII of the key pressd. cmp ascii,0DH ;indicate it is a enter key, jz exit1exit1: }
我看你还是去看看侯先生的《深入浅出MFC》,这可是一本经典作品啊!
感谢 kimryo(A Taste Of Dream) ,虽然是汇编,但是终于看见代码了!!! 不容易啊!!! 我在VB版经常以代码方式讨论的。 结帖了。
WinMain....char ascii=0;
__asm{
clear:
mov AH,1
int 16h
jz next
mov ah,0
int 16h
jmp clear
next:
mov ah,0
int 16h ;wait for input
mov ascii,al ;ah holds ASCII of the key pressd.
cmp ascii,0DH ;indicate it is a enter key,
jz exit1exit1:
}
不容易啊!!!
我在VB版经常以代码方式讨论的。
结帖了。