中断调用处理程序
2009-09-27 11:36
218 查看
assume cs:code,ds:data,ss:stack
stack segment
db 256 dup (?)
top label word
stack ends
data segment
db 'xiaonei',0
data ends
code segment
start:
mov ax,stack
mov ss,ax
mov sp,offset top
;将sqr程序到sqrend程序存入内存0:200处
mov ax,cs
mov ds,ax
mov si,offset converter
mov ax,0
mov es,ax
mov di,200H
mov cx,offset converterend - offset converter
cld
rep movsb
;安装向量表,安装到中断码为7c处
mov ax,0
mov es,ax
mov word ptr es:[7cH*4],200H
mov word ptr es:[7cH*4+2],0
int 7cH ;调用中断处理程序
mov ax,4c00H
int 21H
;将data段中的字符串"xiaonei"转换成大写
converter:
push cx ;将冲突的寄存器保存到栈中
mov ax,data
mov ds,ax
mov bx,0
s0:
mov cl,[bx]
mov ch,0
jcxz s1
and cl,0dfH
mov [bx],cl
inc bx
jmp short s0
s1:
pop cx
iret
converterend:
nop
code ends
end start
stack segment
db 256 dup (?)
top label word
stack ends
data segment
db 'xiaonei',0
data ends
code segment
start:
mov ax,stack
mov ss,ax
mov sp,offset top
;将sqr程序到sqrend程序存入内存0:200处
mov ax,cs
mov ds,ax
mov si,offset converter
mov ax,0
mov es,ax
mov di,200H
mov cx,offset converterend - offset converter
cld
rep movsb
;安装向量表,安装到中断码为7c处
mov ax,0
mov es,ax
mov word ptr es:[7cH*4],200H
mov word ptr es:[7cH*4+2],0
int 7cH ;调用中断处理程序
mov ax,4c00H
int 21H
;将data段中的字符串"xiaonei"转换成大写
converter:
push cx ;将冲突的寄存器保存到栈中
mov ax,data
mov ds,ax
mov bx,0
s0:
mov cl,[bx]
mov ch,0
jcxz s1
and cl,0dfH
mov [bx],cl
inc bx
jmp short s0
s1:
pop cx
iret
converterend:
nop
code ends
end start
相关文章推荐
- 中断处理程序、中断上下文中处理延时及一些函数的调用规则(调IIC中断驱动有感)
- 中断处理程序、中断上下文中处理延时及一些函数的调用规则(调IIC中断驱动有感)
- 中断处理程序、中断上下文中处理延时及一些函数的调用规则
- 中断处理程序、中断上下文中处理延时及一些函数的调用规则
- 驱动:中断【2】中断处理程序、中断上下文中处理延时及一些函数的调用规则(调IIC中断驱动有感)
- Linux内核spin_lock 要防止该锁在中断处理程序调用
- 一般处理程序的调用
- 关于js实现的Ajax调用,webService,一般处理程序,aspx
- linux内核学习----中断和中断处理程序
- 框架调用处理程序的方式
- WinCE--中断处理程序ISR 详…
- WinCE中断处理程序ISR 详解
- 终止处理程序的调用
- 关于中断处理程序中的关中断函数disable_irq和disable_irq_nosync
- 微信小程序之支付后调用SDK的异步通知及验证处理订单方法
- 5.3 系统调用_系统调用处理程序
- 操作系统开发系列—13.b.进程之丰富中断处理程序
- Linux0.11内核--系统中断处理程序int 0x80实现原理 .
- asp.net调用Console程序,异常未结束的处理。
- 程序中断和调用子程序有何区别