?? tm.asm
字號:
code segment
assume cs:code,ds:code
org 100h
start: jmp install
msg db 'Current time is: '
time0 db ?,?
db ':'
time1 db ?,?
db ':'
time2 db ?,?,0,0
oldint1c dd ?
newint1c: push ax
push bx
push cx
push dx
push si
push di
push es
mov ax,0200h
int 1ah
mov al,ch
lea si,time0
call bcd
mov al,cl
lea si,time1
call bcd
mov al,dh
lea si,time2
call bcd
mov ax,0b800h
mov es,ax
mov di,54*2d
lea si,msg
disp: mov al,cs:[si]
inc si
or al,al
jz disp0
cld
stosb
inc di
jmp disp
disp0: pop es
pop di
pop si
pop dx
pop cx
pop bx
pop ax
jmp cs:oldint1c
bcd: mov ah,al
shr ah,1
shr ah,1
shr ah,1
shr ah,1
and al,0fh
add ax,'00'
xchg ah,al
mov cs:[si],ax
ret
install: push cs
pop ds
mov ax,351ch
int 21h
mov word ptr oldint1c,bx
mov word ptr oldint1c+2,es
lea dx,newint1c
mov ax,251ch
int 21h
mov dx,offset install+120h
mov cl,04h
shr dx,cl
mov ah,31h
int 21h
code ends
end start
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -