On 1/28/2006 at 8:58 PM John R. Hogerhuis wrote:
Can drivers for CP/M machines be loaded at run-time?
Sure, lots of systems have done that.
My idea is that I could make a simple driver that
communicates to some
serial-based disk drive controller, or hopefully someone has already
done something similar. How do I structure such a driver, and would it
have to be part of CP/M or can I patch it in at run-time?
One way is to MOVCPM your system to include some extra loose high memory.
Patch the apprpriate CBIOS jump vectors for your routine.
Alternatively, remember that everything goes through the CBIOS vector
table. So how to dynamically patch something? Just allocate some space
below the CCP area, duplicate the CBIOS vector table to just below your
driver on a 256-byte boundary; below that, insert a jump 256 bytes lower to
the BDOS entry, then adjust both the BDOS boot pointer at 0000 and the BDOS
entry vector at 0005 to point to the BDOS jump. This should work for most
I don't recall, but I believe that CP/M networks did something similar.