Hi everyone
i'm new in assembly language.i try to code for 1's complement but not working.is there anyone who can detect my error

code is
Title Length of an array
.model small
.stack 100h
msg0 db 0dh,0ah, 'Enter the binary value :  $'
msg1 db 0dh,0ah, 'the 1s complement form is: $'
str1 db 255 dup (?)
one db ?
two db ?
main proc
mov ax,@data
mov ds,ax

lea dx,msg0
mov ah,09h
int 21h

lea si,str1 ; read a string 
mov ah,01h

        int 21h
        ;mov bl,al
        cmp al,0dh; carrage return
        je display; if input is a carrege return than jump display section

        cmp al,00h
        je _0_

        cmp al,01h
        je _1_

        mov al,30h
        mov [si],al
        inc si
        jmp read

        mov al,31h
        mov [si],al
        inc si
        jmp read        

              mov al,'$'
            mov [si],al
            lea dx,msg1
            mov ah,09h
            int 21h
            lea dx, str1
            mov ah,09h
            int 21h

            mov ah, 4ch
            int 21h
main endp
end main
thanks everyone

Last edited by shabbir; 5May2013 at 09:17.. Reason: Code blocks