8080/8085 machine language Monitor released

424 views
Skip to first unread message

Ben Chong

unread,
May 14, 2017, 10:42:33 AM5/14/17
to RC2014-Z80
Okay, so a basic version of the Monitor for the 8085 CPU board is now available.

The ROM binary is at GitHub

The README.md describes the source files used to build the binary. And the sources are all on GitHub as well.

Instead of branching off yet another set of source files from the Z80 Monitor/Debugger, I decided to resort to conditional assembly instead. This is done using the #define CPU8080 in the source code. The zasm assembler I use supports these types of conditional assembly #defines. If your assembler doesn't then you'll want to manually edit the sources to remove the Z80-specific code.

The 8080/8085 Monitor has a subset of the original functionality. This is mostly due to the differences between the 2 CPUs. I'll add in the input/output commands next. The 8080/8085 does not support the in/out (c) instructions so you can't easily access ports in a "dynamic" way. I'll probably run code in RAM as a workaround.

Note that the 8080/8085 monitor has hardware requirements:
- 16550 UART board (either original or RevB versions)
- RC2014 original 8K switchable ROM board
- An 8085 board 

The Pageable ROM board unfortunately doesn't work. The reason is that it does not fully qualify the I/O cycle (with WR or RD) before triggering the 74HC393. As a result, running 8085 I/O cycles (to access the 16550 UART) in combination with memory read/write gets interpreted as a trigger to the 74HC393 and all things go to heck from then on. I spent a day wondering why the 8080/8085 Monitor worked with my Z80 CPU+ board but not with the 8085 board. Only discovered the problem when I swapped in the 8K switchable ROM board (properly hacked for 32KB and 28C256 support).

If you insist on using the Pageable ROM board, you will need to remove the 74HCT138 and 74HC393 devices, then solder pin 3 of the 74HC393 to ground. If you still want a paging capability, use the general purpose I/O pins of the 16550 RevB board to drive the Page line (with proper polarity inversion since those pins are high after reset).

Note to everyone else building boards: please make sure that you fully qualify IO or memory cycles in the following way: IO is qualified by M1, IORQ and either RD or WR. Memory is qualified by MREQ and either RD or WR. Or the law of unintended consequences will make itself heard! :)



Sir Isaac

unread,
May 14, 2017, 10:56:33 AM5/14/17
to RC2014-Z80
Glad to see other cpus being used. I'll be ordering some of your boards soon. What are the chances of getting DOS to run on the 8085?

Ben Chong

unread,
May 14, 2017, 12:51:34 PM5/14/17
to RC2014-Z80


On Sunday, May 14, 2017 at 7:56:33 AM UTC-7, Sir Isaac wrote:
Glad to see other cpus being used. I'll be ordering some of your boards soon. What are the chances of getting DOS to run on the 8085?

The 8085 is not the same as the 8086 which is DOS-compatible (assuming you're referring to MSDOS).

The 8085 is compatible with CP/M. Perhaps some enterprising soul will put a CP/M bios for it? :)

Ben Chong

unread,
May 14, 2017, 6:21:42 PM5/14/17
to RC2014-Z80
And an update to support the I and O commands is now on GitHub.

These Monitor commands allows you to read from an input port or output a byte to an output port.

Try them with port address C7h which is the scratchpad register on the 16550. Or flips bits 2 & 3 at port address C4h which are the 2 general purpose output pins of the 16550. Be careful when doing that because bit 1 controls the RTS line (keep it at 1).

Sir Isaac

unread,
May 15, 2017, 1:27:37 PM5/15/17
to RC2014-Z80
I thought it was x86 architecture,  oh well, still awesome :)

Ben Chong

unread,
May 20, 2017, 4:22:34 PM5/20/17
to RC2014-Z80
Folks, an adaptation of the IMSAI 8K BASIC (along with the manual in a txt file) is now available on GitHub.

The BASIC configured to run from RAM at 9000H. Works with Z80 or 8085 CPUs. Console I/O is achieved using the RST calls in the RC2014 BIOS.

If you are very familiar with MS BASIC, you'll want to read the manual first. IMSAI BASIC is a little bit more retro e.g. single character variable names etc.

The original source code of IMSAI BASIC can be found in various repos on the web, including at the Z80-Pack FTP site.

Scott Lawrence

unread,
May 21, 2017, 9:08:51 AM5/21/17
to rc201...@googlegroups.com
Excellent work, Ben. I'm a fan of your efforts. :D. I'm gonna have to check this out!

One side note, you mention the RC2014 Bios.  Is there such a thing?  Do you mean a bios made for this, or do you mean... what?  Since I know that CP/M had its own concept of a BIOS, but it sits way up in high memory, and has a specific interface. 

Is this one "compatible" with Nascom basic's which also sits down at 0000-00ff?

(Yes, I'm still on the "best bits of basic" kick I was on in previous emails... the mention of a RC BIOS brings up an idea of having a standardized set of routines for buffered(?) io, etc to be used in similar projects.  I can rework my CP/M bios to use these, etc)

Sent from my fancy-schmancy phone.
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/8383c2e8-933b-4aa8-bdcd-d2c04a3e265e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ben Chong

unread,
May 21, 2017, 11:19:31 AM5/21/17
to RC2014-Z80
The concept of an RC2014 comes from Grant Searle. In fact, his int32K.asm is basically a simple BIOS that initializes the hardware (serial devices) and provides a runtime API (via rst calls) for serial console i/o. There are more complex BIOS implementations like Bernd Ulmann's which include disk i/o as well and is called through a similar interface but using the index registers to hold parameters.

The best bet is to look at the source code to understand what APIs are in place.

I'd venture to say that CP/M doesn't work well with firmware-based BIOS because it assumes that it controls all of lower memory which is where the RC2014 BIOS sits today along with the various restart/interrupt vectors. So you'll need to juggle stuff around.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages