ax中的十六进制数据以ascii码的形式显示出来
ax中的十六进制数据以ascii码的形式显示出来
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
assume cs:code,ds:data
data segment
mem db 4 dup(?),'$'
data ends
code segment
start:
mov ax,data
mov ds,ax
lea di,mem
mov ax,2a49h
call tiaoAL
mov al,ah
call tiaoAL
lea dx,mem
mov ah,09h
int 21h
mov ah,4ch
int 21h
tiaoAL:
push ax
call tiao
mov [di],al
inc di
pop ax
mov cl,4
shr al,cl
call tiao
mov [di],al
inc di
ret
tiao:
and al,0fh
daa
add al,0f0h
adc al,40h
ret
code ends
end start