Hallo allemaal,
When formatting a floppy using the New command, the routine at $EE0D. At
$EE3D it calls $C8C6. So far no problem.
;** Format disk [C8C6]
FormatFloppy LDA #$4C ; JMP-command
STA BUF3
LDA #<(E_FAC7)
STA A_0601
LDA #>(E_FAC7)
STA A_0602 ; JMP $FAC7 in $600 to $602
LDA #$03
JSR P_D6D3 ; set track and sector number
LDA DRVNMB ; drive number
ORA #$E0 ; command code for
formatting
STA JOBSZP+3 ; transmit
B_C8E0 LDA JOBSZP+3
BMI B_C8E0 ; wait until formatting done
CMP #$02
BCC B_C8EF ; smaller than two, then ok
LDA #$03
LDX #$00
JMP PrepErrMsg ; 21, 'read error'
B_C8EF RTS
$C8C6 places the command "JMP $FAC7" at address $0600, sets the track and
sectornumber, fills JOBSZP+3 and then starts waiting until bit 7 of this
variable is reset.
It's logical to assume that the IRQ routine does reset this bit somewhere.
The original IRQ routine calls $F2B0. At $F2E9 it checks $0020. I don't know
where this variable is intialised. Following both possibilities $F2F9 or
$F99C I have no idea where the JMP instruction at $0600 is executed.
As you see JOBSZP+x ($00+x) is filled with a code. Where is this code
examined and acted upon?
Why do I need this info? Replacing the FD by a harddisk means some routines
won't work at all, especially the formatting routine. It seems logical that
this routine can be found at $FAC7 but how can I be very sure? And other
codes are used as well and I haven't found the corresponding routines yet :(
Any help is welcome. Thanks.
___
/ __|__
/ / |_/ Groetjes, Ruud
\ \__|_\
\___| http://Ruud.C64.org
Message was sent through the cbm-hackers mailing list
Archive generated by hypermail 2.1.1.