汇编语言问题,求高手解决,emu8086上要能运行且对题,能运行就给分。发送到邮箱keke2141@163.com。

2024-12-15 12:35:42
推荐回答(1个)
回答1:

显示汉字的程序如下,可以在 PC 机上正常显示。
emu8086,能否显示,就不知道了。
;======================================================
CODE SEGMENT
ASSUME CS:CODE, DS:CODE
ORG 100H
START:
PUSH CS
POP DS
MOV AH, 0FH ;读取当前显示方式.
INT 10H
PUSH AX
MOV AX, 12H ;设置点阵显示
INT 10H
MOV AX, 0A000H ;显示缓存段地址
MOV ES, AX
CLD
LEA SI, DOT
MOV DI, (30 * 80 + 10) * 2
MOV CX, CNT / 2 ;=16
Q1:
; MOVSB ;SI加一, DI加一.
; MOVSB ;SI加一, DI加一.
MOVSW
ADD DI, 78 ;相当是加上80
LOOP Q1
MOV AH, 0 ;等待按键.
INT 16H
POP AX
MOV AH, 00H ;恢复原来的显示方式.
INT 10H
MOV AH, 4CH
INT 21H
;****字模点阵**** 32字节, 是一个16*16的汉字
;
DOT DB 00H, 3CH, 47H,0C0H, 32H, 48H, 11H, 50H, 8FH,0FEH, 61H, 50H, 22H, 48H, 0CH, 44H
DB 17H,0FEH, 24H, 44H,0E4H, 44H, 27H,0FCH, 24H, 44H, 24H, 44H, 27H,0FCH, 24H, 04H
;
DB 01H, 00H, 7FH,0FCH, 01H, 00H, 3FH,0F8H, 00H, 00H, 1FH,0F0H, 10H, 10H, 1FH,0F0H
DB 04H, 40H,0FFH,0FEH, 10H, 00H, 7EH,0F8H, 12H, 88H, 12H, 88H, 22H,0F8H, 4CH, 88H
;
DB 10H, 10H, 10H, 18H, 1CH, 14H, 23H,0FEH, 22H, 10H, 7EH, 10H, 92H, 10H, 13H,0D4H
DB 0FEH, 54H, 12H, 54H, 12H, 54H, 17H, 48H, 1AH, 98H, 12H, 2AH, 04H, 46H, 08H, 02H
CNT EQU $ - DOT ;=32
CODE ENDS
END START