sta $47
         pla            ;get error code
         cli            ;enable interrupts
         rts            ;and exit
         waitjob
         sta $00        ;store job code to job queue
         cli            ;enable interrupts
         wjloop
         lda $00        ;wait for job to finish
         bmi wjloop
         sei            ;disable interrupts
         rts            ;return
         newid .hex  00 ;storage for new data block id
         oldid .hex  00 ;storage for old data block id
      
         end
      
      DBREAD.ASM
      
        This program is for educational and personal use only
        No commercial use of this program is permitted.
        All rights reserved  (C) 1989 K.J.P.B.
      
      ***********************************************************;         
      Job:
        Read a data block with a different
        data block ID code.
        The following code must be written to
        drive memory $0500 and can be executed
        from BASIC with the following statement:
        OPEN 15,8,15,"UC:"+CHR$(new id code)+CHR$(trk)+CHR$(sec)
        CLOSE 15
      
        Data block can then be read from $0300 in drive memory.
      ***********************************************************;
      
         .org $0500     ;code executes in drive here readdbid
         sei            ;disable interrupts
         lda $47        ;save current data block id char
         sta oldid
         lda $203       ;get new id from command buffer
         sta newid
         lda $204       ;get track for new data block id
         sta $06        ;will be read into $0300
         lda $205       ;get sector for new data block id
         sta $07
         lda newid      ;setup new data block id
         sta $47
         lda #$80       ;read track/sector into $0300
         
            K.J. REVEALED TRILOGY    PAGE [143]    (C)1990 K.J.P.B.

<<previous page - next page>>