times.asm
来自「是一个将16进制转为ASC显示的程序」· 汇编 代码 · 共 45 行
ASM
45 行
use16
org 100h
jmp start
msg:
db 'Current Time is:'
hour dw 0
db ':'
minute dw 0
db ':'
second dw 0
db '$'
len =$-msg
start:
mov ah,2
int 01ah
mov byte [hour],ch
mov byte [minute],cl
mov byte [second],dh
mov bx,hour
mov al,byte [hour]
call hta
mov bx,minute
mov al,byte [minute]
call hta
mov bx,second
mov al,byte [second]
call hta
mov ah,9
mov dx,msg
int 21h
mov ah,0
int 16h
exit:
mov ax,4c00h
int 021h
hta: ;hex to asc
cbw
mov cl,10h
div cl
add ax,'00'
mov [bx],ax
ret
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?