home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
kaypro
/
k256bios.lbr
/
CBIOSR.DQC
/
CBIOSR.DOC
Wrap
Text File
|
1986-06-28
|
6KB
|
135 lines
***************
* C B I O S R *
***************
COPYRIGHT
=========
CBIOSR is copyright (c) 1986 Michael Liddle. It is released to
the public domain for non commercial usage and may be freely copied and
used by anyone who wishes to do so providing this is not done for
commercial or other gain.
INTRODUCTION
============
CBIOSR is a BIOS (Baisc Input Output System) for use in
conjunction with CP/M 2.2 on pre 84 series Kaypro computers. It provides
all the facilities of the standard BIOS plus supporting a 191K RAM DISK as
drive C. In order to use CBIOSR you need to replace your 64K RAM chips
with 256K RAM chips and add extra address decoding and refresh as described
by me in Micro Cornucopia.
Use of CBIOSR entails a loss of 1K of the transient program area.
This is unlikely to be a problem.
USAGE
=====
Once installed and saved on the sytem tracks of a floppy disk
the RAM DISK routines are loaded at cold boot along with the rest of the
operating system. The RAM disk can be accessed as drive C: in the same way
as drives A: and B: are used. However the RAM disc is a lot faster and is
an ideal place to put overlay and swap files.
Data on the RAM disk is volatile and will be lost when the
computer is powered down. Therefore it is essential to save any files to a
floppy at the end of each session.
Rebooting the computer using the reset button does not affect
data on the RAM disK. This is because the cold boot routine does not
initialise the RAMDRIVE. As a result if a program crashes and you have to
reboot you will usually find all your data intact (rarely a rogue program
may corrupt the RAM disk). However this means that before use the disk
must be initialised by a special program call RAMINIT.COM. This is done by
typing RAMINIT in response to the A> prompt from CP/M. RAMINIT can also be
used in place of ERA C:*.* to erase all files on the disk.
THEORY OF OPERATION
===================
Most 8 bit processors are limited to an address range of 64K.
This is because they have 16 bit internal registers for addresses and 16
address lines (2^16=64K). A few of the more modern 8 bit processors have
extra address lines to allow RAM addresses greater than 64K. Likewise the
8088 series (arguably also 8 bit) implement 64K segments.
One way to allow processors such as the Z80, 8080, 6502, etc to
address more than 64K is through bank switching. Bank switching controls
the system memory (RAM and ROM) in such a way that different 'banks` of
memory can be switched into and out of the address map so that although
only 64K of memory is addressable at any one time the amount of memory in
the system can be far more than this limit. Perhaps the best example is
that of the system ROM in many machines which is switched in at address
zero on cold boot, reads a bootstrap into RAM and then jumps to that
bootstrap which disables the ROM replacing it by RAM.
Just as most 8 bit processors were designed to address a maximum
of 64K so most 8 bit operating systems and application programs are limited
to this. One exception is CP/M plus (version 3) which can use extra RAM
banks as buffers. However CP/M+ has disadvantages not least being cost and
compatibility. Therefore to make use of extra RAM it is usually necessary
to modify the hardware dependent BIOS. Extra RAM may be used by the BIOS
in a number of ways. For peripheral buffers to speed I/O response e.g.
printer buffer, track buffering on disks, etc. One easy to implement and
worthwhile use for extra ram is to simulate a very very fast disk drive.
CBIOSR is a fairly standard CP/M BIOS. However the disk related
routines (Home, SetTrk, Read, etc) contain code to fool the CP/M BDOS into
thinking tyhere is a floppy disk called drive 'C' when in fact this is five
32 kilobyte banks of RAM.
SetTrk, SetSec and Home are used to position a pointer to the
part of the RAM containing data rather than positioning a read/write head
over a physical floppy disk. Read and write then transfer data from and to
the area of the TPA selected by the application program via the SetDMA
routine.
A 128 byte 'sector' buffer in the BIOS is used as an intermediate
storage for data written to or read from drive C:. This is necessary since
the lower area of the TPA (usually containing the users disk buffer at
080H) is switched out during accesses to the RAM disk, the top 32K of RAM
is allways selected.
INSTALLATION
============
On this disk are the files CBIOSR.Z80 and CBIOSR.HEX which
contain the source and object code of the RAM DISK BIOS. To install CBIOSR
you will need a system disk containing the following files:
CBIOSR.HEX
DDT.COM
SYSGEN.COM
MOVCPM.COM
Below is a step by step guide. Lines begining with the A> prompt
are those typed at operating system (CP/M) level whilst the rest are
responses to the various programs used. Output from these programs is not
shown.
o Step 1). First obtain a copy of CP/M using MOVCPM and saving it as follows:
A>MOVCPM 63 *
A>SAVE 34 CPM63.COM
o Step 2). Now overlay it with CBIOSR.HEX using DDT and save the patched
version:
A>DDT CPM63.COM
S906
34
.
ICBIOSR.HEX
R2980
G0
A>SAVE 34 CPM63.COM
o Step 3). Finally install it on a disc with SYSGEN.
A>SYSGEN CPM63.COM