when i run my code in emu8086 i have error "opcode not supported yet" so what should i do in this case
and pls try to run in emu8086 to check if it work properly or not cause i spent alot of time to fix the code but i couldnt

data segment
ar db 107,106,105,104,103,102,101,100,99,98
ends


code segment
 start:
assume cs:code,ds:data
mov ax, data
mov ds, ax
mov es, ax



mov cl,00h
   lb1:
mov ch,09h
sub ch,cl
mov si,0
lb2:
    mov dl,ar[si]
    mov dh,ar[si+1]
    cmp dl,dh
    jle finish
    mov ar[si],dh
    mov ar[si+1],dl
finish:
    inc si
    dec ch
    cmp ch,00
    jg lb2
inc cl
cmp cl,09h
jl lb1


mov cx,10
mov si,0
  lb3:
mov dl,ar[si]
mov ah,02h
int 21h

inc si
loop lb3

mov ax, 4c00h 
int 21h    
ends

end start 


HLT   

 ![micro](/attachments/small/4/micro.JPG "align-right") **Bold Text Here**
Attachments micro.JPG 102.48 KB

i made change in values in ar and now no output and no errors :D !!
any help pls

data segment
ar db 5h,2h,3h,4h,5h,6h,7h,8h,1h,9h                    
ends


code segment
 start:
assume cs:code,ds:data
mov ax, data
mov ds, ax
mov es, ax



mov cl,00h
   lb1:
mov ch,09h
sub ch,cl
mov si,0
lb2:
    mov dl,ar[si]
    mov dh,ar[si+1]
    cmp dl,dh
    jle finish
    mov ar[si],dh
    mov ar[si+1],dl
finish:
    inc si
    dec ch
    cmp ch,00
    jg lb2
inc cl
cmp cl,09h
jl lb1


mov cx,10
mov si,0
  lb3:
mov dl,ar[si]
mov ah,02h
int 21h

inc si
loop lb3

mov ax, 4c00h 
int 21h    



HLT           ; halt!
This article has been dead for over six months. Start a new discussion instead.