S100 Computers

Home S-100 Boards History New Boards Software Boards For Sale
Forum Other Web Sites Quiz Index    
  
A 68000 Monitor
Any 68000 S-100 board normally needs a built in monitor program to monitor its ability to interact with other S-100 bus boards. 
Unlike the Intel family of CPU's the 68K starts up at 0H in RAM  -- every time, no exceptions.  In the first four bytes of RAM it expects to find the location for its stack pointer (register A7).   It will always put what is there in A7. In the next four bytes of RAM it expects to find the RAM location for its program counter. With that value it will then jump to any location in its 16M address space.  These locations are hard wired into the chip. So any boot ROM must contain them in its first 8 bytes.  After that you can do what you like, but remember the CPU must start at 0H in RAM.  This is in marked contrast to the Intel CPU line which start at FFFF0H or FFFFF0H.

Now you could place a ROM monitor always at 0H in RAM,  but except for a dedicated application it would conflict with other software.  S-100 boards generally have a hardware "trick" that either switches out the Boot ROM or fools the 68K CPU into thinking it is reading from 0H RAM after a hardware reset.  The latter case is what our 68K S-100 board does.

Remember also for the 68K there are no special control/status signals for the control of I/O ports. As far as the 68K is concerned an I/O port is just another memory location. In order to emulate the S-100 bus port I/O status signals we set aside a block of the 68K's RAM address space for port I/O. The easiest block to use in hardware is the 64K space from FF0000 to FFFFFF.  Clearly way overkill, but with 16 MB of RAM we can afford to be sloppy.  So if the address lines A17-A23 are all high, pin 8 of U10 (a 74LS30, see here) goes low activating the S-100 bus port I/O signals (SOUT or sINP).  Port 01 is my Propeller driven Console I/O board data input port.  An byte write of 33H to RAM address 00FF0001H (port 01H),  should place an ASCII "3" character on the screen.  

Assembling 68K Programs.
There are many good assemblers for the 68000 family of CPU's.  I have been using a fantastic package written some time ago by Tim Larson, Paul McKee and Chuck Kelly called "Easy68K".  It can be downloaded from here.  It runs as its own self contained IDE in windows. Not only does it have a complete assembler but it has a self contained Run and Debug interface.   The only catch is that all console IO goes through the 68k software interrupt Trap #15.  Using this debugger you can quickly write and test code before programming an EEPROM.  The only change being you replace Trap #15 with an output to your Console I/O port.  In all my code examples then you will see some sections commented out to prevent interrupt Trap#15 at runtime.

A S100Computers 68K Monitor
My goal is to model a 68K monitor after the 8086 monitor I wrote.  I wanted to use all the same menu options -- to keep life simple. I should point out that there are a number of excellent well tested 68K monitor programs. The Motorola Educational Computer "Tutor" perhaps being the best known. As a total beginner I have found understanding this program a little tricky.  If needed it can be seen here.

I have opted to write my own 68K monitor. First to learn 68K assembly programming but perhaps more important it will allow me to more easily later splice in code (as I have in the 8086 monitor) to run diagnostic tests on our IDE and ZFDC controller boards.  This should help a lot getting CPM-68K up and running. This 68000 monitor program is "a work in progress".  The Windows emulator Easy68K has been very useful in laying its groundwork and initial debugging.  The most up to date versions can be obtained at the bottom of this page. 


The links below will contain the most recent versions of the above software.
Note, it may change over time and may not correlate exactly with the text in the article above.

EASY68K SOFTWARE (11/14/2011)

PDF FILE OF THE 68000 MONITOR   (V1.91  3/28/2012)
MOST CURRENT VERSION OF THE 68000 MONITOR SOFTWARE (V1.91 3/28/2012)

This page was last modified on 03/28/2012