1 This ALP Reads and Stores An Input String in Different Data Segments and Outputs Its Reverse
1 This ALP Reads and Stores An Input String in Different Data Segments and Outputs Its Reverse
.MODEL
.STACK 64
.DATA
.CODE
START:
;MOV AX,@DATA ;point to data segment
;MOV DS,AX
JMP NEXT_BYTE
END_FOUND: DEC SI
DEC DI
LEA BX,STORE
MOV [DI],AL
MOV [BX],AH
INC BX
DEC DI
JMP REVERSE
LEA DX,STORE
MOV AH,09H ;print reversed (int21h/9h)
INT 21H
HLT
RET
1 This ALP reads and stores an input string in different data segments and outputs its reverse.