assume cs:codesg,ds:datasg,ss:stacksg
stacksg segment
db 256 dup (0)
stacksg ends
datasg segment
mem db 512 dup (0)
d1 db "1-read.",0
d2 db "2-write.",0
d3 db "Esc-quit.",0
d4 db "others-Refresh.",0
dsector db "Enter logical sector number:",0
derror db "Error numbe...
[2013-10-31 16:39] 实验17
阅读全文 |
评论次数(0) |
浏览次数(599) |
所属类型(汇编作业)
[2013-10-29 17:18] 实验16改
assume cs:code
code segment
table dw fun1,fun2,fun3,fun4
d1 db "1-Clear the screen",0
d2 db "2-Set the foreground color",0
d3 db "3-Set the background color",0
d4 db "4-Scroll up one line",0
d5 db "5-Quit",0
d6 db "others-Refresh",0
rd dw d1,d2,d3,d4,d5,d6
main:mov ax,0
mov ds,ax...
code segment
table dw fun1,fun2,fun3,fun4
d1 db "1-Clear the screen",0
d2 db "2-Set the foreground color",0
d3 db "3-Set the background color",0
d4 db "4-Scroll up one line",0
d5 db "5-Quit",0
d6 db "others-Refresh",0
rd dw d1,d2,d3,d4,d5,d6
main:mov ax,0
mov ds,ax...
阅读全文 |
评论次数(0) |
浏览次数(522) |
所属类型(汇编作业)
[2013-10-29 14:16] 检测点17.1
对于int 16h的0号中断功能,我认为是对的。因为该功能要循环检测键盘缓冲区中是否有数据,直到有数据。如果IF=0而键盘缓冲区没有数据的话,那么系统将进入死循环。...
阅读全文 |
评论次数(0) |
浏览次数(520) |
所属类型(汇编作业)
[2013-10-29 14:06] 实验16
assume cs:code
code segment
table dw fun1,fun2,fun3,fun4
main:mov ax,0
mov ds,ax
push ds:[7ch*4+2]
push ds:[7ch*4]
mov ds:[7ch*4+2],cs
mov ax,offset int7
mov ds:[7ch*4],ax
mov ah,3
int 7ch
mov dx,9fffh
call delay
mov ah,2
mov al,6
int 7ch
call delay
mov ah,1
mov a...
code segment
table dw fun1,fun2,fun3,fun4
main:mov ax,0
mov ds,ax
push ds:[7ch*4+2]
push ds:[7ch*4]
mov ds:[7ch*4+2],cs
mov ax,offset int7
mov ds:[7ch*4],ax
mov ah,3
int 7ch
mov dx,9fffh
call delay
mov ah,2
mov al,6
int 7ch
call delay
mov ah,1
mov a...
阅读全文 |
评论次数(0) |
浏览次数(514) |
所属类型(汇编作业)
[2013-10-29 14:06] 实验16
assume cs:code
code segment
table dw fun1,fun2,fun3,fun4
main:mov ax,0
mov ds,ax
push ds:[7ch*4+2]
push ds:[7ch*4]
mov ds:[7ch*4+2],cs
mov ax,offset int7
mov ds:[7ch*4],ax
mov ah,3
int 7ch
mov dx,9fffh
call delay
mov ah,2
mov al,6
int 7ch
call delay
mov ah,1
mov a...
code segment
table dw fun1,fun2,fun3,fun4
main:mov ax,0
mov ds,ax
push ds:[7ch*4+2]
push ds:[7ch*4]
mov ds:[7ch*4+2],cs
mov ax,offset int7
mov ds:[7ch*4],ax
mov ah,3
int 7ch
mov dx,9fffh
call delay
mov ah,2
mov al,6
int 7ch
call delay
mov ah,1
mov a...
阅读全文 |
评论次数(0) |
浏览次数(476) |
所属类型(汇编作业)
[2013-10-28 15:53] 检测点16.2
mov ax,data
mov ds,ax...
mov ds,ax...
阅读全文 |
评论次数(0) |
浏览次数(535) |
所属类型(汇编作业)
[2013-10-28 15:46] 检测点16.1
assume cs:code
code segment
a dw 1,2,3,4,5,6,7,8
b dd 0
start:mov si,0
mov cx,8
s:mov ax,a[si]
add word ptr b,ax
adc word ptr b[2],0
add si,2
loop s
mov ax,4c00h
int 21h
code ends
end start...
code segment
a dw 1,2,3,4,5,6,7,8
b dd 0
start:mov si,0
mov cx,8
s:mov ax,a[si]
add word ptr b,ax
adc word ptr b[2],0
add si,2
loop s
mov ax,4c00h
int 21h
code ends
end start...
阅读全文 |
评论次数(0) |
浏览次数(516) |
所属类型(汇编作业)
[2013-10-28 15:31] 实验15
;只是写了代码没有实验,不知行不行
assume cs:codesg
stacksg segment
db 256 dup (0)
stacksg ends
codesg segment
main:mov ax,stacksg
mov ss,ax
mov sp,100h
mov ax,cs
mov ds,ax
mov si,offset int9
mov ax,0
mov es,ax
mov di,204h
mov cx,offset int9end-offset int9
cld
rep movsb
;保存原int 9入口地址
...
assume cs:codesg
stacksg segment
db 256 dup (0)
stacksg ends
codesg segment
main:mov ax,stacksg
mov ss,ax
mov sp,100h
mov ax,cs
mov ds,ax
mov si,offset int9
mov ax,0
mov es,ax
mov di,204h
mov cx,offset int9end-offset int9
cld
rep movsb
;保存原int 9入口地址
...
阅读全文 |
评论次数(0) |
浏览次数(553) |
所属类型(汇编作业)
[2013-10-28 14:12] 检测点15.1
(1)pushf
call dword ptr ds:[0];中断指令用IRET返回,因此pushf不能少
(2)pushf
cli ;设置IF=0
mov word ptr es:[9*4],offset int9
mov es:[9*4+2],cs
popf
...
pushf
cli
pop es:[9*4]
push ds:[2]
pop es:[9*4+2]
popf...
call dword ptr ds:[0];中断指令用IRET返回,因此pushf不能少
(2)pushf
cli ;设置IF=0
mov word ptr es:[9*4],offset int9
mov es:[9*4+2],cs
popf
...
pushf
cli
pop es:[9*4]
push ds:[2]
pop es:[9*4+2]
popf...
阅读全文 |
评论次数(0) |
浏览次数(489) |
所属类型(汇编作业)
[2013-10-25 14:41] 实验14
assume cs:codesg
codesg segment
db 0,2,4,7,8,9
main:mov ax,0b800h
mov ds,ax
mov si,160*24-2
mov ax,codesg
mov es,ax
mov di,0
mov cx,3
s:push cx
mov al,es:[di]
out 70h,al
in al,71h
mov ah,al
mov cl,4
shr ah,cl
and al,0fh
add al,30h
mov [si],al
sub si,2
add ah,30...
codesg segment
db 0,2,4,7,8,9
main:mov ax,0b800h
mov ds,ax
mov si,160*24-2
mov ax,codesg
mov es,ax
mov di,0
mov cx,3
s:push cx
mov al,es:[di]
out 70h,al
in al,71h
mov ah,al
mov cl,4
shr ah,cl
and al,0fh
add al,30h
mov [si],al
sub si,2
add ah,30...
阅读全文 |
评论次数(0) |
浏览次数(505) |
所属类型(汇编作业)
『 查看更多文章 』