ok i can inverse the code
like 1234 to 4321..but when i applied jmp and cmp i dont know what goes wrong with my data..
code without loop

.model small
.stack
.data
.code
start:
mov ah,1
int 21h
push ax

mov ah,1
int 21h
push ax

mov ah,1
int 21h
push ax

pop bx
mov ah,2
mov dl,bl
int 21h

pop bx
mov ah,2
mov dl,bl
int 21h

pop bx
mov ah,2
mov dl,bl
int 21h
mov ah,4ch
int 21h

here is my code with loop

.model small
.stack
.data
.code
start:
start1:
mov ah,1
int 21h
push ax
cmp al,0ah
je out1
jne start1

out1:
pop bx
mov ah,2
mov dl,bl
int 21h
mov ax,4c00h
int 21h
end start

my problem is with my loop how come it wont inverse

You push each key until you get a linefeed 0ah then only pop one value. 0Dh is carriage return!

How many did you push? You need to count them! But using push-pop you're on the right track. Of course this is one method but it will work.

Edited 7 Years Ago by wildgoose: n/a

yea i found the code when i was having a peaceful time at the cafe drkinking my freeze vanilla..thanks for the post wild..

This question has already been answered. Start a new discussion instead.