📄 电子表.txt
字号:
data segment
buf1 db 'current time is: $'
buf2 db 10
db 10 dup(?)
data ends
stack segment stack
db 100 dup(?)
stack ends
code segment
assume cs:code, ds:data
assume ss:stack
cursor macro row,clm
mov ah,2
mov bh,0
mov dh,row
mov dl,clm
int 10h
endm
win macro rowl,clml,rowr,clmr,color
mov ah,6
mov al,0
mov ch,rowl
mov cl,clml
mov dh,rowr
mov dl,clmr
mov bh,color
int 10h
endm
ascbcd macro reg
inc bx
inc bx
mov reg,[bx]
mov cl,4
shl reg,cl
inc bx
mov al,[bx]
and al,0fh
or reg,al
endm
bcdasc macro reg
inc bx
inc bx
mov al,reg
mov cl,4
shr al,cl
or al,30h
mov [bx],al
inc bx
mov al,reg
and al,0fh
or al,30h
mov [bx],al
endm
incbcd macro reg,count
mov al,reg
inc al
daa
mov reg,al
cmp al,count
jnz dispy
mov reg,0
endm
strdspy macro adrs
lea dx,adrs
mov ah,9
int 21h
endm
clock proc far
start: push ds
mov ax,0
push ax
mov ax,data
mov ds,ax
win 0,0,24,79,7;
win 9,28,15,52,01010111b
cursor 11,32
strdspy buf1
cursor 13,36
lea dx,buf2
mov ah,0ah
int 21h
lea bx,buf2
ascbcd ch
ascbcd dh
ascbcd dl
timer: call dely
incbcd bl,60h
incbcd dh,60h
incbcd ch,24h
dispy: lea bx,buf2
bcdasc ch
bcdasc dh
bcdasc dl
inc bx
mov al,'$'
mov [bx],al
push dx
cursor 13,36
strdspy buf2
pop dx
jmp timer
dely proc
push cx
push ax
mov ax,3fffh
x1: mov cx,0ffffh
x2: dec cx
jne x2
dec ax
jne x1
pop ax
pop cx
ret
dely endp
clock endp
code ends
end start
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -