S100 Computers

Home S-100 Boards History New Boards Software Boards For Sale
Forum Other Web Sites News 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 16 bit 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 out there. 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. Note this 68000 monitor program is still "a work in progress".  The Windows emulator Easy68K has been very useful in laying the groundwork and initial debugging.  The most up to date versions can be obtained at the bottom of this page.  The current commands are as follows:-
  
A=Memmap    C=XMODEM(Bin) D=Disp RAM    E=Echo        F=Fill RAM
G=Goto RAM  H=Hex Math    I=Time        K=Menu        L=Test Interrupts
M=Move RAM  N=IDE Menu    Q=Port I/O    U=Serial Test S=Subs RAM
T=Type RAM  V=Verify RAM  X=Signals     Y=Patch       Z=Back to Z80
 
Of particular note is the "C" menu command. This command allows you to download an file from a  PC via a serial port connection.  It is currently configured for the serial port on the S100 bus Serial I/O board.  The XMODEM protocol is used. This is the same protocol we use for our Z80 and 8086 monitors to typically download .bin files.  Before the download the monitor request where in the 68K's 16MB address space the program is to be loaded.  Once downloaded, you can use the monitor "G" to have the 68K jump to that location.   This is very useful for developing new software and indeed developing the 68K monitor itself.
 
Unlike the Intel/Zilog chips, Motorola 68K programs are often distributed in "S" file formats instead of HEX or .BIN files.  For example the above Easy68K program assembles the file into a .S68, "S" file format.   Fortunately there is an excellent  simple program (written back in 2000, by Ant Goffart) called srec2bin.exe, to convert "S" files to .bin files.   The program downloaded is at the bottom of this page.  It runs under windows in the Command Prompt box.  Use:-
 
  Dos Box
   
The command is:-
srce2bin input.s  output.bin

BTW, there is another way to convert Motorola ".S" files to ".BIN" files if you use the Wellon series of ROM Programmers.  You load the ".S" program by clicking on the "Load File" button.  If you then "Save File", is will save the file in a .bin format. (You don't actually need the programmer hardware BTW. The program can be downloaded from here).

If you have an actual Wellon EEPROM Programmer, here is a picture of the burn menu:-
 
  68K ROM Burn
    




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)

SREC2BIN SOFTWARE      (5/3/2014)
MOST CURRENT VERSION OF THE 68000 MONITOR SOFTWARE.ZIP FILE   
(V3.0 7/27/2020)
MOST CURRENT VERSION OF THE 68000 MONITOR SOFTWARE  (Text File)   (V3.0 7/27/2020)

This page was last modified on 07/27/2020