内部中断服务程序


stack     segment
	db 1024 dup(?)
stack     ends

data      segment
	intoff  dw ?
	intseg   dw ?
data      ends

code      segment
	assume cs:code,ss:stack,ds:data
	
start:    mov ax,3580h
          int 21h
          mov intoff,bx
          mov intseg,es
          push ds
          mov dx,offset newint80h
          mov ax,seg newint80h
          mov ds,ax
          mov ax,2580h
          int 21h
          pop ds
          ;
          int 80h
          ;
          mov dx,intoff
          mov ax,intseg
          mov ds,ax
          mov ax,2580h
          int 21h
          mov ah,4ch
          int 21h
          
          
          ;子程序
          newint80h  proc
           sti
           push ax
           push bx
           push cx
           push si
           mov si,offset intmsg
           mov cx,sizeof intmsg
disp:      mov al,cs:[si]
           mov bx,0
           mov ah,0eh
           int 10h
           inc si
           loop disp
           pop si
           pop cx
           pop bx
           pop ax
           iret        ;中断返回
intmsg    db 'I am the best!',0dh,0ah
newint80h  endp

code      ends
end       start
          

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值