Close

CBIOS Fixes

A project log for My CP/M Single Board Computer

A simple computer based on the CP/M OS and flash chips for disk drives

agp.cooperagp.cooper 06/13/2021 at 05:500 Comments

CBIOS Fixes

I have been working through Grant Searle's cbios.asm and comparing that to my cbios.asm. I found tree coding errors:

  1. Incomplete disk parameters.
  2. Stack pointer location not properly set after boot.
  3. Cold boot system reload, source and destination swapped.

DDT is my new friend

DDT is the Digital Research's CP/M Dynamic Debugging Tool. As exiting DDT crashed my system, it was not my favourite program. But this time I used it to trace exit from DDT and find why my system crashed. It is now one of my favourite programs.

Clear To Send (CTS)

My soft-coded serial is half duplex (i.e. cannot transmit and receive at the same time). It works well enough for a human typing but not for anything serious. Basically, if the interrupts are disabled I also need to disable CTS (e.i. set CTS HIGH).

Looking at my schematic, the best way to do this via the OUT instructions. Perhaps re-purposing "P5", the port configuration is:

This port configuration can access 4 disks of 2 Mb each, with CTS the disks will be reduced to 1 Mb each.

So I can jump a wire between "P5" and "CTS".

Programming wise, I need to keep a record of port setting and clear/set P5 each time CBIOS sets and clears the interrupts.

Uploading HEX files

When CTS is working I can upload HEX files using:

And the "Send RAW File" option in gtkterm.

After that HEX file can be converted into a COM file using LOAD.COM.

But CTS it is not working 100% yet.

Is Single Character Control With CTS Possible?

It seems to me that CTS is not acknowledge by the USB2Serial converter immediately. Two or three characters are send after CTS is disabled (goes TTL high).

This pretty well means it can only be used to control the receive buffer level.

This  also means that CP/M transmitted characters have to go into a buffer and transmitted later. The "transmit buffer" is easy, but the "transmit later" is awkward?

How do I do that without extra hardware (i.e. a timer and an interrupt or some other type of polling)?

At this point I, without hardware assistance, uploading HEX files via a standard terminal and my CP/M machine is not possible. I have to use an UART.

Project Files

I will have to update the projects files as well.

AlanX

Discussions