汇编语言四则运算源代码+流程图 第5页 CLC
RET
;数制处理
UVIL LABEL NEAR
PUSH SI
UVIL1:
LODSB
CMP AL,' '
JZ UVIL2
CMP AL,9
JZ UVIL2
CMP AL,13
JZ UVIL4
JNZ UVIL1
UVIL2:
MOV BX,SI
CALL OVERS
JZ UVIL3
LODSW
CALL OVERS
POP SI
JNZ SZYS11
CMP AX,'01'
JNZ SZYS11
PUSH SI
MOV UV,10
UVIL3:
MOV AL,13
MOV [BX-1],AL
UVIL4:
POP SI
CLC
RET
;预置结果
YVJG LABEL NEAR
MOV AH,52H
INT 21H
MOV AX,ES:[BX-2]
MOV DS,AX
MOV AX,DS:[0CH]
MOV CS:JGV4,AX
MOV AX,DS:[0EH]
MOV CS:JGV4+2,AX
PUSH CS
POP DS
PUSH CS
POP ES
RET
;保存结果
BCJG LABEL NEAR
MOV AH,52H
INT 21H
MOV AX,ES:[BX-2]
MOV DS,AX
MOV AX,CS:JGV4
MOV DS:[0CH],AX
MOV AX,CS:JGV4+2
MOV DS:[0EH],AX
PUSH CS
POP DS
PUSH CS
POP ES
RET
STAR:
MOV SI,81H
CLD
CALL OVERS
JNZ STAR1
STAR0:
MOV DX,OFFSET MESS1
JMP STAR4
STAR1:
CALL YVJG
CALL UVIL
JB STAR0
MOV SAVESP,SP
CALL SZYS
MOV SP,SAVESP
MOV DX,OFFSET MESS2
JB STAR4
CALL CRLF
CALL XUJG
CALL BCJG
MOV DX,OFFSET MESS3
STAR4:
MOV AH,9
INT 21H
INT 20H
SAVESP DW 0
MESS1 DB 13,10,' Syntax:',13,10
DB ' JS <Expression> [10]',13,10,'$'
MESS2 DB 'Error in expression !$'
MESS3 DB 13,10,'$'
CODE ENDS END NEWSTAR
上一页 [1] [2] [3] [4] [5]
汇编语言四则运算源代码+流程图 第5页下载如图片无法显示或论文不完整,请联系qq752018766