#2
wmf20142015-04-13 10:27
|
程序代码:
S1 SEGMENT
STRING DB 100,?,100 DUP(0)
S1 ENDS
S2 SEGMENT PARA STACK
DW 100 DUP (?)
TOP LABEL WORD
S2 ENDS
S3 SEGMENT
ASSUME DS:S1,SS:S2 ,CS :S3
P PROC FAR
MOV AX,S1
MOV DS, AX
MOV AX ,S2
MOV SS,AX
LEA SP,TOP
LEA DX,STRING
MOV AH,0AH
INT 21H
LEA BX,STRING
MOV CX,STRING[1]
ADD BX,CX
ADD BX,1
L1:
MOV DL,[BX]
MOV AH,2H
INT 21H
DEC BX
LOOP L1
mov ah ,4ch
int 21H
P ENDP
S3 ENDS
END P
STRING DB 100,?,100 DUP(0)
S1 ENDS
S2 SEGMENT PARA STACK
DW 100 DUP (?)
TOP LABEL WORD
S2 ENDS
S3 SEGMENT
ASSUME DS:S1,SS:S2 ,CS :S3
P PROC FAR
MOV AX,S1
MOV DS, AX
MOV AX ,S2
MOV SS,AX
LEA SP,TOP
LEA DX,STRING
MOV AH,0AH
INT 21H
LEA BX,STRING
MOV CX,STRING[1]
ADD BX,CX
ADD BX,1
L1:
MOV DL,[BX]
MOV AH,2H
INT 21H
DEC BX
LOOP L1
mov ah ,4ch
int 21H
P ENDP
S3 ENDS
END P