I'm a newbie to assembly language. I am trying to write an experimental program that would display "What's Up?!" in reverse. Any advice/suggestions is greatly appreciated.
Below is my code:
Thanks in advance,
title Reversal (hi.asm)
dosseg
.model small
.stack 100h
.data
msg db 'What Up?!',0Ah,0Dh,'$'
len dw $-msg-3
.code
main proc
mov ax,@data
mov ds,ax
mov ax,0900h
mov dx,offset msg
int 21h
L1: push bx
inc bx
loop L1
mov cx,len
L2: pop dx
mov dx,ax
mov ah,02h
int 21h
loop L2
mov ax,4C00h
int 21h
main endp
end main
Below is my code:
Thanks in advance,
title Reversal (hi.asm)
dosseg
.model small
.stack 100h
.data
msg db 'What Up?!',0Ah,0Dh,'$'
len dw $-msg-3
.code
main proc
mov ax,@data
mov ds,ax
mov ax,0900h
mov dx,offset msg
int 21h
L1: push bx
inc bx
loop L1
mov cx,len
L2: pop dx
mov dx,ax
mov ah,02h
int 21h
loop L2
mov ax,4C00h
int 21h
main endp
end main