⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 int_stop.asm

📁 一个关于中断的例子
💻 ASM
字号:
code segment    
      assume cs:code,ds:code  
org 100h  
      start:  jmp install  
      msg     db 'Current time is: '  
      time0   db ?,?  
            db ':'  
      time1   db ?,?   
            db ':'  
      time2   db ?,?,0,0  
oldint1c      dd ?  
newint1c: push ax  
          push bx  
          push cx  
          push dx  
          push si  
          push di  
          push es  
          mov ax,0200h  
          int 1ah  
          mov al,ch  
          lea si,time0  
          call bcd  
          mov al,cl  
          lea si,time1  
          call bcd  
          mov al,dh  
          lea si,time2  
          call bcd  
          mov ax,0b800h  
          mov es,ax  
          mov di,54*2d  
          lea si,msg  
    disp: mov al,cs:[si]  
          inc si  
          or al,al  
          jz disp0  
          cld  
          stosb  
          inc di  
          jmp disp  
disp0:   pop es  
          pop di  
          pop si  
          pop dx  
          pop cx  
          pop bx  
          pop ax  
          jmp cs:oldint1c  
    bcd:  mov ah,al  
          shr ah,1  
          shr ah,1  
          shr ah,1  
          shr ah,1  
          and al,0fh  
          add ax,'00'  
          xchg ah,al  
          mov cs:[si],ax  
          ret  
install:  push cs  
          pop ds  
          mov ax,351ch  
          int 21h  
          mov word ptr oldint1c,bx  
          mov word ptr oldint1c+2,es  
          lea dx,newint1c  
          mov ax,251ch  
          int 21h  
          mov dx,offset install+120h  
          mov cl,04h  
          shr dx,cl  
          mov ah,31h  
          int 21h  
code ends  
end start 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -