“传递错误之间的相位错误”。我已经在macros.asm文件中打败了各种宏,并编写了一个test.asm文件来测试我的程序。执行masm test.asm时;命令,报告传递之间的相位误差。我在“end main”之前和“main endp”之后包含了我的macro.asm文件。这是两个文件。
TEST.ASM
TITLE PG1:TEST
.MODEL SMALL
.STACK 100H
.DATA
A DW 5 DUP (0)
.CODE
MAIN PROC
MOV AX,@DATA
MOV DS,AX
MOV ES,AX
NEWLINE
MOV BX,2
PRINT_CONTENT BX
DOS_EXIT
MAIN ENDP
INCLUDE C:\MASM\11M20005\MACROS.ASM
END MAIN
MACROS.ASM
NEWLINE MACRO
PUSH AX
PUSH DX
MOV AH,2
MOV DL,0DH
INT 21H
MOV DL,0AH
INT 21H
POP DX
POP AX
ENDM
DOS_EXIT MACRO
MOV AH,4CH
INT 21H
ENDM
RESTORE_REGS MACRO REGS
IRP D,<REGS>
POP D
ENDM
ENDM
SAVE_REGS MACRO REGS
IRP D,<REGS>
PUSH D
ENDM
ENDM
PRINT_CONTENT MACRO REG
PUSH AX
PUSH DX
MOV DX,REG
MOV AH,2
INT 21H
POP DX
POP AX
ENDM