assume cs:code
code segment
one: push cs
pop es
lea bx,y
mov ah,3
mov al,4
mov ch,0
mov cl,1
mov dh,0
mov dl,0
int 13h ;写入软盘
mov ax,4c00h
int 21h
org 7c00h
y: mov ax,0
mov es,ax
mov bx,7e00h...


- [youxiwt] 我直接用软盘。 06/19 09:45
- [younggay] 博主用什么环境做的实验啊? 06/18 09:28
- [tomato] 没问题。 06/15 14:51
- [tomato] 正确。 06/12 09:18
- [tomato] 正确。 06/10 16:43
- [游客] 正确。 06/10 16:32
- [游客] shl bx,cl 06/09 16:47
- [游客] It is not right error by shl bx,cx 06/08 16:42
- [youxiwt] 第二题 是错了 mov ds,ax改为 mov es,ax 不过第一题结果是没错的呀, 我d 06/08 13:12
- [游客] 第一题中 add _____a[16],ax adc _____a[18],0 不对。 06/08 11:03
[2009-06-18 07:36] 课程设计2
阅读全文 |
评论次数(2) |
浏览次数(888) |
所属类型(汇编作业)
[2009-06-14 06:28] 实验17
;包含多个功能子程序的中断例程
assume cs:code
code segment
start: mov ax,cs
mov ds,ax
mov ax,0
mov es,ax
mov si,offset int7ch
mov di,200h
mov cx,offset int7chend-offset int7ch
cld
rep movsb ;复制新int7ch中断到地址0:200h处
mov ax,0
mov es,ax
cli
mov word ptr es:[7ch*4],200h
mov word ptr es:[7ch*4+2],0
...
assume cs:code
code segment
start: mov ax,cs
mov ds,ax
mov ax,0
mov es,ax
mov si,offset int7ch
mov di,200h
mov cx,offset int7chend-offset int7ch
cld
rep movsb ;复制新int7ch中断到地址0:200h处
mov ax,0
mov es,ax
cli
mov word ptr es:[7ch*4],200h
mov word ptr es:[7ch*4+2],0
...
阅读全文 |
评论次数(1) |
浏览次数(842) |
所属类型(汇编作业)
[2009-06-11 18:17] 检测点17.1
“在int 16h中断例程中,一定有设置IF=1的指令。”这种说法对吗?
对,因为int 16h中断例程有发现键盘缓冲区空,则循环等待键盘输入的功能。所以必需要设IF中断位为1才能实现接受键盘的输入。...
对,因为int 16h中断例程有发现键盘缓冲区空,则循环等待键盘输入的功能。所以必需要设IF中断位为1才能实现接受键盘的输入。...
阅读全文 |
评论次数(1) |
浏览次数(900) |
所属类型(汇编作业)
[2009-06-10 14:29] 实验16
编写包含多个功能子程序的中断例程
入口参数说明如下。
(1)用ah寄存器传递功能号:0表示清屏,1表示设置前景色,2表示设置背景色,
3表示向上滚动一行;
(2)对于2,3号功能,用al传递颜色(al)∈{0,1,2,3,4,5,6,7}。
assume cs:code
code segment
start: mov ax,0
mov es,ax
mov di,200h
mov ax,cs
mov ds,ax
mov si,offset screen
mov cx,offset screenend-offset screen
cld
rep m...
入口参数说明如下。
(1)用ah寄存器传递功能号:0表示清屏,1表示设置前景色,2表示设置背景色,
3表示向上滚动一行;
(2)对于2,3号功能,用al传递颜色(al)∈{0,1,2,3,4,5,6,7}。
assume cs:code
code segment
start: mov ax,0
mov es,ax
mov di,200h
mov ax,cs
mov ds,ax
mov si,offset screen
mov cx,offset screenend-offset screen
cld
rep m...
阅读全文 |
评论次数(1) |
浏览次数(865) |
所属类型(汇编作业)
[2009-06-06 16:12] 笫十六章 检测点
检测点16.1
下面的程序将code段a处的8个数据累加,结果存储到b处的双字中,补全程序。
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 _____a[16],ax
adc _____a[18],0
add si,_____2
loop s
mov ax,4c00h
int 21h
code ends
end start
检测点16.2
下面的程序将data段中...
下面的程序将code段a处的8个数据累加,结果存储到b处的双字中,补全程序。
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 _____a[16],ax
adc _____a[18],0
add si,_____2
loop s
mov ax,4c00h
int 21h
code ends
end start
检测点16.2
下面的程序将data段中...
阅读全文 |
评论次数(2) |
浏览次数(859) |
所属类型(汇编作业)
[2009-06-04 16:16] 实验15
程序名:新int 9中断例程
功能: 在DOS下,按下"A"键后,除非不再松开,如果松开,就显示满屏幕的"A",其他的键照常处理.
说明:在WINDOWS下的DOS运行不了.
assume cs:code,ss:stack
stack segment
db 128 dup (0)
stack ends
code segment
start: mov ax,stack
mov ss,ax
push cs
pop ds
mov si,offset int9
mov ax,0
mov es,ax
mov di,204h
mov cx,offse...
功能: 在DOS下,按下"A"键后,除非不再松开,如果松开,就显示满屏幕的"A",其他的键照常处理.
说明:在WINDOWS下的DOS运行不了.
assume cs:code,ss:stack
stack segment
db 128 dup (0)
stack ends
code segment
start: mov ax,stack
mov ss,ax
push cs
pop ds
mov si,offset int9
mov ax,0
mov es,ax
mov di,204h
mov cx,offse...
阅读全文 |
评论次数(1) |
浏览次数(926) |
所属类型(汇编作业)
[2009-06-02 18:44] 第十五章
检测点15.1
(1)仔细分析一下上面的int9中断例程,看看是否可以精简一下?
对于程序段:
pushf
pushf
pop ax
and ah,11111100b
push ax
popf
call dword ptr ds:[0]
可以精简为:
__________pushf
__________call dword ptr ds:[0]
两条指令。
(2)仔细分析上面程序中的主程序,看看有什么潜在的问题?
在主程序中,如果在执行设置int9中断例程的段地址和偏移地址的指令之间发生了
键盘中断,则CPU将转去一个错误的地址执行,将发生错误。 ...
(1)仔细分析一下上面的int9中断例程,看看是否可以精简一下?
对于程序段:
pushf
pushf
pop ax
and ah,11111100b
push ax
popf
call dword ptr ds:[0]
可以精简为:
__________pushf
__________call dword ptr ds:[0]
两条指令。
(2)仔细分析上面程序中的主程序,看看有什么潜在的问题?
在主程序中,如果在执行设置int9中断例程的段地址和偏移地址的指令之间发生了
键盘中断,则CPU将转去一个错误的地址执行,将发生错误。 ...
阅读全文 |
评论次数(1) |
浏览次数(649) |
所属类型(汇编作业)
[2009-05-30 08:59] 实验十四 访问CMOS RAM
assume cs:code
code segment
start: mov al,9
out 70h,al
in al,71h
call bcd_char
mov si,160*12+40*2
mov ch,2fh
call show
mov al,8
out 70h,al
in al,71h
call bcd_char
add si,6
mov ch,2fh
call show
mov al,7
out 70h,al
in al,71h
call bcd_char
add si,6
mov ch,20...
code segment
start: mov al,9
out 70h,al
in al,71h
call bcd_char
mov si,160*12+40*2
mov ch,2fh
call show
mov al,8
out 70h,al
in al,71h
call bcd_char
add si,6
mov ch,2fh
call show
mov al,7
out 70h,al
in al,71h
call bcd_char
add si,6
mov ch,20...
阅读全文 |
评论次数(2) |
浏览次数(567) |
所属类型(汇编作业)
[2009-05-30 08:56] 笫十四章 作业
检测点14.1
1.编程,读取CMOS RAM的2号单元的内容。
assume cs:codesg
codesg segment
begin: mov al,2
out 70h,al
in al,71h
mov ax,4c00h
int 21h
codesg ends
end begin
2.编程,读取CMOS RAM的2号单元写入0。
assume cs:codesg
codesg segment
begin: mov al,2
out 70h,al
mov al,0
out 71,al
mov ax,4c00h
int 21...
1.编程,读取CMOS RAM的2号单元的内容。
assume cs:codesg
codesg segment
begin: mov al,2
out 70h,al
in al,71h
mov ax,4c00h
int 21h
codesg ends
end begin
2.编程,读取CMOS RAM的2号单元写入0。
assume cs:codesg
codesg segment
begin: mov al,2
out 70h,al
mov al,0
out 71,al
mov ax,4c00h
int 21...
阅读全文 |
评论次数(3) |
浏览次数(859) |
所属类型(汇编作业)
[2009-05-27 08:03] 实验13
实验13 编写,应用中断例程
(1)编写并安装int 7ch中断例程,功能为实现一个用0结束的字符串,中断例程安装在0:200h处。
参数: dh=行号,dl=列号,cl=颜色,ds:si指向字符串首地址。
新int 7ch中断
assume cs:code
code segment
start: mov ax,cs
mov ds,ax
mov si,offset show
mov ax,0
mov es,ax
mov di,200h
mov cx,offset showend-offset show
cld
rep movsb
m...
(1)编写并安装int 7ch中断例程,功能为实现一个用0结束的字符串,中断例程安装在0:200h处。
参数: dh=行号,dl=列号,cl=颜色,ds:si指向字符串首地址。
新int 7ch中断
assume cs:code
code segment
start: mov ax,cs
mov ds,ax
mov si,offset show
mov ax,0
mov es,ax
mov di,200h
mov cx,offset showend-offset show
cld
rep movsb
m...
阅读全文 |
评论次数(1) |
浏览次数(636) |
所属类型(汇编作业)