展开全部
运行结果:
00H
01H
02H
03H
04H
05H
06H
07H
08H
09H
0AH
0BH
0CH
0DH
0EH
0FH
10H
11H
12H
13H
14H
15H
16H
17H
18H
19H
1AH
1BH
1CH
1DH
1EH
1FH
20H
21H !
22H "
23H #
24H $
25H %
26H &
27H '
28H (
29H )
2AH *
后略
DATAS SEGMENT
MSG DB 0,0,"H ","$"
CR DB 13,10,"$"
TAB1 DB "0123456789ABCDEF"
DATAS ENDS
STACKS SEGMENT
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,ES:DATAS,SS:STACKS
START:
MOV AX,DATAS
MOV DS,AX
MOV ES,AX
MOV CX,255
MOV DL,0
MOV SI,OFFSET TAB1
MOV DI,OFFSET MSG
AG: PUSH CX
PUSH DX
MOV AX,0
MOV AL,DL
MOV BL,10H
DIV BL
MOV BX,0
MOV BL,AH
MOV DH,[SI+BX]
MOV [DI+1],DH
MOV BL,AL
MOV DH,[SI+BX]
MOV [DI],DH
PUSH DX
MOV DX,OFFSET MSG
MOV AH,9
INT 21H
POP DX
MOV AH,2
INT 21H
PUSH AX
MOV DX,OFFSET CR
MOV AH,9
INT 21H
POP DX
POP DX
POP CX
INC DL
LOOP AG
MOV AH,4CH
INT 21H
CODES ENDS
END START
00H
01H
02H
03H
04H
05H
06H
07H
08H
09H
0AH
0BH
0CH
0DH
0EH
0FH
10H
11H
12H
13H
14H
15H
16H
17H
18H
19H
1AH
1BH
1CH
1DH
1EH
1FH
20H
21H !
22H "
23H #
24H $
25H %
26H &
27H '
28H (
29H )
2AH *
后略
DATAS SEGMENT
MSG DB 0,0,"H ","$"
CR DB 13,10,"$"
TAB1 DB "0123456789ABCDEF"
DATAS ENDS
STACKS SEGMENT
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,ES:DATAS,SS:STACKS
START:
MOV AX,DATAS
MOV DS,AX
MOV ES,AX
MOV CX,255
MOV DL,0
MOV SI,OFFSET TAB1
MOV DI,OFFSET MSG
AG: PUSH CX
PUSH DX
MOV AX,0
MOV AL,DL
MOV BL,10H
DIV BL
MOV BX,0
MOV BL,AH
MOV DH,[SI+BX]
MOV [DI+1],DH
MOV BL,AL
MOV DH,[SI+BX]
MOV [DI],DH
PUSH DX
MOV DX,OFFSET MSG
MOV AH,9
INT 21H
POP DX
MOV AH,2
INT 21H
PUSH AX
MOV DX,OFFSET CR
MOV AH,9
INT 21H
POP DX
POP DX
POP CX
INC DL
LOOP AG
MOV AH,4CH
INT 21H
CODES ENDS
END START
展开全部
汇编不会,这里有个TC下的。
main(){
int i,j;
printf(" ");
for (j=0;j<=15;j++) printf(" %X",j);
printf("\n");
for (i=0;i<=15;i++){
printf(" %X",i);
for (j=0;j<=15;j++) printf("%c ",i*16+j);
printf("\n");
}
}
运行结果如下:
0 1 2 3 4 5 6 7 8 9 A B C D E F
0 ☺ ☻ ♥ ♦ ♣ ♠
♫ ☼
1► ◄ ↕ ‼ ¶ § ▬ ↨ ↑ ↓ ← ∟ ↔ ▲ ▼
2 ! " # $ % & ' ( ) * + , - . /
30 1 2 3 4 5 6 7 8 9 : ; < = > ?
4@ A B C D E F G H I J K L M N O
5P Q R S T U V W X Y Z [ \ ] ^ _
6` a b c d e f g h i j k l m n o
7p q r s t u v w x y z { | } ~ ⌂
8Ç ü é â ä à å ç ê ë è ï î ì Ä Å
9É æ Æ ô ö ò û ù ÿ Ö Ü ¢ £ ¥ ₧ ƒ
Aá í ó ú ñ Ñ ª º ¿ ⌐ ¬ ½ ¼ ¡ « »
B░ ▒ ▓ │ ┤ ╡ ╢ ╖ ╕ ╣ ║ ╗ ╝ ╜ ╛ ┐
C└ ┴ ┬ ├ — ┼ ╞ ╟ ╚ ╔ ╩ ╦ ╠ ═ ╬ ╧
D╨ ╤ ╥ ╙ ╘ ╒ ╓ ╫ ╪ ┘ ┌ █ ▄ ▌ ▐ ▀
Eα ß Γ π ∑ σ µ τ Φ Θ Ω δ ∞ φ ε ∩
F≡ ± ≥ ≤ ⌠ ⌡ ÷ ≈ ° ∙ · √ ⁿ ² ■
main(){
int i,j;
printf(" ");
for (j=0;j<=15;j++) printf(" %X",j);
printf("\n");
for (i=0;i<=15;i++){
printf(" %X",i);
for (j=0;j<=15;j++) printf("%c ",i*16+j);
printf("\n");
}
}
运行结果如下:
0 1 2 3 4 5 6 7 8 9 A B C D E F
0 ☺ ☻ ♥ ♦ ♣ ♠
♫ ☼
1► ◄ ↕ ‼ ¶ § ▬ ↨ ↑ ↓ ← ∟ ↔ ▲ ▼
2 ! " # $ % & ' ( ) * + , - . /
30 1 2 3 4 5 6 7 8 9 : ; < = > ?
4@ A B C D E F G H I J K L M N O
5P Q R S T U V W X Y Z [ \ ] ^ _
6` a b c d e f g h i j k l m n o
7p q r s t u v w x y z { | } ~ ⌂
8Ç ü é â ä à å ç ê ë è ï î ì Ä Å
9É æ Æ ô ö ò û ù ÿ Ö Ü ¢ £ ¥ ₧ ƒ
Aá í ó ú ñ Ñ ª º ¿ ⌐ ¬ ½ ¼ ¡ « »
B░ ▒ ▓ │ ┤ ╡ ╢ ╖ ╕ ╣ ║ ╗ ╝ ╜ ╛ ┐
C└ ┴ ┬ ├ — ┼ ╞ ╟ ╚ ╔ ╩ ╦ ╠ ═ ╬ ╧
D╨ ╤ ╥ ╙ ╘ ╒ ╓ ╫ ╪ ┘ ┌ █ ▄ ▌ ▐ ▀
Eα ß Γ π ∑ σ µ τ Φ Θ Ω δ ∞ φ ε ∩
F≡ ± ≥ ≤ ⌠ ⌡ ÷ ≈ ° ∙ · √ ⁿ ² ■
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询