readtg
sei
jsr $f510 ;search for the header block of our sector.
;If not found, this subroutine will exit
;and NOT return to us.
syncloop
bit $1c00 ;The header block was found so wait for the
;sync mark preceding the data block
bpl syncloop
sloop1
bit $1c00 ;got a sync, now wait for it to end
bmi sloop1
lda $1c01 ;throw away the sync image
clv
ldx #$01 ;set up .x/.y to count $0145 bytes
ldy #$45 ;($0000 -$0144) to the end of the data
;block
dataloop
bvc * ;wait for data byte ready
clv ;clear ready flag
lda $1c01 ;read byte from diskette $0144 times
dey
bne dataloop ;
dex
bpl dataloop ;
dloop1
bvc * ;we're now at position $0145 -
clv ;in the TAIL GAP
lda $1c01 ;read our 5 bytes
sta $0300,y ;and store them from $0300 - $0304
iny
cpy #$05
bne dloop1
jsr $f98f ;turn off drive motor
lda #$01 ;O.K.
sta $00 ;and exit back to SETUP
cli
rts
end
A sample BASIC program named "TGREAD" is included on disk that
sends the above code (stored in data statements) to the drive,
executes it, and displays whether the protection passed or failed.
KRACKER JAX PRESENTS
K.J. REVEALED TRILOGY PAGE [148] (C)1990 K.J.P.B.
<<previous page -
next page>>