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

我的博客

个人首页 |  我的文章 |  我的相册 |  我的好友 |  最新访客 |  文章收藏 |  论坛提问 |  友情链接 |  给我留言  
图片载入中
  •  相信自己,没有什么是不可能的.
  • 『姓名』:保密
  • 『性别』:男『发送消息
  • 个人说明:我是一个电脑爱好者,同时也喜欢音乐,喜欢静静地思考,不喜欢体育,也不喜欢太喧嚣的地方。
  • 详细信息『加为好友』
学习动态
文章收藏
友情链接

[2009-09-10 16:30] 实验14 将当前时间以年/月/日 时:分:秒的格式显示在屏幕中央

;编程在屏幕中间显示当前年、月、日、时、分、秒
;资料:秒0分2时4日7月8年9
;这6个信息分别用bx,dx,ax来存储
assume cs:code
code segment
start:        mov si,12*160+68
        mov al,9h
        jmp short s
s1:        mov al,8h
        jmp short s
s2:        mov al,7h
        jmp short s
s3:        mov al,4h
        jmp short s
s4:        mov al,2h
        jmp short s
s5:        mov al,0h
s:        out 70h,al
        mov bh,al;取得AL值用以决定跳转点
        in al,71h
        mov ah,al
        mov cl,4
        shr ah,cl
        and al,00001111b
        add ah,30h
        add al,30h
        call print
        cmp bh,9h
        je s1
        cmp bh,8h
        je s2
        cmp bh,7h
        je s3
        cmp bh,4h
        je s4
        cmp bh,2h
        je s5        
        mov ax,4c00h
        int 21h
print:        mov dx,0b800h
        mov ds,dx        
        mov [si],ah
        mov [si+2],al
        cmp bh,7
        ja  t1;大于7则
        je t2
        cmp bh,0
        je t
        mov byte ptr [si+4],':'
        jmp t3
t1:        mov byte ptr [si+4],'/'
        jmp t3
t2:        mov byte ptr [si+4],' '
t3:        add si,6
t:        ret
code ends
end start
评论次数(1)  |  浏览次数(577)  |  类型(汇编作业) |  收藏此文  | 

[  lwbfq   发表于  2009-09-10 18:50  ]

没问题,博主继续努力。

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