
 1000  *--------------------------------
 1010  *   S.FAST LOAD.1
 1020  *
 1030  *      FAST "LOAD" AND "BLOAD"
 1040  *
 1050  *      INSTALLED IN UNUSED AREAS IN DOS 3.3:
 1060  *          $BA69-$BA95   (45 BYTES FREE)
 1070  *          $BCDF-$BCFF   (33 BYTES FREE)
 1080  *--------------------------------
 1090  READ.RANGE          .EQ $AC96
 1100  READ.NEXT.SECTOR    .EQ $B0B6
 1110  END.OF.DATA.ERROR   .EQ $B36F
 1120  RANGE.LENGTH        .EQ $B5C1,C2
 1130  RANGE.ADDRESS       .EQ $B5C3,C4
 1140  BUFFER.ADDRESS      .EQ $B5CB,CC
 1150  SECTOR.COUNT        .EQ $B5E4,E5
 1160  BYTE.OFFSET         .EQ $B5E6
 1170  *--------------------------------
 1180         .OR $BA69
 1190         .TF B.PATCH1
 1200   
 1210  PATCH1 LDA BYTE.OFFSET       LAST BYTE OF
 1220         BNE GO.READ.RANGE     A SECTOR?
 1230         LDA RANGE.LENGTH+1    WHOLE SECTOR LEFT?
 1240         BEQ GO.READ.RANGE     NO.
 1250         LDA BUFFER.ADDRESS    SAVE BUFFER ADDRESS
 1260         PHA
 1270         LDA BUFFER.ADDRESS+1
 1280         PHA
 1290         LDA RANGE.ADDRESS     READ DIRECTLY
 1300         STA BUFFER.ADDRESS    INTO RANGE
 1310         LDA RANGE.ADDRESS+1
 1320         STA BUFFER.ADDRESS+1
 1330   
 1340  READ.LOOP
 1350         JSR READ.NEXT.SECTOR
 1360         BCS .1
 1370         JMP PATCH2
 1380  .1     JMP END.OF.DATA.ERROR
 1390   
 1400  GO.READ.RANGE
 1410         JMP READ.RANGE
 1420  *--------------------------------
 1430         .OR $BCDF
 1440         .TF B.PATCH2
 1450   
 1460  PATCH2 INC SECTOR.COUNT
 1470         BNE .1
 1480         INC SECTOR.COUNT+1
 1490  .1     INC RANGE.ADDRESS+1   NEXT PAGE
 1500         INC BUFFER.ADDRESS+1
 1510         DEC RANGE.LENGTH+1
 1520         BNE .2
 1530         PLA               RESTORE BUFFER
 1540         STA BUFFER.ADDRESS+1
 1550         PLA
 1560         STA BUFFER.ADDRESS
 1570         JMP READ.RANGE    ONE BYTE AT A TIME
 1580   
 1590  .2     JMP READ.LOOP
 1600  *--------------------------------
 1610         .LIF

