|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
assume cs:code
code segment
s: db '00/00/00 00:00:00'
se: nop
row: db 9,8,7,4,2,0
start: call near ptr change ;改写字符串
call near ptr show ;显示字符串
mov ax,4c00h
int 21h
change: mov ax,cs
mov ds,ax
mov si,offset s
mov bx,offset row
mov cx,6
lp: mov al,[bx]
out 70h,al
in al,71h
push cx
mov ah,al
mov cl,4
shr ah,cl
and al,00001111b
add ah,30h
add al,30h
mov byte ptr [si],ah
mov byte ptr [si+1],al
add si,3
inc bx
pop cx
loop lp
ret
show: mov si,offset s
mov ax,0b800h
mov es,ax
mov di,160*12+30*2
mov cx,offset se -offset s
mov dl,11100001b
lp1: mov al,[si]
mov byte ptr es:[di],al
inc di
mov byte ptr es:[di],dl
inc di
inc si
loop lp1
ret
code ends
end start
|
|