- [游客] 如果不加ds:就是相当于一下的语句 mov al,16 mov al,17 mov al,18 10/31 00:12
- [chinatree] 编译器不错,支持@@了。当然程序也不错。 10/15 01:48
- [hitlerdsaf] 中间跳转的时候二级跳了,提示jump out of range ,我晕倒。二级跳显得非常不好看。唉 10/12 18:40
- [chinatree] 作业类型有编辑文章的功能,你可以修改下。 09/30 20:15
- [hitlerdsaf] 6、1 1 2 2 4 7、512 256 第6、7题答案更正 09/30 17:28
- [hitlerdsaf] MOV AL 02H ADD AL, AL ADD AL, AL ADD AL, AL 09/29 15:26
- [chinatree] 全对。 09/29 15:23
[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
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) |
类型(汇编作业) |
收藏此文 |