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

我的博客

个人首页 |  我的文章 |  我的相册 |  我的好友 |  最新访客 |  文章收藏 |  论坛提问 |  友情链接 |  给我留言  
图片载入中
  •  我要做些我能做的事情,不能老是睡下去了!
  • 『姓名』:;-)               
  • 『性别』:男    『发送消息
  • 个人说明:我的小老鼠;-)
  • 详细信息『加为好友』
学习动态

[2008-01-18 11:21] 实验14 实现了动态显示时间的功能,按 'q' 键退出

图片载入中
;该程序 实现了动态显示时间的功能,按 'q' 键退出。

assume cs:code
code segment

        s1: db 9,8,7,4,2,0
        s2: dw 0,0,0,0,0,0
        s3: db '/','/',' ',':',':',' '

start:
        mov ax,cs
        mov ds,ax
        mov bx,offset s1
        mov si,offset s2

        mov cx,6
reads:  push cx
        mov al,[bx]
        out 70h,al
        in al,71h
        mov ah,al
        mov cl,4
        shr ah,cl
        and al,00001111b

        add ah,30h
        add al,30h
        mov [si],ah
        mov [si+1],al
        inc bx
        add si,2
        pop cx
        loop reads

        mov ax,0b800h
        mov es,ax
        mov bx,160*12+40*2
        mov si,offset s2
        mov di,offset s3

        mov ah,2
        mov cx,6
show:   mov al,[si]
        mov es:[bx],al 
        mov es:[bx+1],ah
        add bx,2
        mov al,[si+1]
        mov es:[bx],al 
        mov es:[bx+1],ah
        add bx,2
        mov al,[di]
        mov es:[bx],al 
        mov es:[bx+1],ah

        add bx,2
        add si,2
        inc di
        loop show

        in al,60h   
        cmp al,10h  
        jne start   

        mov ax,4c00h
        int 21h

code ends
end start
评论次数(1)  |  浏览次数(1080)  |  类型(汇编作业) |  收藏此文  | 

[  cxn   发表于  2008-01-18 14:28  ]

好 支持一下.

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