assume cs:code
stack segment
db 128 dup (0)
stack ends
code segment
start:mov ax,stack
mov ss,ax
mov sp,128
push cs
pop ds
mov ax,0
mov es,ax
mov si,offset int9
mov di,204h
mov cx,offset int9end-offset int9
cld
rep movsb
push es:[9*4]
pop es:[200h]
push es:[9*4+2]
pop es:[202h]
cli
mov word ptr es:[9*4],204h
mov word ptr es:[9*4+2],0
sti
mov ax,4c00h
int 21h
int9:push ax
push bx
push cx
push es
in al,60h
pushf
call dword ptr cs:[200h]
cmp al,9Eh
jne int9ret
mov ax,0b800H
mov es,ax
mov bx,0
mov cx,2000
s:mov byte ptr es:[bx],41H
add bx,2
loop s
int9ret: pop es
pop cx
pop bx
pop ax
iret
int9end:nop
code ends
end start
进入纯dos后 按下a 如果松开 那么全屏幕会显示大写A
果然在命令提示符下无法测试成功
- [younggay] 20? 那个20? 01/21 15:05
- [martian] 博主辛苦了! 11/24 13:43
- [acool] 先存下 看看O(∩_∩)O哈哈~ 11/22 12:30
- [acool] 不错,踩踩;) 11/22 12:27
- [tomato] 收藏一下,好好看看,扫扫盲。 11/21 20:01
- [younggay] 程序正确固然重要,必要的地方写注释也是很必要的。要不看的人脑袋可就大了。呵呵 fighting ! 11/21 14:47
- [younggay] 就提一点要求: 哥儿们,加点注释把,(*^__^*)...嘻嘻 11/21 14:37
- [lwbfq] 有点糊涂。 11/21 14:26
- [lwbfq] 有点糊涂。 11/21 14:26
- [younggay] 嗯。不错,不过要是关键代码部分加上注释就更好了。而且加注释也是一个成熟的编程人员的良好习惯。 11/21 14:23
- [h.goood] 汇编作业在哪里做?我怎么没找到? 11/24 12:32