SRC-Bubblesort

SRC-Bubblesort - DETERMINE HOW MANY FIELDS TO SORT CLD...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
; DETERMINE HOW MANY FIELDS TO SORT CLD PLA ;ALL BUT THE FIRST SEC ;THREE PARAMETERS SBC #3 ;ARE FIELDS TO STA FLDCNT ;SORT ; PICK UP SORT PARAMETERS PLA ;FILE START STA FILE+1 ;ADDRESS PLA ; STA FILE ; PLA ;RECORD LENGTH STA RECSIZ+1 ; PLA ; STA RECSIZ ; PLA ;NUMBER OF RECORDS STA RECNBR+1 ; PLA ; STA RECNBR ; ; ;PICK UP FIELDS TO SORT LDX #0 PICKFIELDS PLA ;GET ALL THE SORT PLA ;FIELD PARAMETERS FOR STA STACK,X ;POSITION, LENGTH INX ;AND DIRECTION. CPX FLDCNT ;ANY MORE BNE PICKFIELDS ;GO GET THEM ; ;SET UP NUMBER OF RECORDS TO SORT SEC LDA RECNBR ;MUST BE AT LEAST SBC #2 ;TWO RECORDS TO STA RECNBR ;SORT LDA RECNBR+1 ; SBC #0 ; STA RECNBR+1 ; BMI ENDSORT ;ELSE GET OUT ; ;MAIN LINE SORT LOOP ; SORT LDA RECNBR ;RESET NUMBER OF STA SCOUNT ;RECORDS TO SORT LDA RECNBR+1 ; STA SCOUNT+1 ; LDA FILE+1 ;SET UP POINTERS STA PNTR1+1 ;FOR THE FIRST STA PNTR2+1 ;AND LDA FILE ;SECOND RECORDS. BUMPRECORD STA PNTR1 ;PUT PNTR2 CLC ;AHEAD ADC RECSIZ ;OF STA PNTR2 ;PNTR1 LDA PNTR2+1 ;BY
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ADC RECSIZ+1 ;ONE
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/10/2012 for the course ECE 4551 taught by Professor Johnhadjilogiou during the Fall '09 term at FIT.

Page1 / 3

SRC-Bubblesort - DETERMINE HOW MANY FIELDS TO SORT CLD...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online