解释汇编程序功能
程序1代码:STACK SEGMENT PARA STACK 'STACK'
DB 512 DUP(?)
STACK ENDS
;
DATA SEGMENT PARA PUBLIC 'DATA'
BWORD DW 1234H
ASC DB 20 DUP(0)
DATA ENDS
;
CODE SEGMENT PARA PUBLIC 'CODE'
ASSUME CS:CODE,DS:DATA,ES:CODE,SS:CODE
START PROC FAR
PUSH DS
MOV AX,0
PUSH AX
MOV AX,DATA
MOV DS,AX
;
LEA BX,ASC
MOV AX,BWORD
MOV CX,4H
MOV DL,33H
TT: PUSH CX
MOV CX,4H
ROL AX,CL
PUSH AX
AND AX,0FH
OR AL,30H
MOV [BX],DL
INC BX
MOV [BX],AL
MOV AL,";"
INC BX
MOV [BX],AL
INC BX
POP AX
POP CX
LOOP TT
DEC BX
MOV AL,'$'
MOV [BX],AL
MOV AH,09H
LEA DX,ASC
INT 21H
RET
START ENDP
CODE ENDS
END START
程序2代码:
DATA SEGMENT
X DB 15
Y DB 20
Z DW ?
DATA ENDS
;
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
MAIN PROC FAR
START:
PUSH DS
MOV AX,0
PUSH AX
;
MOV AX,DATA
MOV DS,AX
;
MOV AL,5
MUL X
MOV BX,AX
MOV AL,3
MUL Y
ADD AX,BX
ADD AX,10
MOV Z,AX
;
RET
MAIN ENDP
CODE ENDS
END START
;
老师说把程序2当成主程序,程序1当成子程序进行调用,请问具体怎么调用?还有帮我解释下代码,谢谢。