At 02:25 PM 5/27/99 -0700, Dwight wrote:
... The controller automatically loads track 0 sector
1.
Presumably the controller accomplishes this with and EPROM of some sort :-)
Some controllers like the 16FDC have a monitor in ROM that is standalone.
Anyway, you needn't worry because you are almost there.
I start executing at address zero and it boot loads
the
CPM system.
When you say "I" here, do you mean the controller or your code?
The core of a disk loader is very simple (note i've lost how many sectors
the standard 8" 3740 format disk had on it (it was twenty something) I'm
using 'n' as a place holder)
Set track to 0
read track
copy sectors 1 - n to 0xE000
set track to 1
read track
copy sectors 0 - n to the next block of memory past
(0xE000+(n-1)*128)
jump to 0xE000
That was it! The system was booted.
Now there are some variables, if your bios was larger then the space
allocated by default you could "move" CPM (MOVCPM) to start on a different
address other than E000, this would affect your transient program area
(TPA) available for programs (and note that Turbo PASCAL programs couldn't
run if they had been compiled on a system with a larger TPA!)
Also some BIOSes (like mine) coded the disk geometry into the boot block so
that a single boot program would boot multiple disk types. I had an 8 bit
value that encoded drive size, # of sides, dd/sd, and "pertec" style
seeking. Other BIOSes actually wrote different boot blocks depending on the
disk they were written on.
--Chuck