Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Bubble sort

Options
  • 25-04-2002 11:41am
    #1
    Closed Accounts Posts: 375 ✭✭


    Right lads thats as far as i've got with the bubble sort algorithm but i seem to be caught in an infinite loop can you help me break out of it

    Ps. My head dont work no more (18 hours clocked up on this program over 3 days :( )

    Cheers
    Baldy
    ____________________________________________________
    mov si,8

    loop1:
    mov bx,si
    mov i,bx

    dec i

    cmp i,1
    jae loop2

    cmp i,1
    jb ender

    loop2:
    mov j,1
    mov bx,j

    dec j

    cmp bx,i
    jbe doif

    cmp bx,i
    ja loop1

    doif:
    mov bx,numarray[si-2]
    mov temp,bx

    mov bx,numarray[si]
    mov numarray[si-2],bx

    mov bx,temp
    mov numarray[si],bx
    call outdec

    jmp loop2


Comments

  • Closed Accounts Posts: 375 ✭✭Baldy


    Sorry

    Bollox i posted that in the wrong section does ne1 know how to move it plz, sorry admins, twas a mistake :( (****in programm).

    Cheers
    Baldy


  • Registered Users Posts: 2,079 ✭✭✭Mr.Applepie


    Ban him!

    Yeah you pretty much have to wait for an admin to move it m8 :) silly boy!

    P.S can you see the image in my sig?

    [edit]check your pm's[/edit]


  • Closed Accounts Posts: 375 ✭✭Baldy


    No m8 sorry you cant.

    sucide looks like a better option than this program.

    hey dave wiill ya do me a fav and go to #boards.ie and ask and admin to move this to the appropiate spot

    cheers m8


Advertisement