Posted on 2014-12-17 09:31
jacky_zz 阅读(317)
评论(0) 编辑 收藏 引用 所属分类:
ASM
org 100h
; add your code here
mov ax, cs
mov ds, ax
mov ax, 0xb800
mov es, ax
xor ax, ax
xor bx, bx
xor dx, dx
mov dl, 0x2f
mov al, dl
shr al, 4
add al, 0x30
cmp al, 0x3a
jl p1
add al, 0x07
p1:
mov es:[bx], al
inc bx
mov es:[bx], 0x0c
inc bx
mov al, dl
and al, 0x0f
add al, 0x30
cmp al, 0x3a
jl p2
add al, 0x07
p2:
mov es:[bx], al
inc bx
mov es:[bx], 0x0c
inc bx
ret