ORG 7C00H
STACK:
TIMES 16 DW 0
START:
MOV AX,CS
MOV DS,AX
MOV ES,AX
MOV SS,AX
MOV SP,0010H
A:
MOV AH,2
MOV BH,0
MOV DH,5
MOV DL,12
INT 10H
B:
MOV AH,9
POP BX
MOV AL,BL
MOV BL,11001010B
MOV BH,0
MOV CX,1
INT 10H
C:
JMP $
TIMES 510-$+$$ DB 0
DW 0xAA55
源代码如上,我用的是NASM
------解决方案--------------------------------------------------------
- Assembly code
ORG 7C00Hjmp START ; 添加STACK:TIMES 16 DW 0STACKTOP: ; 添加START:MOV AX,CSMOV DS,AXMOV ES,AXMOV SS,AX MOV SP,STACKTOP ; 修改A:MOV AH,2MOV BH,0MOV DH,5MOV DL,12INT 10HB:MOV AH,9POP BXMOV AL,BLMOV BL,11001010BMOV BH,0MOV CX,1INT 10HC:JMP $TIMES 510-$+$$ DB 0DW 0xAA55