Use the included BASIC program "DBWRITE" to rewrite the desired
sector(s) with a new data block ID (creating the 22 Error).
"DBREAD" can then be used to read the protected sector(s) and
place it in drive memory at $0300 where it can be accessed with a
"Memory-Read" command. From there you can either transfer the code
down to the computer or leave it in the driveg if it's drive code.
You may use the included assembly code in a machine language
program if you wish.
DBWRITE.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:
Rewrite a data block with a different
data block ID code. High nibble of code
must be $0x, $1x, $4x, $5x, $8x or $Cx;
(x = any hex number from $0 - $F)
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
***********************************************************;
org $0500 ;code executes in drive here writdbid
sei ;disable interrupts
lda $47 ;save current data block id char
sta oldid
ida $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
ida #$B0 ;seek track/sector
jsr waitjob
ida #$80 ;read track/sector into $0300
jsr waitjob
lda newid ;setup new data block id
sta $47
ida #$90 ;write trise with new data block id
jsr waitjob
pha ;save error code ($01 = O.K.)
lda oldid ;restore old data block id
K.J. REVEALED TRILOGY PAGE [142] (C)1990 K.J.P.B.
<<previous page -
next page>>