- [hanlsheng] assume cs:codesg, ds:data data segment db 'welc 09/02 22:56
- [游客] 成功了 06/02 15:40
- [游客] Dim m As Long Private Sub Command1_Click() ti 05/12 23:44
- [十堰职院09211014] 好东西啊,不搜藏太可惜了啊 顶!! 04/16 19:22
- [fsx001] 不错 01/06 18:37
- [njutyangxiao] 好东西啊, 09/21 21:16
- [lchangmiao] assume cs:code data segment db 'Welcome to masm 07/24 18:02
- [游客] csdn里的文件好象下不了了,总是到一定百分比就不能下. 06/25 22:06
- [游客] csdn里面下载速度好慢~~ 06/25 21:41
- [tomato] 非常不错。可以在实模式下面再试一下。 06/12 10:03
[2009-05-22 20:02] 实验14
assume cs:codesg,ds:datasg
datasg segment
db 'yy/mm/dd hh:mm:ss','$'
datasg ends
codesg segment
start: mov ax,datasg
mov ds,ax
mov si,0
;处理年,月,日数据
mov cx,3
mov bl,9
s: mov al,bl
out 70h,al
in al,71h
mov ah,al
push cx
mov cl,4
shr ah,cl ;十位数字
and al,00001111b
add ah,30h
add al,30h
mov [si],ah
mov [si+1],al
dec bl
add si,3
pop cx
loop s
;处理时分秒数据
mov cx,3
mov bl,4
s1: mov al,bl
out 70h,al
in al,71h
mov ah,al
push cx
mov cl,4
shr ah,cl ;十位数字
and al,00001111b
add ah,30h
add al,30h
mov [si],ah
mov [si+1],al
sub bl,2
add si,3
pop cx
loop s1
;调用dos中断显示时间数据
mov dx,0
mov ah,9
int 21h
;程序退出
mov ax,4c00h
int 21h
codesg ends
end start
datasg segment
db 'yy/mm/dd hh:mm:ss','$'
datasg ends
codesg segment
start: mov ax,datasg
mov ds,ax
mov si,0
;处理年,月,日数据
mov cx,3
mov bl,9
s: mov al,bl
out 70h,al
in al,71h
mov ah,al
push cx
mov cl,4
shr ah,cl ;十位数字
and al,00001111b
add ah,30h
add al,30h
mov [si],ah
mov [si+1],al
dec bl
add si,3
pop cx
loop s
;处理时分秒数据
mov cx,3
mov bl,4
s1: mov al,bl
out 70h,al
in al,71h
mov ah,al
push cx
mov cl,4
shr ah,cl ;十位数字
and al,00001111b
add ah,30h
add al,30h
mov [si],ah
mov [si+1],al
sub bl,2
add si,3
pop cx
loop s1
;调用dos中断显示时间数据
mov dx,0
mov ah,9
int 21h
;程序退出
mov ax,4c00h
int 21h
codesg ends
end start
评论次数(1) |
浏览次数(914) |
类型(汇编作业) |
收藏此文 |