汇编网首页登录博客注册
chinatree的学习博客
博客首页博客互动【做检测题】论坛求助

我的博客

个人首页 |  我的文章 |  我的相册 |  我的好友 |  最新访客 |  文章收藏 |  论坛提问 |  友情链接 |  给我留言  
图片载入中
学习动态
友情链接

[2011-09-04 20:01] 第14章检测点及实验14

检测点14·1
(1)编程,读取CMOS RAM的2号单元的内容。
assume cs:code
code segment
start:mov al,2
out 70h,al
in al,71h
mov ax,4c00h
int 21h
code ends
end start

(2)编程,向CMOS RAM的2号单元写入0。
assume cs:code
code segment
start:mov al,2
out 70h,al
mov al,0
out 71h,al
mov ax,4c00h
int 21h
code ends
end start


检测点 14·2
编程,用加法和移位指令计算(ax)=(ax)*10
提示,(ax)*10=(ax)*2+(ax)*8
assume cs:code
code segment
s:mov bx,ax
shl ax,1
mov cl,3
shl bx,cl
add ax,bx
mov ax,4c00h
int 21h
code ends
end s



实验 14 访问cmos ram
编程,以“年/月/日 时:分:秒”的格式,显示当前的日期、时间。
注意:cmos ram中存储着系统的配置信息,除了保存时间信息的单元外不要向其他的单元中写入内容,否则将引起一些系统错误。

assume cs:code
code segment
db 9,8,7,4,2,0
db "// :: "
s:mov ax,cs
mov ds,ax
mov ax,0b872h
mov es,ax
xor di,di
xor si,si
mov cx,6
s1:mov al,[si]
out 70h,al
in al,71h
mov ah,al
shr ah,1
shr ah,1
shr ah,1
shr ah,1
and al,0fh
add ax,3030h
mov es:[di],ah
mov ah,2
mov es:[di+1],ah
mov es:[di+2],ax
mov al,[si+6]
mov es:[di+4],ax
inc si
add di,6
loop s1
in al,60h
cmp al,10h
jnz s
mov ax,3100h
int 21h
code ends
end s
评论次数(2)  |  浏览次数(341)  |  类型(汇编作业) |  收藏此文  | 

[  tomato   发表于  2011-09-04 20:36  ]

没问题。

[  chinatree   发表于  2011-09-04 20:58  ]

谢谢,我截了下屏,2兆多,传不上来。

 
 请输入验证码  (提示:点击验证码输入框,以获取验证码