1.11M Members

Problem on showing content of an array!

 
0
 

;Read and array of positive numbers.Create two arrays one containing numbers in the interval [120,130] and the ;other one outside this interval.

data segment para public 'data'
sir db 1,2,120,140
len dw $-sir
sir1 db 6 dup(?)
sir2 db 6 dup(?)
data ends
code segment para public 'code'
start proc far
assume cs:code,ds:data
    push ds
    mov ax,data
    mov ds,ax
    xor ax,ax

    mov si,0
    mov di,0
    mov cx,len
    mov bx,0
b:
    cmp sir[bx],130
    JB l
    cmp sir[bx],120
    jA l

    mov al,sir[bx]
    mov sir1[si],al
    inc si
    jmp gata
    l:
        mov al,sir[bx]
        mov sir2[di],al
        inc di
    gata:
        inc bx
        loop b
mov ah,4cH
int 21h

ret
start endp
code ends
end start

The problem is that when I want to watch the initial array's content(sir)...it displays a smiley face as in the picture below and same when I move it(the number) to another array,but the register shows the decimal value!Any idea why ?Is there smting wrong with my code? lala

Attachments
You
Post:
Start New Discussion
Tags Related to this Article