.model small
.stack
.data
intoff dw ?
intseg dw ?
.code
.startup
mov ax,351ch
int 21h
mov intoff,bx
mov intseg,es
push ds
mov dx,offset newint1ch
mov ax,seg newint1ch
mov ds,ax
mov ah,251ch
int 21h
pop ds
;
;int 1ch
;
again:mov ah,02h
int 21h
cmp al,'q'
jne again
mov dx,intoff
mov ax,intseg
mov ds,ax
mov ax,251ch
int 21h
.exit 0
newint1ch proc
sti
cld
mov ax,b800h
mov es,ax
xor di,di
mov ah,02h
int 1ch
push dx
push cx
push cx
and ch,f0h
shr ch,1
shr ch,1
shr ch,1
shr ch,1
add ch,30
mov al,ch
stosw ;存储小时高4位
pop cx
and ch,0fh
add ch,30
mov al,ch
stosw ;存储小时低4位
and cl,f0h
shr cl,1
shr cl,1
shr cl,1
shr cl,1
add cl,30
mov al,cl
stosw ;存储分钟高4位
pop cx
and cl,0fh
add cl,30
mov al,cl
stosw ;存储分钟低4位
and dh,f0h
shr dh,1
shr dh,1
shr dh,1
shr dh,1
add dh,30
mov al,dh
stosw ;存储秒高4位
pop dx
and dh,0fh
add dh,30
mov al,dh
stosw ;存储秒低4位
iret
newint1ch endp
end
我的编译器说不支持