Understanding CP/M – Customizing Your CBIOS
by C. Bowden
This article has been written mainly to try to assist those who would like to
learn more about some of the operations of CP/M or its support utilities. As a
comparative novice myself, I have just struggled through the operations that are
described later and I feel that much of what I have learnt could be of use to
others eager to get more out of their system. At the end of the article is a
summary of the CP/M memory map, and showing the main addresses for CP/M as
supplied by Gemini for the Nascom, and also as altered to allow space for a ‘SYS’
CBIOS. Terms such as CBIOS, BDOS, CCP and so on are also briefly explained. There
are also diagrams in the text, showing the internal details of MOVCPM and the
System Track of the disk.
I had been using CP/M for about two years, first with version 1.4, and then
upgrading to double density and Version 2.2. During this time the Micro has been
used for Games, Word and Data Processing and some Assembler work but I had not
devoted much time to trying to find out how the FDC Hardware and Software works,
nor to exploring CP/M and its Utilities. I decided that it was time to start. To
begin with I wrote a short program to read a few sectors off disk directly into
memory in order to learn a bit about disk I/O. This was not too difficult as I
simply ‘pinched’ what appeared to be the relevant bits of code from some of the
various CBIOS source files that I had. After a bit of juggling I got it to work
and armed with this new but rather vital knowledge I got down to solving the
problem that I had set myself – to replace the original Gemini CBIOS with a SYS
CBIOS.
I had several reasons for wanting to change the CBIOS.
1) | Primarily to learn how to do it, so as to increase my understanding of what
was happening. |
2) | To avoid the extra wait required for SYS to load. |
3) | To clear the ‘SYSxx’ command from the CP/M Buffer so that some other
program could be Auto-Run. (Although SYS could probably be made to put
another name into the Command Buffer.) |
4) | The origional CBIOS supplied by Gemini is very good, but ‘SYS’ does offer
extra features in certain circumstances, so it can become the preferred
CBIOS. |
5) | Perhaps rather trivial – a gain of 8K bytes of extra disk space as the
SYSxx.COM file does not need to be on the disk. |
I eventually succeeded in my task, but on the way I encountered a number of
difficulties, the solution of which greatly increased my understanding of what
was going on. Part of the solution involved Disassembling SIMON, SYSGEN and the
COLD BOOT LOADER, and I had to alter ‘SYS’ a little bit as well. During the rest
of this article I will be referring to certain programs that I used to carry out
the job. To avoid having to repeat multiple names, I will define one suitable
common name for the job:–
1)PEEK | – | A Disk Utility such as DDISK or REPAIR that allows direct
access to the Disk, with facilities to ‘patch’ if required. |
2)BUG | – | A Utility such as DDT, ZSID or GEMDEBUG. |
3)OLDBIOS | – | the origional CBIOS, as supplied within CP/M by Gemini. |
4)SYS | – | The new CBIOS. In my case SYS Vn 11.0 at present. |
5)MOVOLD | – | The MOVCPMN or V supplied by Gemini. (N = version for Nascom
Screen, and V = version for the
IVC
Intelligent Video Card). |
6)MOVMODV | – | A version of MOVOLD for the IVC screen modified to reserve
extra room at the top of RAM for a larger BIOS. ( See SYS.DOC
as supplied with SYSxxxx.MAC). Use MOVCPMN as the starting
point if Nascom screen output is required. |
7)MOVCPM | – | Any version of MOVCPM as appropriate. |