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

我的博客

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

[2013-08-27 20:21] 实验14

图片载入中
assume cs:code
code segment
        start:mov dl,7
        frv:call ShowTime
        jmp frv
        
        mov ax,4c00h
        int 21h
        
        ;功能:显示当前时间
        ;输入:(dl)表示颜色
        ShowTime:push ax
        push cx
        push bx
        push ds
        push es
        push si
        push di
        jmp ShowTime_start
        ShowTime_loc:db 9,8,7,4,2,0
        ShowTime_buf:db "??/??/?? ??:??:??"
        ShowTime_src:db "??/??/?? ??:??:??"
        ShowTime_start:mov ax,cs
        mov ds,ax
        mov es,ax
        mov si,offset ShowTime_buf
        mov di,offset ShowTime_loc
        
        mov cx,6
        ShowTime_next:push cx
        mov al,es:[di]
        out 70h,al
        in al,71h
        mov ah,al
        mov cl,4
        shr ah,cl
        and al,15
        add al,30h
        add ah,30h
        mov bl,[si]
        cmp bl,'?'
        je ShowTime_tobuf
        inc si
        ShowTime_tobuf:mov [si],ah
        inc si
        mov [si],al
        inc si
        inc di
        pop cx
        loop ShowTime_next
        
        mov ax,0b800h
        mov es,ax
        mov di,160*12+31*2
        mov si,offset ShowTime_buf
        mov cx,17
        ShowTime_show:mov al,[si]
        mov es:[di],al
        inc si
        inc di
        mov es:[di],dl
        inc di
        loop ShowTime_show
        
        mov cx,17
        mov ax,cs
        mov es,ax
        mov di,offset ShowTime_buf
        mov ds,ax
        mov si,offset ShowTime_src
        rep movsb
        
        pop di
        pop si
        pop es
        pop ds
        pop bx
        pop cx
        pop ax
        ret
code ends
end start
评论次数(0)  |  浏览次数(423)  |  类型(汇编作业) |  收藏此文  | 
 
 请输入验证码  (提示:点击验证码输入框,以获取验证码