我需要获取系统时间并打印出来。问题是我不知道如何打印它。我下面有一个代码,我不知道我错在哪里。下面只写了时间的小时部分。谢谢!:)
pc macro a
mov ah, 02
mov dl, a
int 21h
endm
cseg segment para 'code'
assume cs:cseg; ds:cseg; ss:cseg; es:cseg
org 100h
start: jmp begin
hr db '0'
begin:
mov ax, 03h ;clear screen
int 10h
mov ah, 2Ch
int 21h
mov hr1, ch
mov bx, 10
mov ah, 0
mov al, hr1
idiv bx
add al, '0'
add ah, '0'
mov hr, al
pc hr
mov hr, ah
pc hr
int 20h
cseg ends
end start