关于 MASM32 编译出错 error A2044: invalid character in file 的问题
源码:.MODELSMALL,C.DATAN_VDW?RESULTDW?FRAMESTRUCSAVE_BPDW?SAVE_CS_IPDW2DUP(?)NDW?RESULT...
源码:
.MODEL SMALL,C
.DATA
N_V DW ?
RESULT DW ?
FRAME STRUC
SAVE_BP DW ?
SAVE_CS_IP DW 2 DUP(?)
N DW ?
RESULT_ADDR DW ?
FRAME ENDS
.STACK 128
.CODE
MAIN PROC FAR
START: MOV BX,OFFSET RESULT
PUSH BX
MOV BX,N_V
PUSH BX
CALL FAR PTR FACT
RET
MAIN ENDP
FACT PROC FAR
PUSH BP
MOV BP,SP
PUSH BX
PUSH AX
MOV BX,[BP].RESULT_ADDR
MOV AX,[BP].N
CMP AX,0
JE DONE
PUSH BX
DEC AX
PUSH AX
CALL FAR PTR FACT
MOV BX,[BP].RESULT_ADDR
MOV AX,[BX]
MUL [BP].N
JMP SHORT RETURN
DONE: MOV AX,1
RETURN: MOV [BX],AX
POP AX
POP BX
POP BP
RET 4
FACT ENDP
END START
;————————————————————————————————————————
; 绝非前辈所提到的输入法全角码半角码或英文输入的转换问题
;请高人解答...... 展开
.MODEL SMALL,C
.DATA
N_V DW ?
RESULT DW ?
FRAME STRUC
SAVE_BP DW ?
SAVE_CS_IP DW 2 DUP(?)
N DW ?
RESULT_ADDR DW ?
FRAME ENDS
.STACK 128
.CODE
MAIN PROC FAR
START: MOV BX,OFFSET RESULT
PUSH BX
MOV BX,N_V
PUSH BX
CALL FAR PTR FACT
RET
MAIN ENDP
FACT PROC FAR
PUSH BP
MOV BP,SP
PUSH BX
PUSH AX
MOV BX,[BP].RESULT_ADDR
MOV AX,[BP].N
CMP AX,0
JE DONE
PUSH BX
DEC AX
PUSH AX
CALL FAR PTR FACT
MOV BX,[BP].RESULT_ADDR
MOV AX,[BX]
MUL [BP].N
JMP SHORT RETURN
DONE: MOV AX,1
RETURN: MOV [BX],AX
POP AX
POP BX
POP BP
RET 4
FACT ENDP
END START
;————————————————————————————————————————
; 绝非前辈所提到的输入法全角码半角码或英文输入的转换问题
;请高人解答...... 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询