+ -
当前位置:首页 → 问答吧 → 编写80H号中断处理程序。中断发生时,显示彩色的0~9是个数字

编写80H号中断处理程序。中断发生时,显示彩色的0~9是个数字

时间:2010-12-27

来源:互联网

编写80H号中断处理程序。中断发生时,显示彩色的0~9是个数字!!

各位,帮帮忙

作者: atinatin5201314   发布时间: 2010-12-27

Assembly code

titel   this program compiled sucess by masm 6.15
assume    cs:code
code    segment
start:
    mov ax,cs
    mov ds,ax
    mov si,offset disp
    mov ax,0
    mov es,ax
    mov di,200h
    mov cx,offset disp_end-offset disp
    cld
    rep movsb
;
    mov ax,0
    mov es,ax
    mov word ptr es:[80h*4],200h
    mov word ptr es:[80h*4+2],0
;
    mov ah,4ch
    int 21h
disp:
    mov ax,0b800h
    mov es,ax
    mov di,160*12+40*2
    mov dl,30h
    mov cx,10
s:
    in al,40h
    and al,0fh
    xchg ah,al
    mov al,dl
    mov es:[di],ax
    add di,2
    inc dl
    loop s    
    iret
disp_end:
    nop
code    ends
end    start


先运行此程序, 然后在debug里用a命令调用一下int 80H即可

作者: masmaster   发布时间: 2010-12-27

建议换个入口地址, 在我的机器,int 80H会出现意想不到的。编写方法如上。具体中断号,可以换一个试一试。

作者: masmaster   发布时间: 2010-12-27

热门下载

更多