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

我的博客

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

[2011-10-14 15:52] 实验十四:显示ROM中的时间<y/m/d h:m:s>

图片载入中
assume cs:codesg

datasg segment
         db 6 dup (0)
         db 'xx/xx/xx xx:xx:xx',24h
datasg ends

stacksg segment
    dw 10 dup (0)
stacksg ends

codesg segment
start:
        mov ax,datasg
        mov ds,ax

        mov ax, stacksg
        mov ss, ax
        mov sp, 20

        mov bx, 0
        mov cx, 3
        mov dl, 0
        
  @@:   mov al,dl
        out 70h,al
        in al,71h
        mov ds:[bx],al
        inc bx
        add dl, 2
        loop @B

        mov bx, 3
        mov dl, 7
        mov cx, 3
  @@:   mov al,dl
        out 70h,al
        in al,71h
        mov ds:[bx],al
        inc dl
        inc bx
        loop @B

        
        mov cx, 6
        mov bx, 5
        mov bp, 6
        
   @@:  push cx
        mov al, ds:[bx]
        mov ah, al
        mov cl, 4
        shr ah, cl
        and al, 00001111B
        add ah, 30h
        add al, 30h
        mov ds:[bp], ah
        mov ds:[bp+1], al
        add bp, 3
        dec bx
        pop cx
        loop @B

              
        mov ah,9h
        mov dx,6
        int 21h
        
        mov ax, 4c00h
        int 21h
codesg ends
end start
评论次数(1)  |  浏览次数(364)  |  类型(汇编作业) |  收藏此文  | 

[  chinatree   发表于  2011-10-15 01:48  ]

编译器不错,支持@@了。当然程序也不错。

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