MCS-4 Micro-Lab Software
Software Description.
The first issue in developing the software for this system was exactly how
to write it. There are obviously no development packages around for the
MCS-4 family. A search on the Web produced little in the way of development
tools. The initial code that I wrote was all hand assembled - just like
the old days. I soon realized that this would be way too cumbersome once
the code got to be more than a few hundred bytes in size. I also wanted to
be able to relocate routines and use labels for addresses. The solution to
this problem was to write my own assembler.
My assembler is written in 'C' and uses a two pass assembly method to
resolve labels. It allows code to be relocated via an "ORG" directive and
will produce both a list file and an Intel Hex format file for EPROM
programming. The assembler is hosted on the PC (DOS) but is easily portable
to any other environment.
Below is an example of the list file produced by the assembler:
ROM 0800
ORG 0000
0000 START:
0000 51 JMS REG-INIT
0001 6A
0002 55 JMS PMEM-INIT
0003 4C
0004 51 JMS DISP-INIT
0005 8E
0006 2C FIM RC,RD,#60
0007 60
0008 2D SRC RC,RD
0009 D0 LDM #0
000A E2 WRR
000B 6C INC RC
000C 2D SRC RC,RD
000D E2 WRR
000E BA XCH RA
000F 20 FIM R0,R1,&STARTUP-MSG
0010 D5
0011 57 JMS WRITE-MSG
0012 16
0013 MAIN-LOOP:
0013 51 JMS RD-KB ;RA=KEY, RB=BANK
0014 00
0015 AB LD RB
0016 14 JCN A0,MAIN-LOOP ;WAIT FOR FN KEY
0017 13