I am trying to fill an empty string rev
with the reverse of abc
string but it gives error at line 20. that is wrong parameter or probably it is an undefined var.
.model small
.data
abc db "i eat an apple a day$"
rev db ?
.code
main proc
mov ax,@data
mov ds,ax
;mov cx,size
mov bx,offset abc
;add bx,size
dec bx
;add bx,cx
mov dx,offset abc
copy:
mov al,byte ptr[bx]
;Error over here:(20) wrong parameters: MOV byte ptr[dx],al
;(20) probably it's an undefined var: byte ptr[dx]
mov byte ptr[dx],al
dec bx
inc dx
loop copy
mov byte ptr[dx],'$'
mov dx,offset rev
mov ah,9
int 21h
mov ah,4ch
int 21h
main endp
end main
I am trying to fill an empty string rev with the reverse of abc string but it gives error at line 20 .that is wrong parameter or probably it is an undefined var.