We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,153 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Problem on showing content of an array!

;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 lala.jpg.jpg 249.07KB
1
Contributor
0
Replies
2
Views
tudor.laze
Newbie Poster
3 posts since Jan 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0546 seconds using 2.66MB