我是靠谱客的博主 舒服猫咪,最近开发中收集的这篇文章主要介绍王爽汇编 实验13编写int 7cH中断例程(1),觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

ASSUME    CS:codesg
              codesg SEGMENT
              start:  
                       MOV       AX,CS
                       MOV       DS,AX         ;程序段地址
                       MOV       SI,OFFSET DIV_s
                       MOV       AX,0
                       MOV       ES,AX
                       MOV       DI,0200H      ;保存中断处理程序的内存地址
                       MOV       CX,OFFSET DIV_ok - OFFSET DIV_s  ;得到中断处理程序的长度
                       CLD                     ;正向传送
                       REP       MOVSb         ;安装中断例程
                       MOV       AX,0
                       MOV       ES,AX
                       MOV       WORD PTR ES:[7ch*4],0200h
                       MOV       WORD PTR ES:[7ch+2],0000h  ;设置中断向量表
                       MOV       AX,4c00h
                       INT       21h

                       ;功能:显示一个用0结束的字符串
                       ;参数:(dh)=行号,(dl)=列号,(cl)=颜色,ds:si指向字符串首地址
          DIV_s:   PUSH      AX
                       PUSH      ES
                       PUSH      SI
                       PUSH      BX
                       PUSH      DI
                       PUSH      DX
                       MOV       DX,0
                       MOV       BX,0
                      
                       MOV       AX,0
                       MOV       AL,DH
                       MOV       DH,160
                       MUL       DH
                       MOV       DI,AX
                       MOV       AX,0
                       MOV       AL,DL
                       MOV       DL,2
                       MUL       DL
                       ADD       DI,AX
                      
                       MOV       AX,0b800h
                       MOV       ES,AX
        DIV_s1:  MOV       AL,DS:[SI]
                       CMP       AL,0
                       JE        DIV_s2
                       MOV       ES:[DI+BX],AL
                       MOV       ES:[DI+BX+1],CL
                       INC       SI
                       ADD       BX,2
                       JMP       SHORT DIV_s1
         DIV_s2:  pop       DX
                       pop       DI
                       POP       BX
                       POP       SI
                       POP       ES
                       POP       AX
                       IRET
        DIV_ok:  NOP
              codesg ENDS
              END       start

最后

以上就是舒服猫咪为你收集整理的王爽汇编 实验13编写int 7cH中断例程(1)的全部内容,希望文章能够帮你解决王爽汇编 实验13编写int 7cH中断例程(1)所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(34)

评论列表共有 0 条评论

立即
投稿
返回
顶部