Introduction

As the title says, this is a replica of the MICRO 68 User Manual by EPA. I will also be including a scan of the manual. The original manual is 63 pages, but some of the pages are missing. Specifically they are:

  • Page 36 - Mon-1 Program listing from $FF9F to $FFD2
  • Page 57 - Micro 68 Schematic
  • Page 58 - Micro 68 Schematic
  • Page 59 - 8K Static Memory
  • Page 60 - 8K Static Memory

I will fill the missing pages as best possible. This won't be a huge problem because I own a EPA Micro 68. I have a complete EPA Micro 68 (grey plastic overlay cover) with the Wooden Cabinet ( power supply in base) and an 8K Static Memory board. Oh yea, I also have the EPA Cassette Interface.

Although, I also have a Debug board?? I know nothing about it and have no documentation for it. The board fits nicely in the EPA Micro 68 cabinet. The unique part of this board is that the top section protrudes out of the cabinet. The section that protrudes has multiple dip switches and rotary hex switches. From the printing on the board it appears that the user can set addresses and extract data while the computer is running. I will probably just have to reverse engineer it.

In keeping with the general convention of my assembler, Hexadecimal numbers start with a "$", Octal numbers start with a "@", Binary numbers start with a "%". Decimal numbers have no preceeding symbol. An exception to this convention is in the MON-1 Program Listing. In that listing, the Line Numbers are Decimal but the Address, Op-Code, and Operand is in Hexadecimal. The board also has a Halt/Run switch and switches for single stepping.

The Table of Contents below, is linked to all of the manual sections. Each section linked has a Up-To-Top link (), on the far right of the page, that will take you back to the top of this web page and the Table of Contents.

TABLE OF CONTENTS
THE MICRO 68 COMPUTER
RESET FUNCTION
LED DISPLAY
HEXADECIMAL NOTATION
THE KEYBOARD COMMANDS
KEYBOARD COMMAND KEYS
THE EXAMINE COMMAND
THE FORWARD COMMAND
THE BACK COMMAND
THE CHANGE COMMAND
THE AUTO COMMAND
THE RETURN FROM INTERRUPT COMMAND
SAVE STACK LOCATIONS
THE LOAD MEMORY COMMAND
PORTS
EXAMPLE
LED DISPLAY EXERCISE
SUBROUTINES
THE DISPLAY SUBROUTINE
THE WRDATA SUBROUTINE
THE INPUT SUBROUTINE
THE BYTEOUT SUBROUTINE
THE ADROUT SUBROUTINE
THE BYTEIN SUBROUTINE
USING THE MON-1 SUBROUTINES
"HELLO CAN I HELP YOU?" PROGRAM
KEYBOARD MONITOR PROGRAM LISTING (MON-1)
APPENDIX
A. KEYBOARD MONITOR FLOW DIAGRAMS
MICRO 68 PARTS LIST
B. MICRO 68 PC BOARD BLOCK DIAGRAM
C. MICRO 68 SCHEMATIC
D. 8K STATIC MEMORY
INSTALLING BUS DRIVERS ON MICRO 68
INSTALLING BUS DRIVERS DIAGRAM
 
LIST OF FIGURES
FIGURETITLE
1MINIMUM COMPUTER SYSTEM
2PERIPHERAL HOOK-UP
3PIA-INTERNAL ORGANIZATION
4READER DATA FORMAT
5MEMORY MAP
6SUBROUTINE HIERARCHY
7TYPICAL INTERNAL ORGANIZATION OF A CPU
8MC6800 MPU INTERNAL ORGINIZATION
 
LIST OF TABLES
TABLETITLE
1ACCUMULATOR AND MEMORY INSTRUCTIONS
2INDEX REGISTER AND STACK MANIPULATION INSTRUCTIONS
3JUMP AND BRANCH INSTRUCTIONS
4CONDITION CODE REGISTER MANIPULATION INSTRUCTIONS
EPA Micro-68 User Manual - Weatherford

The Micro 68 Computer

C D E F
89AB
4567
0123

The MICRO 68 computer was designed and is fabricated by ELECTRONIC PRODUCT ASSOCIATES, INC. of San Diego, California to enable layman, engineers, and scientists to quickly learn to use and obtain practical results from a computer. The MICRO 68 is a light-weight, desk-usable, portable and economical computer. The unit is powered from an ordinary 110 VAC outlet.

MICRO 68 is operated with 16 keys ($0-$F) on the hexadecimal (base 16) KEY-BOARD.

RESET FUNCTION

Reset - is initialized by simultaneously depressing the "0" and "4" keys. The resulting initialized KEYBOARD control program provides input/output (I/O) communication between the keyboard and the LIGHT-EMITTING-DIODE (LED) display. RESET does not affect memory in the user's area.

Depress RESET        EPA UP Displayed
(0 and 4 KEYS)

LED DISPLAY

LED Display - The LED display presents a memory address and the contents at that address in hexadecimal notation. The address is presented by the leftmost group of 4 digits. The contents at that address are presented by the rightmost group of two digits.

HEXADECIMAL NOTATION

BINARYDECIMALHEXADECIMAL
%00000$0
%00011$1
%00102$2
%00113$3
%01004$4
%01015$5
%01106$6
%01117$7
%10008$8
%10019$9
%101010$A
%101111$B
%110012$C
%110113$D
%111014$E
%111115$F
%1000016$10
%1000117$11
:::
Binary...23222120
Decimal...103102101100
Hexadecimal...163162161160

Hexadecimal notation is a base 16 numbering system, wherein 16 symbols are used (0 through F). In most numbering systems, each symbol represents a certain value. Its position or place in relation to other symbols gives the value and additional weighting factor.

EXAMPLE
ADDRESSCONTENTS
1000 0011 1010 1011 1000 1100
8 3 A B 8 C

The MICRO 68 computer deals internally with binary. However, binary is somewhat cumbersome to work with from a user's standpoint. It is more convenient to work with more symbols and less symbol positions. You will notice that one hexadecimal digit represents the same value as four binary digits. Thus, given any binary number; assemble the binary digits in to groups of 4; write 1 hexadecimal digit for each group and you have the binary number equivalently written in hexadecimal notation. The MICRO 68 computer deals with a 16 binary digit address (memory location) and the 8 binary digit contents of that memory location. Using the groups of 4 method, it is a simple and convenient to represent the 16 binary digit address as 4 hexadecimal digits and the 8 binary digit (bit) contents as 2 hexadecimal digits.

THE KEYBOARD COMMANDS
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
CHANGE
DO
AUTO
BACK
EXAMINE
FORWARD
RTI
R
E
S
E
T

0, 4, A, B, C, D, E, F, 8, and 9 double as COMMAND keys when MICRO 68 is in an expect command mode. In all other modes each key represents a hexadecimal number. The commands let you enter, edit, and execute a program.

Note: There are actually two versions of the MICRO 68, that I know about. The difference is that, the earlier version of the MICRO 68 did NOT use the 0/4 KEYS for RESET. Instead, the earlier version had a single push button switch mounted on the plastic cover, in the center-rear. But other than that, the two versions should be very much the same. - K7MEM

THE EXAMINE COMMAND

Enter EXAMINE (E)        ---- -- Displayed
Enter 0003        0003 00 Displayed
       * 00 is used as an example

The "E" key doubles as EXAMINE. This command lets you enter a personally selected address (memory location) of four digits.

THE FORWARD COMMAND

Enter FORWARD (F)        0004 FF Displayed
Enter FORWARD        0005 04 Displayed
Enter FORWARD        0006 A8 Displayed
       * These are examples only

The "F" key doubles as FORWARD. This command lets you increment the displayed address by one digit. Repeating the command lets you step forward through memory and examine the contents of each succeeding address.

THE BACK COMMAND

Enter BACK (B)        0005 04 Displayed
Enter BACK        0004 FF Displayed

The "B" key doubles as BACK. This command lets you decrement the displayed address by one digit. Repeating the command lets you step back through memory and examine the contents of each preceding address.

THE CHANGE COMMAND

Enter CHANGE (C)        0004 -- Displayed
Enter 86        0005 86 Displayed

The "C" key doubles as CHANGE. This command lets you modify the contents of thememory location.

If no memory exists at the selected location, the contents will display undefined data and no modifications can be made. The appearance of two dashes (--) after ENTERING two content digits, indicates that you are trying to midify the contents of a non-existant memory location.

THE AUTO COMMAND

Enter AUTO (A)        0004 ·· Displayed
Enter 86        0005 ·· Displayed
Enter 00        0006 ·· Displayed
Enter 14        0007 ·· Displayed
       ······ and so on

The "A" key doubles as AUTO. This command causes the contents to be cleared and the address to be automatically incremented.

Note: When the 2nd digit key is depressed, content is registered and displayed. When the key is released, the address is automatically incremented and the content is cleared and ready for new content insertion. Automatic command is exited by pressing RESET.

THE DO COMMAND

Enter DO (D)        ···· do Displayed
Enter 86        0007 ·· At this point, the MICRO 68 will start
executing instructions beginning at 0007.

The "D" key doubles as DO. This command lets you enter the starting address of a program, and immediately enables MICRO 68 to execute the program.

THE RETURN FROM INTERRUPT COMMAND

The "8" key doubles as RETURN FROM INTERRUPT (RTI). This command lets you handle interrupts from the keyboard. Pushing the RTI key causes a return from interrupt instruction to be executed in the keyboard control program.

Upon execution of your program, the stack pointer is left pointing at location 0067. Assuming that your program does not modify the value of the STACK POINTER, an interrupt willhave the following effect:

The STATUS of the MPU will be saved in locations 0067 through 0061. The STACK POINTER will be left pointing at location 0060 and control passes to the keyboard control program. You can then examine and change the saved status of the MPU. To return to the interrupted program, enter the RTI command. This causes the MPU to be reloaded with the current values in the SAVE STACK. Execution resumes.

If your program happens to modify the value of the STACK POINTER an interrupt will have the same effect as just explained, except the SAVE STACK will be located wherever the STACK POINTER is stored in locations 0068 and 0069. You can know exactly where the SAVE STACK is by examining locations 0086 and 0069 after an interrupt. The RTI command causes the MPU to be reloaded from the SAVE STACK wherever it was located after the interrupt occurred.

SAVE STACK LOCATIONS

RAM LOCATION    CONTENTS AT LOCATION
$0061    Condition Codes Register
$0062    B Accumulator
$0063    A Accumulator
$0064    Index Register, High Order 8 bits
$0065    Index Register, Low Order 8 bits
$0066    Program Counter, High Order 8 bits
$0067    Program Counter, Low Order 8 bits
$0068    Stack Pointer, High Order 8 bits
$0069    Stack Pointer, Low Order 8 bits

For some information on interrupts (the SAVE STACK), see Pages 22-25 of the AMI SYSTEMS REFERENCE AND DATA SHEETS MANUAL.

Except for the RESET interrupt, you can specify the interrupt destination. The destination after the RESET interruptis always the keyboard control program. By default, the destination after the NON MASKABLE INTERRUPT (NMI) and the SOFTWARE INTERRUPT (SWI) is also the keyboard control program. The destination of these three interrupts can be specified by you by changing the following RAM locations.

LOCATION    SPECIFICATION
$006A - High Order 8 bits    IRQ Destination Address (16 bits)
$006B - High Order 8 bits   
$006C - High Order 8 bits    SWI Destination Address (16 bits)
$006D - High Order 8 bits   
$006E - High Order 8 bits    NMI Destination Address (16 bits)
$006F - High Order 8 bits   

For some information on interrupt vectors (DESTINATIONS), see Pages 22-25 of the AMI SYSTEMS REFERENCE AND DATA SHEETS MANUAL.

THE LOAD MEMORY COMMAND

FIGURE 2 - PERIPHERAL HOOK-UP.
M
I
C
R
O
6
8
I
/
O
C
O
N
N
E
C
T
O
R
P
2
P
E
R
I
P
H
E
R
A
L
D
E
V
I
C
E
R1
3K
5V
A
CA1
ACKN
1
CA2
REQUEST
2
PA0
DATA0
3
PA1
DATA1
4
PA2
DATA2
5
PA3
DATA3
6
PA4
DATA4
7
PA5
DATA5
8
PA6
DATA6
9
PA7
DATA7

The "9" key doubles as LOAD MEMORY (LOAD). This command lets you load the RANDOM ACCESS MEMORY (RAM) automatically from an external device such as a paper tape reader or mark-sense card reader. Figure 2 shows the I/O signals used for this feature.

FIGURE 3. PIA INTERNAL ORGANIZATION
DATA BUS
BUFFERS
(DDB)
VDD
VSS
BUS INPUT
REG.
(BIR)
CHIP
SELECT
AND R/W
CONTROL
CONTROL
REG. A
(CRA)
OUTPUT
REG. A
(ORA)
OUTPUT
REG. B
(ORB)
CONTROL
REG. B
(CRB)
INT/
STATUS
CONTROL
DATA
DIRECTION
REG. A
(DDRA)
PERIPH.
INTERFACE
A
PERIPH.
INTERFACE
B
DATA
DIRECTION
REG. B
(DDRB)
INT/
STATUS
CONTROL
INPUT BUS
OUTPUT BUS
D7
D6
D6
D4
D3
D2
D1
D0
PA7
PA6
PA6
PA4
PA3
PA2
PA1
PA0
PB7
PB6
PB6
PB4
PB3
PB2
PB1
PB0
RESET
E
R/W
RS14
RS0
CS3
CS2
CS1
CA2
CA1
IRQA
CB2
CB1
IRQB

Any user selected peripheral device may be used, subject to the interface requirements of the M6800 PIA (see Figure 3 for PIA - Internal Organization) and the timing requirements of the LOAD MEMORY software. When the user presses the "9" Key while the monitor program is waiting for a command, the LOAD MEMORY sub-program is initiated. This is indicated by the word "LOAD" displayed in the first 4 leds. The last 2 leds are used to give a running display of the data being read during the course of the actual load from the peripheral device and at the same time, displays two zeros. At this point, the program has caused the CA2 (REQUEST) Line to go low, indicating a request for data from the peripheral device. The peripheral device should now put 8 bits of data on the DATA0 - DATA7 Lines and raise the CA1 (ACKNOWLEDGE) line. This leading edge of the CA1 Line (low-to-high) tells the M6800 that the data onthe line is valid. The M6800 immediately raises the CA2 line to tell the peripheral device that the ACKNOWLEDGE has been received. The peripheral device should now drop the ACKNOWLEDGE signal.

The peripheral devices should hold the data on the lines until the M6800 drops the CA2 line indicating the next REQUEST. This REQUEST/ACKNOWLEDGE Handshake Loop will continue as long as the M6800 requires more data. Figure4 describes the data format.

FIGURE 4 - READER DATA FORMAT.
NUMBER
OF BYTES
LEADER
NULL Frames - Ignored by program
Any number allowed.
1
7E16
HEADER Code
Validated by program.
2
BLOCK ADR
2 BYTES - First Byte is upper 8 bits
Any number allowed.
1
INCREMENT
Number of Data Words- 1.
1-256
DATA
8 Bit Frames - One per RAM byte.
In Memory - Quantity of Data Words
may be 1-25610, depending on the
INCREMENT Word.
1
CHECKSUM
Block CHECKSUM
TRAILER

Any number of NULL frames may be at the beginning of the DATA BLOCK until the first Non-NULL frame is read. This frame is compared to a 7E Code (Binary 01111110) to validate the DATA BLOCK as being in the proper format. If it is not in a 7E Code format, a "BAD-XX" will be displayed in the leds (XX is the actual code read) and an abort exit will be taken back to main part of the monitor routine.

Any data frame that is read, is displayed in the rightmost 2 leds until the next frame is read and displayed.

The next 2 frames that are read are 16-bits of block address. These frames are displayed one-at-a-time in the 2 rightmost leds as they come in, and then the combined 4 hex-digit address is displayed in the 4 leftmost leds, overwriting the "LOAD" message. This 4-digit address remains displayed until all data and the CHECKSUM for this block have been read.

The next frame is the first increment of data words following in the block. For example, if the increment 25510, there are 25610 data words to follow.

The DATA BLOCK may have anywhere from 1 to 25610 words in it, depending on the increment. The first word in the DATA BLOCK is stored at the address specified by the BLOCK ADR. All succeeding data words are stored sequentially in RAM, one frame per RAM word.

The CHECKSUM word is an 8-bit number such that the one's complement, additivesum of the block addresss (both bytes), INCR, data frames, and CHECKSUM will add to an "FF" Code. This computation is made while these frames are read. If a BAD SUM is obtained, an error abort is taken back to the mainmonior routine, leaving the BAD-XX" messsage in the leds,where XX represents the calculated BAD SUM. To recover from a "Bad Read" of this block, reinitialize the peripheral device at the beginning of the block and press the LOAD MEMORY key ("9") again, for a repeat try at reading the block.

If a "Good Read" of the block is obtained, as indicated by a good CHECKSUM computation the program reads the next frame to see if there are any more blocks. A NULL Frame indicates that there are no more blocks to read. The LOAD MEMORY program exits to the MAIN MEMORY program and displays the "UP" message, which is the "GOOD-LOAD" indication. If the next frame was not NULL, the LOAD MEMORY program restarts the BLOCK-READ Loop. This validates that the frame as a HEADER (7E) code and continues as described above.

Any number of blocks of varying sizes may be read in one continuous operation. The data within a block, but not the blocks, must be sequentially loacated in memory.

PORTS
MEMORY LOCATION  
$8004 } A side of Keyboard PIA
$8005
$8006 } B side of Keyboard PIA
$8007
$8008 } A side of LED DISPLAY PIA
$8009
$800A } B side of LED DISPLAY PIA
$800B

The MICRO 68 has 2 Peripheral Interface Adapters (PIA). One PIA is dedicated to the LED display and the other to the keyboard. Each PIA has an A or B side. Each side (A or B) of either PIA is addressed by two memory locations.

The sixteen peripheral lines of the keyboard PIA are configured as INPUT LINES and correspond to the keys on the Keyboard as follows.

Bit 76543210
MEMORY LOCATION $8004                                
Key 76543210
Bit 76543210
MEMORY LOCATION $8006                                
Key FEDCBA98

Each key is a normally open switch connected to a data line of a PIA with a pull up resistor. With the keys in the normally open position (up), the 8 bits of data at location 8004 and the 8 bits of data at location 8006 appear as ones (1) (all lines high). Depressing a key pulls the corresponding data line to ground and causes a zero (0) bit to appear in the appropriate memory locations. A zero bit appears only as long as the key is depressed.

The sixteen peripheral lines of the LED DISPLAY PIA are configured as OUTPUT LINES. The 8 lines corresponding to the 8 bits of memory location 800A, determine which of the 6 LED's are enabled. Bit n enables LED n.

LED 1
LED 2
LED 3
LED 4
LED 5
LED 6
800A = -
Bit ----
7
6
5
4
3
2
1
0
Not Used
Not Used
A "1" in the corresponding bit position will ENABLE a LED.
8008 = -
Bit ----
7
a
6
b
5
c
4
d
3
e
2
f
1
g
0
dp
a
b
c
d
e
f
g
dp
The 8 lines corresponding to the 8
bits of memory location 8008
determine which LED SEGMENTS
are turned ON in all of the
ENABLED LED's:

In this application a ZERO (0) in the corresponding bit position turns a segment ON. A ONE (1) turns a segment OFF.

EXAMPLE

To display three "E"s on the LED DISPLAY IN A USER'S PROGRAM:

  1. Select the first three LED's by writing the following bit pattern into memory location 800A: 00001100
  2. Select the segments necessary to display "E" by writing the following bit pattern into memory location 8008: 01100001
LED DISPLAY EXERCISE
$0000 $86 LOAD the A register with the bit pattern
$0001 $0E 00000110 = (0E16)
$0002 $87 Store contents of A register in memory
$0003 $80 location 800A
$0004 $0A (This ENABLES the first 3 LED's)
$0005 $86 LOAD the A register with the bit pattern
$0006 $61 01100001 = (6116)
$0007 $87 Store contents of A register in memory
$0008 $80 location 8008
$0009 $08 (This LIGHTS UP the SEGMENTS for an "E")
$000A $3E WAIT (HALT here and WAIT FOR RESET to be pushed)

LOAD this program at 0000. Enter the "DO" command and a starting address of 0000 . You will see three "E"'s in the leftmost LED's.

SUBROUTINES

THE DISPLAY SUBROUTINE - MEMORY LOCATION: $FFCB

FIGURE 5 - MEMORY MAP.
ADDRESS
$FFFF
$FE00
KEYBOARD CONTROL
PROM LOCATIONS
$FDFF
$0080
USER'S MEMORY
EXPANDABLE TO 64K
OF RAM + ROM + PROM
$007F
$0068
KEYBOARD CONTROL
PROGRAM USES THIS AREA
FOR TEMPORARY STORAGE
$0067
$0061
MPU REGISTERS GET
STORED HERE WHEN AN
INTERRUPT OCCURS
$0060
$005B
STACK AREA FOR MONITOR
SUBROUTINE ADDRESS
SAVE
$005A
$0000
USER'S AREA
RAM   - RANDOM ACCESS MEMORY
ROM   - READ ONLY MEMORY
PROM - PROGRAMMABLE ROM
MPU   - MICRO PROCESSOR UNIT

The Display Subroutine displays each of 6 characters in a single left-to-right scan of the 6 LED's of the MICRO 68. The 6 characters displayed (See Figure 5. - Memory Map) are stored as bit patterns which cause the appropriate 7 segment characters to light up. The 6 bit patterns for the DISPLAY subroutine are fetched from locations $0078, $0079, $007A, $007B, $007C, $007D. The LOAD DISPLAY routine (see LOAD DISPLAY description) may be used to accomplish the number-to-character bit pattern conversion. The DISPLAY Subroutine is called the GETCHAR Subroutine.

For example: EPA UP
MEM. LOC. BIT PATTERN HEXADECIMAL CHAR
$0078 %01100001 $61 E
$0079 %00110001 $31 P
$007A %00010001 $11 A
$007B %11111111 $FF (blank)
$007C %10000011 $83 U
$007D %01100001 $31 P

This subroutine uses the A, B, and Index Registers.

THE WRDATA SUBROUTINE - MEMORY LOCATION: $FFB6

The WRDATA subroutine converts a 4-bit binary number, passed via the A register, into a bit pattern which lights up the corresponding hexadecimal character in a LED display. The subroutine uses a sequential table of patterns found at locations FFE8 through FFF7 which represent the HEXADECIMAL characters 0 throuth F, respectively. The LOAD DISPLAY subroutine can be disabled by setting the DISPLAY INHIBIT flag (NOWRF) (at memory location 0074) TO "1". The contents of the A register are left undefined with the original contents saved at memory location 007F. The INPUT subroutine uses the WRDATA subroutine to load the bit pattern of the character currently being fetched from the keyboard. The WRDATA subroutine loads the bit pattern at the effective memory location (0078 +(0077)) where the contents of memory location 0077 serves as a pointer (or offset) for the 6 possible storage locations at 0078 through 007D.

The contents of memory location 0077 are incremented by one each time a bit pattern gets stored.

This subroutine uses the A and INDEX REGISTERS.

THE INPUT SUBROUTINE - MEMORY LOCATION: $FF93

The INPUT subroutine scans the 16 keys of the keyboard for input and calls on the DISPLAY subroutine to refresh the LED display between each scan. The keys have sequential priority and the "F" key has the highest priority.

The INPUT subroutine uses the WRDATA subroutine to save the character input for the keyboard. INPUT continues to loop (always calling DISPLAY after each scan) until the depressed key is released. The character is displayed just after the key is depressed and before the key is released unless the display inhibit flag (memory location 0074) is set.

This subroutine uses the A, B and INDEX REGISTERS.

THE BYTEOUT SUBROUTINE - MEMORY LOCATION: $FF47

The BYTEOUT subroutine converts an 8-bit binary number, passed via the A register into two bit patterns. These patterns light up two corresponding hexadecimal characters in the led display. The 8-bit binary number is split into two 4-bit binary numbers. The WRDATA subroutine is called twice in order to write the two led display patterns in two sequential effective memory patterns (see WRDATA subroutine description). The 8-bit data word is left in the B register upon exit from the subroutine.

This subroutine uses the INDEX REGISTERS.

THE ADROUT SUBROUTINE - MEMORY LOCATION: $FFD4

The ADROUT subroutine converts a 16-bit binary number to 4 led display codes. The 16-bit binary number is fetched by the ADROUT subroutine from locations 0072 (upper 8-bits) and 0073 (lower 8-bits). The BYTOUT subroutine is called twice, once for each 8-bit byte. The 7-segment led codes are placed in locations 0078-007B, and will display the first 4 leds.

This subroutine uses the A, B and INDEX REGISTERS.

THE BYTEIN SUBROUTINE - MEMORY LOCATION: $FF54

The BYTEIN subroutine builds a composite 8-bit binary number from two keyboard entries. It makes two calls on the INPUT subroutine. The first user entry at the keyboard becomes the upper 4-bits and the second keyboard entry becomes the lower 4-bits of the final 8-bit binary number. The A register contains this 8-bit number upon exit from the subroutine.

This subroutine uses the A, B and INDEX REGISTERS.

USING THE MON-1 SUBROUTINES

An automatic display of contigous memory locations. This program is to demonstrate calling on some of the Keyboard Control Program subroutines. The program displays successive addresses and the contents at each address, automatically incremented in 1 sec. intervals. The beginning address to be displayed is specified by the user in locations $0000, $0001.

LOCATION HEX CODE COMMENT
$0003 $DE Load index register from location 0000,
0001
$0004 $00
$0005 $DF Store contents of index register at location
0072, 0073 (Parameter locations for the
ADDRESS OUT SUBROUTINE)
$0006 $72
$0007 $BD Call the addressout (ADROUT) subroutine
to load the LED Buffers with the address
to be displayed
$0008 $FE
$0009 $D4
".....HELLO CAN I HELP YOU?" PROGRAM

This program will display ".....HELLO CAN I HELP YOU?" across the LED displays in a flowing, ticker-tape fashion. The message will continue to cycle until RESET is pressed. The program is absolute and must run in RAM. The STARTING ADDRESS of the program is 0029. The message list begins at 0000 and ends at 0028 (41 locations). The 41 message list locations may be filled with many different messages represented by the hexadecimal bit patterns in those locations. The value of location 0044 determines the speed of the scan.

Note, I split the program listing into two columns. This was to save a little space and make the listing more readable. If it is is easier to read, a fully assembled version of the .....HELLO CAN I HELP YOU? is available for download, in RTF format. - K7MEM

LOCATION HEX CODE COMMENT
0000FE.
0001FE.
0002FE.
0003FE.
0004FE.
0005FE.
000691H
000761E
0008E3L
0009E3L
000A03O
000BFF
000CFF
000DFF
000EFF
000F63C
001011A
001113N
0012FF
0013FF
0014FF
00159FI
0016FF
0017FF
0018FF
001991H
001A61E
001BE3L
001C31P
001DFF
001EFF
001FFF
002089Y
002103O
002283U
0023FF
002435?
0025FF
0026FF
0027FF
0028FF
LOCATION HEX CODE COMMENT
0029 7F Clear location $0034
002A 00
002B 34
002C CE Load index register with "0000"
002D 00
002E 00
002F 86 Load a register with "78"
0030 78
0031 97 Store contents of a register at
location 0036
0032 36
0033 A6 Load A register (indexed)
offset will change in execution
0034 00
0035 97 Store contents of A at location
this value will change in execution
0036 00
0037 7C Increment locations 0034 and 0036
this will increment
the FETCH POINTER
0038 00
0039 34
003A 7C and the STORE POINTER
003B 00
003C 36
003D D6 Load B register with current
value of location 0036
003E 36
003F C1 Compare contents of register
with "7E"
0040 7E
0041 26 Branch if contents of B register
!= 7E
0042 F0
0043 86 Store "F1" at location 0036
0044 F1
0045 97 Location 0036 is temporarily
being used as a counter
0046 36
0047 BD Call the display subroutine from
the keyboard control program
0048 00
0049 00
004A 7C Increment location 0036 (counter)
004B 00
004C 36
004D 26 Loop until counter overflows
to zero (scan timing)
004E F8
004F 96 Load a register with contents
of location 0034
0050 34
0051 80 Subtract 5 from contents in A
0052 05
0053 97 Restore contents of A in
location 0034
0054 34
0055 81 If current value of location 0034
= 24 then end of message list
0056 24
0057 26 Branch back to location 002C if
NOT end of message list
0058 D3
0059 20 Branch back to top of program
(0029) if end of message list
005A CE
Keyboard Monitor Program Listing (Mon-1)

This listing should match one-to-one with the listing from the original manual. But it will be much clearer. Note that line 157 was replaced due to an error that was flagged in my assembler. I didn't want to trouble shoot the problem, so I just fixed it in the code.

        LINE  ADDR OP OPER	LABEL	OPCODE	OPERAND/COMMENT
----- ---- -- ----	-----	------	-----------------------------------
00001		NAM	MONITOR 1 (MON-1) PROGRAM (EPA)
00002	;
00003	; Keyboard Monitor Program Listing (Mon-1)
00004	;
00005	; EPA Micro 68
00006	; Electronic Product Associates, Inc.
00007	; San Diego, California 92110
00008	;
00009	; OPT SHORT ; Set for short listing
00010	;
00011	; S19 START ADDRESS, END ADDRESS, AND JUMP ADDRESS.
00012        		OPT	S0_HDR,S1_STA=$FE00,S1_END=$FFFF,S9_JMP=$FE8A
00013	;
00014	; INTEL HEX START ADDRESS, END ADDRESS.
00015        		OPT	IHEX_STA=$FE00,IHEX_END=$FFFF
00016	;
00017 0060		ORG	$0060	; HEX ADR 60.
00018 0060 0006	STACK	RMB	6	; STACK AREA.
00019 0066 0001	PCH	RMB	1	; PROGRAM COUNTER, HIGH.
00020 0067 0001	PCL	RMB	1	; PROGRAM COUNTER, LOW.
00021 0068 0002	SP	RMB	2	; STACKPOINTER.
00022 006A 0002	IRQADR	RMB	2	; IRQ ADR HOLDER.
00023 006C 0002	SWIADR	RMB	2	; SWI ADR HOLDER.
00024 006E 0002	NMIADR	RMB	2	; NMI ADR HOLDER.
00025 0070 0001	TEMP1	RMB	1	; TEMPORARY.
00026 0071 0001	DESFLAG	RMB	1	; DO/EXAMINE/STEP FLAG.
00027 0072 0001	ADRU	RMB	1	; ADDRESS HOLDER, UPPER.
00028 0073 0001	ADRL	RMB	1	; ADDRESS HOLDER, LOWER.
00029 0074 0001	NOWRF	RMB	1	; NO-WRITE FLAG
00030 0075 0001	FOUND	RMB	1	; PUSH BUTTON FOUND FLAG.
00031 0076 0001	DPU	RMB	1	; DIGIT POINTER, UPPER.
00032 0077 0001	DPL	RMB	1	; DIGIT POINTER, LOWER.
00033 0078 0001	DIGIT1	RMB	1	; DIGIT CELL NUMBER 1.
00034 0079 0001	DIGIT2	RMB	1	; DIGIT CELL NUMBER 2.
00035 007A 0001	DIGIT3	RMB	1	; DIGIT CELL NUMBER 3.
00036 007B 0001	DIGIT4	RMB	1	; DIGIT CELL NUMBER 4.
00037 007C 0001	DIGIT5	RMB	1	; DIGIT CELL NUMBER 5.
00038 007D 0001	DIGIT6	RMB	1	; DIGIT CELL NUMBER 6.
00039 007E 0001	TBLADRU	RMB	1	; 7-SEG CONT TBL ADR, UPPER.
00040 007F 0001	TBLADRL	RMB	1	; 7-SEG CONT TBL ADR, LOWER.
00041	;
00042 8004		ORG	$8004	; HEX ADR 8004
00043 8004 0001	CHAN0	RMB	1	; KB DATA, KEYS 0-7
00044 8005 0001	CHAN0C	RMB	1	; KB CONTROL, KEYS 0-7
00045 8006 0001	CHAN1	RMB	1	; KB DATA, KEYS 8-F
00046 8007 0001	CHAN1C	RMB	1	; KB CONTROL, KEYS 8-F
00047 8008 0001	CHAN2	RMB	1	; LED DATA, SEGMENTS
00048 8009 0001	CHAN2C	RMB	1	; LED CONTROL, SEGMENTS
00049 800A 0001	CHAN3	RMB	1	; LED DATA, DIGITS
00050 800B 0001	CHAN3C	RMB	1	; LED CONTROL, DIGITS
00051	;
00052 FE00		ORG	$FE00	; HEX ADR FE00
00053	;
00054 FE00 DE 6E	NMI	LDX	NMIADR	; GO TO CELL WHOSE
00055 FE02 6E 00		JMP	0,X	; ADR IS IN NMIADR.
00056	;
00057 FE04 DE 6C	SWI	LDX	SWIADR	; GO TO CELL WHOSE
00058 FE06 6E 00		JMP	0,X	; ADR IS IN SWIADR.
00059	;
00060 FE08 9E 6A	IRQ	LDS	IRQADR	; GO TO CELL WHOSE
00061 FE0A 6E 00		JMP	0,X	; ADR IS IN IRQADR.
00062	;
00063	; FRAME reads one frame from the Paper Tape Reader,
00064	; echos it to the lowest 2 LEDS in hex format and
00065	; adds it into the running CHECKSUM.
00066	;
00067	; The execution time for FRAME dependson the speed
00068	; of the reader. If any control key is pushed, the
LINE  ADDR OP OPER	LABEL	OPCODE	OPERAND
----- ---- -- ----	-----	------	-----------------------------------
00069	; FRAME routine aborts, resets the I/O channels, and
00070	; goes to the CONTROL loop.
00071	;
00072 FE0C BD FF CC	FRAME	JSR	DISPLAY	; STROBE THELEDS.
00073 FE0F B6 80 06		LDAA	CHAN1	; IF THERE IS A
00074 FE12 43		COMA		; CONTROL KEY (8-F)
00075 FE13 26 61		BNE	KEY	; HELD DOWN,GO TO KEY.
00076 FE15 7D 80 05		TST	CHAN0C	; WAIT FOR CA1
00077 FE18 2A F2		BPL	FRAME	; TO GO SET.
00078	;
00079	; STRTREAD is an entry point used to start the reader
00080	; the first time by causing CA2 to go low in response
00081	; to a READ of channel 0.
00082	;
00083 FE1A B6 80 04	STRTREAD	LDAA	CHAN0	; READ IN DATA PRIME.
00084 FE1D 43		COMA		; MAKE IT TRUE.
00085 FE1E 16		TAB		; ADD
00086 FE1F DB 70		ADDB	TEMP1	; IT
00087 FE21 C9 01		ADCB	#1	; INTO
00088 FE23 D7 70		STAB	TEMP1	; CHECKSUM.
00089	;
00090	; FRAMEOUT is an entry point used to display 2 hex
00091	; digits and reset DPL to 4.
00092	;
00093 FE25 BD FF 47	FRAMEOUT	JSR	BYTEOUT	; DISPLAY IT.
00094	;
00095	; SETUP is an entry point used to reset DPL to 4.
00096	;
00097 FE28 86 04	SETUP	LDAA	#4	; SET UP DIGIT POINTER
00098 FE2A 97 77		STAA	DPL	; FOR NEXT TIME.
00099 FE2C 5D		TSTB		; TEST FOR ZERO FRAME.
00100 FE2D 39		RTS		; EXIT
00101	;
00102 FE2E C6 26	LOAD	LDAB	#@46	; SET UP
00103 FE30 F7 80 05		STAB	CHAN0C	; READER CHANNEL.
00104 FE33 8E E3 03		LDS	#$E303	; WRITE
00105 FE36 DF 78		STX	DIGIT1	; OUT
00106 FE38 CE 11 85		LDX	#$1185	; 'LOAD' TO
00107 FE3B DF 7A		STX	DIGIT3	; LED CELLS.
00108 FE3D 8D E9		BSR	SETUP	; INITIALIZE DIGIT POINTER.
00109 FE3F 8D D9		BSR	STRTREAD	; START READER RUN.
00110 FE41 8D C9	LEADER	BSR	FRAME	; IGNORE
00111 FE43 27 FC		BEQ	LEADER	; LEADER FRAMES.
00112 FE45 C0 7E	ADR	SUBB	#$7E	; IF BAD HEADER,
00113 FE47 26 31		BNE	BADCK	; GO TO BADCH.
00114 FE49 D7 70		STAB	TEMP1	; INITIALIZE CHECKSUM.
00115 FE4B 8D BF		BSR	FRAME	; GET UPPER ADDRESS.
00116 FE4D D7 72		STAB	ADRU	; SAVE IT.
00117 FE4F 8D BB		BSR	FRAME	; GET LOWER ADDRESS.
00118 FE51 D7 73		STAB	ADRL	; SAVE IT.
00119 FE53 8D 7F		BSR	ADROUT	; DISPLAY ADDRESS.
00120 FE55 8D B5		BSR	FRAME	; GET INCREMENT.
00121 FE57 D7 67		STAB	PCL	; SAVE IT.
00122 FE59 8D B1	DATA	BSR	FRAME	; GET DATA WOFD.
00123 FE5B DE 72		LDX	ADRU	; STORE DATA
00124 FE5D E7 00		STAB	0,X	; WORDIN
00125 FE5F 08		INX		; MEMORY AND
00126 FE60 DF 72		STX	ADRU	; BUMP ADDRESS.
00127 FE62 7A 00 67		DEC	PCL	; DECR COUNT AND LOOP
00128 FE65 2A F2		BPL	DATA	; UNTIL ITGOES NEG.
00129 FE67 8D A3		BSR	FRAME	; ADD IN TAPE CHECKSUM.
00130 FE69 96 70		LDAA	TEMP1	; GET FINAL CHECKSUM
00131 FE6B 8D B8		BSR	FRAMEOUT	; DISPLAY IT.
00132 FE6D 5C		INCB		; IF IT IS BAD.
00133 FE6E 26 0A		BNE	BADCK	; GO TO BADCK.
00134 FE70 8D 9A		BSR	FRAME	; IF THERE IS NOT ANOTHER
00135 FE72 27 22		BEQ	ENTADR	; SYNC FRAME, EXIT.
00136 FE74 20 CF		BRA	ADR	; ELSE, GO BACK.
        
LINE  ADDR OP OPER	LABEL	OPCODE	OPERAND
----- ---- -- ----	-----	------	-----------------------------------
00137 FE76 31	KEY	INS		; MAKE AN ABNORMAL ($FE76)
00138 FE77 31		INS		; EXIT FROM FRAME.
00139 FE78 20 3F		BRA	RESCHAN	; GO TO RESET CHANNELS.
00140 FE7A FE C1 11	BADCK	LDX	$C111	; WRITE ($FE7A)
00141 FE7D DF 78		STX	DIGIT1	; 'BAD-'
00142 FE7F BE 85 FD		LDS	$85FD	; IN THE ADR
00143 FE82 DF 7A		STX	DIGIT3	; DISPLAY CELLS.
00144 FE84 20 33		BRA	RESCHAN	; GO TO RESET CHANS.
00145 FE86 0001		RMB	1	; .
00146 FE87 0001		RMB	1	; .
00147 FE88 0001		RMB	1	; .
00148 FE89 0001		RMB	1	; .
00149 FE8A 8E 00 00	RESTART	LDS	#$0000	; SET RESTART FLAG. ($FE8A)
00150 FE8D CE FE 96		LDX	#ENTADR	; INITIALIZE NMI
00151 FE90 DF 6E		STX	NMIADR	; LOCATION.
00152 FE92 DF 6C		STX	SWIADR	; INITIALIZE SWI LOCATION.
00153 FE94 DF 6A		STX	IRQADR	; INITIALIZE IRQ LOCATION.
00154 FE96 CE 00 00	ENTADR	LDX	#$0000	; CLEAR NO-WRITE ($FE96)
00155 FE99 DF 74		STX	NOWRF	; AND FOUND FLAGS.
00156 FE9B DF 76		STX	DPU	; CLEAR DIGIT POINTER.
00157	; LDAA #TBL/256 ; INITIALIZE UPPER HALF OF
00158 FE9D 86 FF		LDAA	#$FF	; INITIALIZE UPPER HALF OF
00159 FE9F 97 7E		STAA	TBLADRU	; 7-SEG CONV TABLE POINTER.
00160 FEA1 9F 68		STS	SP	; SAVE USER STACK POINTER.
00161 FEA3 26 05		BNE	YESSP	; IF STACK POINTER IS ZERO,
00162 FEA5 8E 00 60		LDS	#STACK	; ENTRY WAS BY RESTART,
00163 FEA8 9F 68		STS	SP	; SO INITIALIZE STACK POINTER.
00164 FEAA CE 61 31	YESSP	LDX	#$6131	; WRITE ($FEAA)
00165 FEAD DF 78		STX	DIGIT1	; 'EPA UP'
00166 FEAF CE 11 FF		LDX	#$11FF	; IN
00167 FEB2 DF 7A		STX	DIGIT3	; THE
00168 FEB4 CE 83 31		LDX	#$8331	; DIGIT
00169 FEB7 DF 7C		STX	DIGIT5	; CELLS.
00170 FEB9 86 08	RESCHAN	LDAA	#8	; CLEAR ($FEB9)
00171 FEBB CE 80 0C		LDX	#CHAN3C+1	; THE
00172 FEBE 09	IOLOOP	DEX		; DIRECTION ($FEBE)
00173 FEBF 6F 00		CLR	0,X	; REGISTERS
00174 FEC1 4A		DECA		; OF ALL
00175 FEC2 26 FA		BNE	IOLOOP	; CHANNELS.
00176 FEC4 63 04		COM	4,X	; SET CHANS 2 AND 3
00177 FEC6 63 06		COM	6,X	; TO BE OUTPUTS
00178 FEC8 86 04		LDAA	#4	; SELECT
00179 FECA A7 01		STAA	1,X	; THE
00180 FECC A7 03		STAA	3,X	; FOUR
00181 FECE A7 05		STAA	5,X	; DATA
00182 FED0 A7 07		STAA	7,X	; REGISTERS.
00183 FED2 20 48		BRA	CONTROL	; GO TO CONTROL
00184 FED4 7F 00 77	ADROUT	CLR	DPL	; CLEAR THE DIGIT POINTER. ($FED4)
00185 FED7 96 72		LDAA	ADRU	; GET UPPER 2 ADR DIGITS.
00186 FED9 8D 6C		BSR	BYTEOUT	; OUTPUT 2 HEX DIGITS.
00187 FEDB 96 73		LDAA	ADRL	; GET LOWER 2 ADR DIGITS.
00188 FEDD 8D 68		BSR	BYTEOUT	; OUTPUT 2 HEXDIGITS
00189 FEDF 39		RTS		; EXIT
00190 FEE0 7E FE 2E	LOADX	JMP	LOAD	; WAY-POINT. ($FEE0)
00191 FEE3 DE 72	BACKWARD	LDX	ADRU	; DECREMENT ($FEE3)
00192 FEE5 09		DEX		; THE
00193 FEE6 DF 72		STX	ADRU	; ADDRESS.
00194 FEE8 8D EA	NEXT	BSR	ADROUT	; DISPLAY ADDRESS. ($FEE8)
00195 FEEA 20 1E		BRA	CONTENTS	; GO OUTPUT CONTENTS.
00196 FEEC 7C 00 71	STEP	INC	DESFLAG	; SET FLAG TO STEP. ($FEEC)
00197 FEEF 20 06		BRA	EXAMINE	; GO SHARE CODE.
00198 FEF1 7A 00 71	DO	DEC	DESFLAG	; SET THE FLAG TO 'DO' ($FEF1)
00199 FEF4 CE 85 C5		LDX	#$85C5	; AND GET 'DO'.
00200 FEF7 DF 7C	EXAMINE	STX	DIGIT5	; PUT CODES IN DIGIT CELLS. ($FEF7)
00201 FEF9 CE EF EF		LDX	#$EFEF	; WRITE OUT
00202 FEFC DF 78		STX	DIGIT1	; THE 4 DATA
00203 FEFE DF 7A		STX	DIGIT3	; UNDERLINES.
00204 FF00 97 77		STAA	DPL	; CLEAR DIGIT POINTER
        
LINE  ADDR OP OPER	LABEL	OPCODE	OPERAND
----- ---- -- ----	-----	------	-----------------------------------
00205 FF02 8D 50		BSR	BYTEIN	; INPUT 2 HEX DIGITS.
00206 FF04 97 72		STAA	ADRU	; SAVE IN ADDRES, UPPER.
00207 FF06 8D 4C		BSR	BYTEIN	; INPUT 2 HEX DIGITS.
00208 FF08 97 73		STAA	ADRL	; SAVE IN ADDRESS, LOWER.
00209 FF0A DE 72	CONTENTS	LDX	ADRU	; GET FULL 16 BIT ADDRESS. ($FF0A)
00210 FF0C 96 71		LDAA	DESFLAG	; IF THE FLAG IS NOT "DO',
00211 FF0E 2A 06		BPL	NOTDO	; SKIP TO NOTDO.
00212 FF10 DF 66		STX	PCH	; ELSE, PUT ADR IN STACK.
00213 FF12 8E 00 60		LDS	#STACK	; GO EXECUTE USER PROG
00214 FF15 3B		RTI		; VIA ANINTERRUPT RETURN.
00215 FF16 2E 4C	NOTDO	BGT	CHANGE	; IFSTEP MODE, GO TO CHANGE. ($FF16)
00216 FF18 A6 00		LDAA	0,X	; FETCH DATA.
00217 FF1A 8D 2B		BSR	BYTEOUT	; OUTPUT 2 HEX DIGITS.
00218 FF1C 7C 00 74	CONTROL	INC	NOWRF	; SET NO-WRITE FLAG ($FF1C)
00219 FF1F 4F		CLRA		; SET DESFLAG TO
00220 FF20 97 71		STAA	DESFLAG	; 'EXAMINE' (DEFAULT CASE).
00221 FF22 8D 6F		BSR	INPUT	; GET CONTROL CHAR.
00222 FF24 CE FF FF		LDX	#$FFFF	; GET ' ' IN CASE OF EXAMINE
00223 FF27 80 08		SUBA	#8	; IF DIGIT WAS AN '8',
00224 FF29 27 36		BEQ	INTRTN	; GO TO INTRTN.
00225 FF2B 4A		DECA		; IF DIGIT WAS A '9'
00226 FF2C 27 B2		BEQ	LOADX	; GO TO LOAD.
00227 FF2E 4A		DECA		; IF DIGIT WAS A 'A'
00228 FF2F 27 BB		BEQ	STEP	; GO TO STEP.
00229 FF31 4A		DECA		; IF DIGIT WAS A 'B'
00230 FF32 27 AF		BEQ	BACKWARD	; GO TO BACKWARD.
00231 FF34 4A		DECA		; IF DIGIT WAS A 'C'
00232 FF35 27 2D		BEQ	CHANGE	; GO TO CHANGE.
00233 FF37 4A		DECA		; IF DIGIT WAS A 'D'
00234 FF38 27 B7		BEQ	DO	; GO TO DO.
00235 FF3A 4A		DECA		; IF DIGIT WAS A 'E'
00236 FF3B 27 BA		BEQ	EXAMINE	; GO TO EXAMINE.
00237 FF3D 4A		DECA		; IF DIGIT WAS A 'F'
00238 FF3E 27 DC		BEQ	CONTROL	; THEN
00239 FF40 DE 72	FORWARD	LDX	ADRU	; INCREMENT ($FF40)
00240 FF42 08		INX		; THE
00241 FF43 DF 72		STX	ADRU	; ADDRESS.
00242 FF45 20 A1		BRA	NEXT	; GO TO NEXT.
00243 FF47 16	BYTEOUT	TAB		; PUT 2 HEX DITITS IN B ALSO. ($FF47)
00244 FF48 44		LSRA		; GET UPPER
00245 FF49 44		LSRA		; HEX DIGIT
00246 FF4A 44		LSRA		; INTO LOWER
00247 FF4B 44		LSRA		; HALF OF WORD.
00248 FF4C 8D 68		BSR	WRDATA	; WRITE IT TO NEXT DIGIT CELL.
00249 FF4E 17		TBA		; GET LOWER HEX DIGIT
00250 FF4F 84 0F		ANDA	#15	; INTO LOWER HALF OF WORD.
00251 FF51 8D 63		BSR	WRDATA	; WRITE IT TO NEXT DIGIT CELL.
00252 FF53 39		RTS		; EXIT.
00253 FF54 8D 3D	BYTEIN	BSR	INPUT	; GET A HEX DIGIT. ($FF54)
00254 FF56 48		ASLA		; PUT IT
00255 FF57 48		ASLA		; IN THE
00256 FF58 48		ASLA		; UPPER HALF
00257 FF59 48		ASLA		; OF THE WORD.
00258 FF5A 97 70		STAA	TEMP1	; SAVE IT.
00259 FF5C 8D 35		BSR	INPUT	; GET SECOND HEX DIGIT.
00260 FF5E 9B 70		ADDA	TEMP1	; COMBINE THE 2 DITITS.
00261 FF60 39		RTS		; EXIT
00262 FF61 9E 68	INTRTN	LDS	SP	; USING USERS STACK POINTER. ($FF61)
00263 FF63 3B		RTI		; GO EXECUTE HIS PROGRAM.
00264 FF64 96 7D	CHANGE	LDAA	DIGIT6	; IF NO CELL HAS BEEN ($FF64)
00265 FF66 81 31		CMPA	#$31	; EXAMINED YET, IGNORE
00266 FF68 27 B2		BEQ	CONTROL	; THE CHANGE COMMAND.
00267 FF6A CE EF EF		LDX	#$EFEF	; WRITE OUT UNDERLINES IN
00268 FF6D DF 7C		STX	DIGIT5	; DIGIT CELLS 5 AND6.
00269 FF6F 86 04		LDAA	#4	; DECREMENT DIGIT
00270 FF71 97 77		STAA	DPL	; POINTER, TWICE.
00271 FF73 8D DF		BSR	BYTEIN	; GET 2 HEX DEGITS.
00272 FF75 DE 72		LDX	ADRU	; GET ADDRESS.
        
LINE  ADDR OP OPER	LABEL	OPCODE	OPERAND
----- ---- -- ----	-----	------	-----------------------------------
00273 FF77 A7 00		STAA	0,X	; PUT DATA IN MEMORY.
00274 FF79 A1 00		CMPA	0,X	; IF THE WRITE
00275 FF7B 27 08		BEQ	OK	; WAS BAD,
00276 FF7D CE FD FD		LDX	#$FDFD	; WRITE OUT 2 HYPHENS
00277 FF80 DF 7C		STX	DIGIT5	; TO THE DIGIT CELLS.
00278 FF82 5F		CLRB		; CLEAR STEP
00279 FF83 D7 71		STAB	DESFLAG	; MODE FLAG.
00280 FF85 96 71	OK	LDAA	DESFLAG	; IF FLAG IS 'STEP' MODE, ($FF85)
00281 FF87 2E B7		BGT	FORWARD	; GO TO FORWARD.
00282 FF89 20 91		BRA	CONTROL	; GO BACK TO CONTROL.
00283 FF8B D6 75	FIND	LDAB	FOUND	; IF A PUSH BUTTON WAS ALSO ($FF8B)
00284 FF8D 26 04		BNE	INPUT	; FOUND LAST SCAN, SKIP DATA WRITE
00285 FF8F 8D 25		BSR	WRDATA	; ELSE WRITE THE DIGIT
00286 FF91 97 75		STAA	FOUND	; AND SET FOUND FLAG.
00287 FF93 8D 37	INPUT	BSR	DISPLAY	; DISPLAY ALL LED DIGITS. ($FF93)
00288 FF95 86 0F		LDAA	#15	; INIT KEY NUMBER.
00289 FF97 F6 80 06		LDAB	CHAN1	; GET 8 BITS OF KB.
00290 FF9A 58	UPLOOP	ASLB		; LOOK AT NEXT BIT. ($FF9A)
00291 FF9B 24 EE		BCC	FIND	; IF IT IS ZERO, GO TO FIND.
00292 FF9D 4A		DECA		; BUMP NUMBER.
00293 FF9E 81 07		CMPA	#7	; IF NOT 7 YET
00294 FFA0 26 F8		BNE	UPLOOP	; GO BACK.
00295 FFA2 F6 80 04		LDAB	CHAN0	; GET OTHER 8 BITS OF KB.
00296 FFA5 58	LOLOOP	ASLB		; lOOK AT NEXT BIT
00297 FFA6 24 E3		BCC	FIND	; IF IT IS ZERO, GO TO FIND.
00298 FFA8 4A		DECA		; BUMP NUMBER.
00299 FFA9 2C FA		BGE	LOLOOP	; GO BACK.
00300 FFAB 96 75	NOFIND	LDAA	FOUND	; IF FOUND FLAG NOT
00301 FFAD 27 E4		BEQ	INPUT	; SET, GO BACK.
00302 FFAF D7 75		STAB	FOUND	; ELSE, CLEAR FOUND.
00303 FFB1 8D 19		BSR	DISPLAY	; WAIT FOR ANY BOUNCE.
00304 FFB3 96 7F		LDAA	TBLADRL	; GET INPUTTED DIGIT.
00305 FFB5 39		RTS		; RETURN.
00306 FFB6 97 7F	WRDATA	STAA	TBLADRL	; USE HEX NUMBER AS INDEX.
00307 FFB8 96 74		LDAA	NOWRF	; IF NO-WRITE FLAG IS
00308 FFBA 26 B8		BNE	WPDONE	; SET, SKIP THE WRITE.
00309 FFBC DE 7E		LDX	TBLADRU	; GET LOC OF 7-SEG CODE.
00310 FFBE 96 7E		LDAA	TBL,	; X ; GET THE CODE.
00311 FFC0 7C 00 77		INC	DPL	; BUMP DIGIT POINTER
00312 FFC3 DE 76		LDX	DPU	; STORE THE 7-SEG CODE
00313 FFC5 A7 77		STAA	DIGIT1-1,X	; DIGIT CELL.
00314 FFC7 7F 00 74	WRDONE	CLR	NOWRF	; CLEAR NO-WRITE FLAG.
00315 FFCA 39		RTS		; RETURN
00316 FFCB CE 00 77	DISPLAY	LDX	#DIGIT1-1	; POINT TO FIRST DIGIT
00317 FFCE 86 01		LDAA	#1	; SELECT DIGIT 0
00318 FFD0 5F	DIGLOOP	CLRB		; CLEAR
00319 FFD1 53		COMB		; SEGMENTS
00320 FFD2 F7 80 08		STAB	CHAN2	; AND
00321 FFD5 48		ASLA		; SELECT NEXT DIGIT.
00322 FFD6 B7 80 0A		STAA	CHAN3	; STROBE IT.
00323 FFD9 2A 02		BPL	NOEXIT	; IF DONE 6 TIMES,
00324 FFDB 39		RTS		; JUST EXIT.
00325 FFDC 08	NOEXIT	INX		; POINT TO NEXT DIGIT CELL. ($FFDC)
00326 FFDD E6 00		LDAB	0,X	; GET 7-SEG DISPLAY CODE.
00327 FFDF F7 80 08		STAB	CHAN2	; WRITE IT OUT.
00328 FFE2 5F		CLRB		; DELAY FOR
00329 FFE3 5C	DELAY	INCB		; 1538 MPU ($FFE3)
00330 FFE4 26 FE		BNE	DELAY	; CYCLES
00331 FFE6 20 E9		BRA	DIGLOOP	; GO BACK FOR NEXT DIGIT.
00332 FFE8 03	TBL	FCB	@003	; 0. ($FFE8)
00333 FFE9 9F		FCB	@237	; 1.
00334 FFEA 25		FCB	@045	; 2.
00335 FFEB 0D		FCB	@015	; 3.
00336 FFEC 99		FCB	@231	; 4.
00337 FFED 49		FCB	@111	; 5.
00338 FFEE 41		FCB	@101	; 6.
00339 FFEF 1F		FCB	@037	; 7.
00340 FFF0 01		FCB	@001	; 8.
        
LINE  ADDR OP OPER	LABEL	OPCODE	OPERAND
----- ---- -- ----	-----	------	-----------------------------------
00341 FFF1 09		FCB	@011	; 9.
00342 FFF2 11		FCB	@021	; A.
00343 FFF3 C0		FCB	@300	; B.
00344 FFF4 63		FCB	@143	; C.
00345 FFF5 85		FCB	@205	; D.
00346 FFF6 61		FCB	@141	; E.
00347 FFF7 71		FCB	@161	; F.
00348 FFF8 FE 08		FDB	IRQ	 ; MASKABLE INT HANDLER ADR.
00349 FFFA FE 04		FDB	SWI	 ; SOFTWARE INT HANDLER ADR.
00350 FFFC FE 00		FDB	NMI	 ; NON-MASKABLE INT HANDLER ADR.
00351 FFFE FE 8A		FDB	RESTART	 ; RESET HANDLER ADR.
00352		END	00353	;
00354	;


Total Errors: 0
        
Symbol Table Sorted Alphabetically

 ---------------------------------------------------------------------------
|    Symbol - Value      |     Symbol - Value      |     Symbol - Value     |
|------------------------+-------------------------+------------------------|
|       ADR - $FE45      |     DIGIT5 - $007C      |     NMIADR - $006E     |
|      ADRL - $0073      |     DIGIT6 - $007D      |     NOEXIT - $FFDD     |
|    ADROUT - $FED4      |    DIGLOOP - $FFD1      |     NOFIND - $FFAB     |
|      ADRU - $0072      |    DISPLAY - $FFCC      |      NOTDO - $FF16     |
|  BACKWARD - $FEE3      |         DO - $FEF1      |      NOWRF - $0074     |
|     BADCK - $FE7A      |        DPL - $0077      |         OK - $FF85     |
|    BYTEIN - $FF54      |        DPU - $0076      |        PCH - $0066     |
|   BYTEOUT - $FF47      |     ENTADR - $FE96      |        PCL - $0067     |
|     CHAN0 - $8004      |    EXAMINE - $FEF7      |    RESCHAN - $FEB9     |
|    CHAN0C - $8005      |       FIND - $FF8B      |    RESTART - $FE8A     |
|     CHAN1 - $8006      |    FORWARD - $FF40      |      SETUP - $FE28     |
|    CHAN1C - $8007      |      FOUND - $0075      |         SP - $0068     |
|     CHAN2 - $8008      |      FRAME - $FE0C      |      STACK - $0060     |
|    CHAN2C - $8009      |   FRAMEOUT - $FE25      |       STEP - $FEEC     |
|     CHAN3 - $800A      |      INPUT - $FF93      |   STRTREAD - $FE1A     |
|    CHAN3C - $800B      |     INTRTN - $FF61      |        SWI - $FE04     |
|    CHANGE - $FF64      |     IOLOOP - $FEBE      |     SWIADR - $006C     |
|  CONTENTS - $FF0A      |        IRQ - $FE08      |        TBL - $FFE9     |
|   CONTROL - $FF1C      |     IRQADR - $006A      |    TBLADRL - $007F     |
|      DATA - $FE59      |        KEY - $FE76      |    TBLADRU - $007E     |
|     DELAY - $FFE4      |     LEADER - $FE41      |      TEMP1 - $0070     |
|     SFLAG - $0071      |       LOAD - $FE2E      |     UPLOOP - $FF9A     |
|    DIGIT1 - $0078      |      LOADX - $FEE0      |     WRDATA - $FFB6     |
|    DIGIT2 - $0079      |     LOLOOP - $FFA5      |     WRDONE - $FFC8     |
|    DIGIT3 - $007A      |       NEXT - $FEE8      |      YESSP - $FEAA     |
|    DIGIT4 - $007B      |        NMI - $FE00      |            - $0000     |
 ---------------------------------------------------------------------------
        
RESTART and MASTER CONTROL Flow Diagram

This is a combined flow diagram showing the flow from Restart and into the Master Control part of the program.

RESTART
Entry point upon RESET function action.
Set RESTART Flag
Indicates non-interrupt entry.
Initialize NMI Location
Initialize SWI Location
Initialize IRQ Location
Set up DEFAULTS such that any
of the three types of INTERRUPT
will cause an entry at ENTADR
ENTADR
Entry point for DEFAUT handler for
NMI, SWI, IRQ.Also, a good LOAD
causes a jump to here.
Clear No-Write & Found Flags
Initialize Flags.
Clear Digit Pointer
Initialize Upper Half of 7-Seg
Conv Table Pointer
Initialize the word that points
at the last digit cell written.
Save User Stack Pointer
Y
N
Stack
Pointer is
Zero?
Entry was
by RESTART?
Stack Pointer ⇐ Adr of Stack
Use the DEFAULT stack.
SP ⇐ (STACK POINTER
Save DEFAULT stack ADR
for any user execution
Put the(UP) herald in the
Digit1-Digit6 display cells
YESSP
Give positive indication of the UP
status of the monitor program.
RESCHAN
The LOAD routine aborts to here in
event of an error during tape reading.
Clear Direction Regs of All Chans
Initialize channels 0 and 1 to be inputs
for the ResCon, and channels 2 and 3
to be outputs for the LED display.
Set CHAN2 & 3 to be Outputs
Select the 4 Data Regs
CONTROL
CONTROL
Master Control Loop.
Set NO-WRITE Flag
Suppress ECHO of KB action.
DESFLAG ⇐ 0
Default is "EXAMINE"
INPUT
Wait for KB action and convert it to 4-bit digit.
INDEX ⇐ @177777
Set up DEFAULT case of blanks for data
LED digit cells.
N
Y
8
KEY
?
INTRTN
INTERRUPT return to user program
(use user's stack and ADR in stack).
N
Y
9
KEY
?
LOAD
PAPER TAPE LOAD routine
N
Y
A
KEY
?
STEP
Auto-load of MEMORY routine
N
Y
B
KEY
?
BACKWARD
DISPLAY previous memory cell.
N
Y
C
KEY
?
CHANGE
Change contents of memory cell.
N
Y
D
KEY
?
DO
Do user program. (Use DEFAULT
stack and ADR specified by user here).
N
Y
E
KEY
?
EXAMINE
DISPLAY memory.
N
Y
F
KEY
?
FORWARD
DISPLAY next memory cell.
LOAD and DATA Flow Diagram
LOAD
$FE2E
Paper tape LOAD routine.
Set Up Reader Channel
Initialize channel zero
Write Out "LOAD" to LED cells
Indicate that the LOAD
routine has gained control.
SETUP
$FE28
Set digit pointer so that the frame
will be displayed in the lower 2 LEDs.
STRTREAD
$FE1A
Turn on reader (CA2 ⇐ low)
by reading channel zero.
FRAME
$FE0C
Wait for strobe (CA2 ⇐ high)
and read the tape frame.
Y
N
Frame is
Leader
Code?
Test for NULL codes.
ADR
The ADR loop is executed once
for each block of data on the tape.
BADCK
$FE7A
If the first non-zero frame
is not a 7E16 code, go to
the ERROR ABORT routine.
Y
N
Frame is
Header
Code?
Initialize Checksum
CHECKSUM starts off at 0.
FRAME
$FE0C
The first two frames after the
header are a 16-bit address.
Save Upper Address
FRAME
$FE0C
Save Lower Address
ADROUT
$FED4
Display the address in the upper 4 LEDs.
FRAME
$FE0C
Save Increment
The next frame is the INCREMENT
(number of data words-1).
DATA
$FE59
DATA
$FE59
Read data loop. This loop is executed
from 1 to 256 times depending on the
INCREMENT.
FRAME
$FE0C
Read a data frame and add it into the
CHECKSUM.
Store Data Word in Memory
$FE5B-$FE5D
Bump Address
$FE60
Point to next memory location.
Decr Count
$FE62
N
Y
Count
Went
Neg?
Stay in this loop until loop count
(INCREMENT) goes NEGATIVE.
FRAME
$FE0C
Read final tape CHECKSUM word and
add it into the computed CHECKSUM.
Get Final Checksum
FRAMEOUT
$FE25
Display final total in the data LEDs.
N
Y
Bad
CHECKSUM
?
BADCK
$FE7A
Write "BAD-" into the
ADR display cells
RESCHAN
$FEB9
Abort to monitor
initialization
routine
Final CHECKSUM
is not all ones?
FRAME
$FE0C
N
Y
Another
HEADER
?
Any non-zero
frame?
ENTADR
$FE96
ADR
$FE45
Loop back for
next data block
Step, Do, Examine, Forward, Backward, and Change Flow Diagram
STEP
$FEEC
SET DESFLAG
TO"STEP"
DO
$FEF1
SET DESFLAG
TO"DOP"
INDEX ⇐ "DO"
$FEF4
EXAMINE
$FEF7
DIGIT 5 & 6 ⇐ (INDEX)
WRITE 4 DATA UNDERLINES
TO DIGIT1 - DIGIT4
$FEF9
Set up such
that the
next 4 KB actions
will be echoed in
first 4 leds.
CLEAR DIGIT POINTER
$FF00
Get and saver
upper 2 digits
of ADR.
BYTEIN
$FF54
$FF02
Get and saver
lower 2 digits
of ADR.
ADRU ⇐ (A)
$FF04
BYTEIN
$FF54
$FF06
ADRL ⇐ (A)
$FF08
CONTENTS
$FF0A
INDEX ⇐ (ADRU,ADRL)
Get current address.
Y
N
DESFLAG
IS "DO"
?
$FF0C
NOTDO
$FF16
N
Y
DESFLAG
IS "STEP"
?
CHANGE
FETCH DATA FROM MEMORY
$FF18
BYTEOUT
$FF47
$FF1A
Display the 2 data digits.
CONTROL
PUT ADR ON THE STACK
$FF10
STACK POINTER ⇐ ADR OF STACK
$FF12
RTI
FORWARD
$FF40
INCREMENT
THE ADR
BACKWARD
$FEE3
DECREMENT
THE ADR
ADROUT
$FED4
NEXT
Put the
ADR in
the led
display.
CHANGE
$FF64
Change the contents of a
memory cell.
Y
N
ANY CELL HAS
BEEN EXAMINED
YET?
CONTROL
Ignore a "C" KB action if it occurs
while the "UP" message is displayed.
DIGIT 5&6 ⇐ UNDERLINES
Display underlines in the
data LEDS.
DPL ⇐ 4
SET up such that the 2 digits
inputted will be echoed in the
data LEDS.
BYTEIN
$FF54
Get and echo the data.
INDEX ⇐ CURRENT ADR
PUT the entered data into the
specified memory cell.
STORE DATA IN MEMORY
FETCH DATA BACK OUT
N
Y
GOOD
WRITE
?
IF the change did not "Take",
display two hyphens in the data
LEDS and abort the AUTOLOAD
(STEP) mode (if any).
DIGIT 5&6 ⇐ HYPHENS
CLEAR STEP MODE FLAG
OK
N
Y
FLAG IS IN
THE STEP
MODE?
FORWARD
If in the STEP mode, go to
FORWARD to DISPLAY the next
memory location.
CONTROL
Or else, wait for next command.
INPUT and DISPLAY Flow Diagram
INPUT
$FF93
DISPLAY
$FFCB
A ⇐ F16
$FF95
B ⇐ KEYS 8-F
UPLOOP
$FF97
LEFT SHIFT C,B
$FF9A
N
Y
C = 0
?
$FF9B
DECR A
$FF9D
Y
N
A = 7
?
$FF9E
B ⇐ KEYS 0-7
LOLOOP
LEFT SHIFT C,B
N
Y
C = 0
?
DECR A
N
Y
A = 0
?
Y
N
FOUND
FLAG
SET ?
NOFIND
CLEAR FOUND FLAG
DISPLAY
$FFCB
GET HEX DIGIT
EXIT
FIND
N
Y
FOUND
FLAG
SET ?
WRDATA
$FFB6
SET FOUND FLAG
INPUTS:
ACHAN0
ACHAN1
FOUND
DPU, DPL
NOWRF
DIGIT1
DIGIT2
DIGIT3
DIGIT4
DIGIT5
DIGIT6
TBLADRU
KEYS 0-7
KEYS 8-f
0
DIGIT POINTER
NO-WRITE FLAG
7-SEGMENT
LED CODES
FF
OUTPUTS:
A
B
X
FOUND
CHAN2
CHAN3
NOWRF
TBLADRL
DIGITX
DPL
HEX DIGIT
FF
007D
0
FF
80
0
HEX DIGIT
7-SEG CODE
IF (NOWRF)
(DPL)+1
The INPUT routine scans
the keyboard until a
key is pressed; when it
reads in KB code, it is
converted to a 4-bit hex
digit, and ECHOS it to the
next available LED cell
(IF NOWRF=0). Takes a
minimum of 30012 MPU
cycles (based on a find
in the first scan, and no
find in the second scan.
The key found is assumed
to be "F").
DISPLAY
INDEX ⇐ ADR OF
DIGIT1-1
A ⇐ I
DIGLOOP
B ⇐ FF
CHAN2 ⇐ FF
LEFT SHIFT A
CHAN3 ⇐ (A)
N
Y
A = 80
?
EXIT
INCR INDEX
B ⇐ (DIGIT (X))
CHAN2 ⇐ B)
B ⇐ 0
DELAY
INCR B
Y
N
b = 0
?
INPUTS:
DIGIT1
DIGIT2
DIGIT3
DIGIT4
DIGIT5
DIGIT6
7-SEGMENT
LED CODES
OUTPUTS:
A
B
X
CHAN2
CHAN3
80
FF
007D
FF
80
Display takes the 7-SEG
codes from DIGIT1 to
DIGIT6 and strobes
them out to the 6 LEDS.
It holds each LED lit for
2563 MPU cycles.
The whole routine takes
9495 MPU cycles.
FRAME, STRTREAD, FRAMEOUT, SETUP, and INTERRUPT Flow Diagram
FRAME
$FE0C
DISPLAY
$FFCB
$FE0C
BSR
GET CHAN1
$FE0F
Y
N
CHAN1=FF
?
$FE12
$FE13
KEY
STACK POINTER + 2
$FE76
$FE77
RESCHAN
$FEB9
N
Y
BIT 7 OF
CHAN0 CONTROL
NEG SET?
$FE15
$FE18
STRTREAD
$FE1A
A ⇐ (CHAN0)
$FE1A
$FE1D
B ⇐ A
$FE1E
B ⇐ (B)+(TEMP1)
$FE1F
$FE21
TEMPS ⇐ (B)
$FE23
FRAMEOUT
$FE25
BYTEOUT
$FF47
$FE25
BSR
SETUP
$FE28
DPL ⇐ 4
$FE28
$FE2A
TEST B
$FE2C
EXIT
$FE2D
RTS
FRAME INPUTS:
TEMP1
DIGIT1
DIGIT2
DIGIT3
DIGIT4
DIGIT5
DIGIT6
CHAN0C
CHAN0
DPU,PPL
NOWRF
CHAN1
CHECKSUM
7-SEGMENT
LED CODES
BIT 7 FLAG
DATA (READER)
DIGIT POINTER
NO-WRITE FLAG
CONTROL KEY
FRAME OUTPUTS:
A
B
X
DPL
TBLADRL
NOWRF
DIGIT5
DIGIT6
TEMP1
CHAN0C
CHAN2
CHAN3
4
BYTE (FROM READER)
DIGIT POINTER +2
4
LOWER DIGIT
0
7-SEG CODE
7-SEG CODE
CHECKSUM (UPDATED)
0
FF
80
The FRAME routine reads
one frame from the Paper
Tape Reader, echos it to
the lowest 2 LEDS in hex
format and adds it into
the running CHECKSUM.
The execution time for
FRAME depends on the
speed of the reader. If
any control key is pushed,
the FRAME routine aborts,
resets the I/O channels
and goes to the CONTROL
loop.
STRTREAD is an entry
point used to start the
reader the first time by
causing CA2 to go low in
response to a READ of
channel 0.
FRAMEOUT is an entry
point used to display
2 hex digits and
reset DPL to 4.
SETUP is an entry
point used to reset
DPL to 4.
NMI
$FE00
Non-maskable INTERRUPT entrance.
Go to cell whose ADR is in NMIADR.
SWI
$FE04
Software INTERRUPT entrance.
Go to cell whose ADR is in SWIADR.
IRQ
$FE08
Maskable INTERRUPT entrance.
Go to cell whose ADR is in IRQADR.
INTRTN
Return to users program after an SWI.
from the users program.
$FF61
STACK POINTER ⇐ USERS
STACK POINTER
$FF61
Use the user's original stack.
RTI
Return to user's program.
BYTEIN and BYTEOUT Flow Diagram
BYTEIN
$FF54
INPUT
FF93
$FF93
L.S. (A) 4 Bits
$FF56-$FF59
TEMP1 ⇐ (A)
$FF5A
INPUT
FF93
$FF5C
TEMP1 ⇐ (A)
$FF5E
EXIT
$FF60
The BYTEIN routine reads in 2KB
codes and converts them to an
8-BIT number. Their 7-SEG codes
are written into the next 2
available digit cells for display.
Minimum time possible (assuming
two F's found on first and third
scan and no find on second and
fourth scan) is 60050 MPU cycles.
INPUTS:
CHAN0
CHAN1
FOUND
DPU,PPL
NOWRF
DIGIT1
DIGIT2
DIGIT3
DIGIT4
DIGIT5
DIGIT6
TBLADRU
KEYS 0-7
KEYS 8-F
0
DIGIT POINTER
NO-WRITE FLAG=0
7-SEGMENT
LED CODES
OUTPUTS:
A
B
X
FOUND
CHAN2
CHAN3
NOWRF
TBLADRL
DIGITX
DIGITY
DPL
2 DIGIT BYTE
FF
007D
0
FF
80
0
LOWER HEX DIGIT
7-SEG CODE
7-SEG CODE
(DPL)+2
BYTEOUT
$FF47
B ⇐ (A)
$FF47
(A) ⇐ UPPER DIGIT
$FF48-$FF4B
WRDATA
FFB6
$FFB6
A ⇐ LOWER DIGIT
$FF4E-$FF4F
WRDATA
FFB6
$FFB6
EXIT
$FF53
The BYTEOUT routine takes an
8-bit number (2 hexdigits), converts
it to two 8-bit LED codes, and writes
them into 2 digit cells.
INPUTS:
A
DPU, DPL
NOWRF
TBLADRU
2 DIGIT BYTE
DIGIT POINTER
NO-WRITE FLAG=0
FF
OUTPUTS:
A
B
X
DPL
TBLADRL
NOWRF
DIGITX
DIGITY
7-SEG CODE (OF
LOWER DIGIT)
TWO DIGIT BYTE
DIGIT POINTER +2
(DPL) + 2
LOWER DIGIT
0
7-SEG CODE
7-SEG CODE
SUBROUTINE HIERARCHY
EXAMINE
CHANGE
CONTROL
LEADER
ADR
DATA
NOTDO
ADR
NEXT
BYTEIN
FF54
FRAME
FE0C
ADROUT
FED4
INPUT
FF93
BYTEOUT
FF47
DISPLAY
FFCB
WRDATA
FFB6
Table 1 - Accumulator and Memory Instructions
ADDRESSING MODES BOOLEAN/ARITHMETIC OPERATIONCOND. CODE REG.
ACCUMULATOR AND MEMORY IMMED DIRECT INDEX EXTND INHER (All register lables 543210
OPERATIONS MNEMONIC OP~# OP~# OP~# OP~# OP~# refer to contents) HI NZ VC
AddADDA 8B22 9B32 AB52 BB43  A + M ➜ A
ADDB CB22 DB32 EB52 FB43  B + M ➜ B
Add AcmltrsABA 1821  A + B ➜ A
Add with CarryADCA 8922 9932 A952 B943  A + B + C ➜ A
ADCB C922 D932 E952 F943  A + B + C ➜ B
AndANDA 8422 9432 A452 B443  A ● M ➜ A R
ANDB C422 D432 E452 F443  B ● M ➜ B R
Bit TestBITA 8522 9532 A552 B543  A ● M R
BITB C522 D532 E552 F543  B ● M R
ClearCLR 6F72 7F63  00 ➜ M RSRR
CLRA 4F21  00 ➜ A RSRR
CLRB 5F21  00 ➜ B RSRR
CompareCMPA 8122 9132 A152 B143  A - M
CMPB C122 D132 E152 F143  B - M
Compare AcmltrsCBA 1123  A - B
Complement, 1'sCOM 6372 7363  M ➜ M RS
COMA 4321  A ➜ A RS
COMB 5321  B ➜ B RS
Complement, 2'sNEG 6072 7063  00 - M ➜ M 12
(Negate)NEGA 4021  00 - A ➜ A 12
NEGB 5021  00 - B ➜ B 12
Decimal Adjust, ADAA 1921  Converts Binary Add. of BCD 3
 Characters into BCD Format
DecrementDEC 6A72 7A63  M - 1 ➜ M 4
DECA 4A21  A - 1 ➜ A 4
DECB 5A21  B - 1 ➜ B 4
Exclusive OREORA 8822 9832 A852 B843  A ⊕ M ➜ A R
EORB C822 D832 E852 F843  B ⊕ M ➜ B R
IncrementINC 6C72 7C63  M + 1 ➜ M 5
INCA 4C21  A + 1 ➜ A 5
INCB 5C21  B + 1 ➜ B 5
Load AcmltrsLDAA 8622 9632 A652 B643  M ➜ A R
LDAB C622 D632 E652 F643  M ➜ B R
OR, InclusiveORAA 8A22 9A32 AA52 BA43  A ✚ M ➜ A R
ORAB CA22 DA32 EA52 FA43  B ✚ M ➜ B R
Push DataPSHA 3641  A ➜ MSP, SP - 1 ➜ SP
PSHB 3741  B ➜ MSP, SP - 1 ➜ SP
Pull DataPULA 3241  SP + 1 ➜ SP, MSP ➜ A
PULB 3341  SP + 1 ➜ SP, MSP ➜ B
Rotate LeftROL 6972 7963
M
A
B
C
b7
b0
6
ROLA 4921 6
ROLB 5921 6
Rotate RightROR 6672 7663
M
A
B
C
b7
b0
6
RORA 4621 6
RORB 5621 6
Shift Left,ASL 6872 7863
M
A
B
0
C
b7
b0
6
ArithmeticASLA 4821 6
ASLB 5821 6
Shift Right,ASR 6772 7763
M
A
B
C
b7
b0
6
ArithmeticASRA 4721 6
ASRB 5721 6
Shift Right,LSR 6472 7463
M
A
B
0
C
b7
b0
R6
LogicLSRA 4421 R6
LSRB 5421 R6
Store AcmltrsSTAA 9742 A762 B753 A ➜ M R
STAB D742 E762 F753 B ➜ M R
SubtractSUBA 8022 9032 A052 B043  A - M ➜ A
SUBB C022 D032 E052 F043  B - M ➜ B
Subtract AcmltrsSBA 1021  A - B ➜ A
Subtr. with CarrySBCA 8222 9232 A252 B243  A - M - C ➜ A
SBCB C222 D232 E242 F243  B - M - C ➜ B
Transfer AcmltrsTAB 1621  A ➜ B R
TBA 1721  B ➜ A R
Test, Zero or MinusTST 6D72 7D63  M - 00 RR
TSTA 4D21  A - 00 RR
TSTB 5D21  B - 00 RR
Table2 -Index Register and Stack Instructions
ADDRESSING MODES BOOLEAN/ARITHMETIC OPERATIONCOND. CODE REG.
INDEX REGISTER AND STACK IMMED DIRECT INDEX EXTND INHER (All register lables 543210
POINTER OPERATIONS MNEMONIC OP~# OP~# OP~# OP~# OP~# refer to contents) HI NZ VC
Compare Index RegCPX 8C33 9C42 AC62 BC53  (XH/XL) - (M/M + 1) 78
Decrement Index RegDEX 0941  X - 1 ➜ X
Decrement Stack PntrDES 3441  SP - 1 ➜ SP
Increment Index RegINX 0841  X + 1 ➜ X
Increment Stack PntrINS 3141  SP + 1 ➜ SP
Load Index RegLDX CE33 DE42 EE62 FE53  M ➜ XH, (M + 1) ➜ XL 9R
Load Stack PntrLDS 8E33 9E42 AE62 BE53  M ➜ SPH, (M + 1) ➜ SPL 9R
Store Index RegSTX DF42 EF62 FF53  XH ➜ M, XL ➜ (M + 1) 9R
Store Stack PntrSTS 9F42 AF62 BF53  SPH ➜ M, SPL ➜ (M + 1) 9R
Index Reg➜Stack PntrTXS 3541  X - 1 ➜ SP
Stack Pntr➜Index RegTSX 3041  SP + 1 ➜ X
Table 3 - Jump and Branch Instructions
ADDRESSING MODES COND. CODE REG.
JUMP AND BRANCH RELATIVE INDEX EXTND INHER 543210
OPERATIONS MNEMONIC OP~# OP~# OP~# OP~# BRANCH TEST HI NZ VC
Branch AlwaysBRA 2042  None
Branch If Carry ClearBCC 2442  C = 0
Branch If Carry SetBCS 2542  C = 1
Branch If = ZeroBEQ 2742  Z = 1
Branch If ≧ ZeroBGE 2C42  N ⊕ V = 0
Branch If > ZeroBGT 2E42  Z ✚ (N ⊕ V) = 0
Branch If HigherBHI 2242  C ✚ Z = 0
Branch If ≦ ZeroBLE 2F42  Z ✚ (N ⊕ V) = 1
Branch If Lower or SameBLS 2342  C ✚ Z = 1
Branch If < ZeroBLT 2D42  N ⊕ V = 1
Branch If MinusBMI 2B42  N = 1
Branch If Not Equal ZeroBNE 2642  Z = 0
Branch If Overflow ClearBVC 2842  V = 0
Branch If Overflow SetBVS 2942  V = 1
Branch If PlusBPL 2A42  N = 0
Branch To SubroutineBSR 8D42 See
Special
Operations
JumpJMP 6E42 7E33
Jump To SubroutineJSR AD42 BD33
No OperationNOP 0121  Advance Prog. Ctr.
Return From InterruptRTI 3B101 See
Special
Operations
1010 1010 1010
Return From SubroutineRTS 3951
Software InterruptSWI 3D121
Wait For InterruptWAI 3E91 11
Table 4 - Condition Code Register Instructions
ADDRESSING MODES BOOLEAN
CONDITIONS CODE REGISTER INHER OPERATION 543210
OPERATIONS MNEMONIC OP~# HI NZ VC
Clear CarryCLC 0C21 0 ➜ C R
Clear Interrupt MaskCLI 0E21 0 ➜ I R
Clear OverflowCLV 0A21 0 ➜ V R
Set CarrySEC 0D21 1 ➜ C S
Set Interrupt MaskSEI 0F21 1 ➜ I S
Set OverflowSEV 0B21 1 ➜ V S
Acmltr A ➜ CCRTAP 0621 A ➜ CCR 12 12 12 12 12 12
CCR ➜ Acmltr ATPA 0721 CCR ➜ A

Legend and Conditional Code Register Notes
CONDITION CODE REGISTER NOTES:
(Bit set if test is true; cleared otherwise)
1(bit V)Test: Result = 10000000?
2(Bit C)Test: Result 00000000?
3(Bit C)Test: Decimal value of most significant BCD character greater than nine? (Not cleared if previously set)
4(Bit V)Test: Operand = 10000000 Prior to execution?
5(Bit V)Test: Operand = 01111111 Prior to execution?
6(Bit V)Test: Set equal to result of N ⊕ C after shift has occured.
7(Bit N)Test: Sign bit of most significant (MS) byte of result = 1?
8(Bit V)Test: 2's complement overflow from subtraction of MS bytes?
9(Bit N)Test: Result less than zero? (Bit 15 = 1)
10(All)Load Conditional Code Register from Stack (See Special Operations)
11(Bit I)Set when interrupt occurs. If previously set, a Non-Maskable Interrupt is required to exit the wait state.
12ALLSet according to the contents of Accumulator A.
LEGEND: 00Byte = Zero
OPOperation Code (Hex); HHalf carry from bit 3;
~Number of MPU Cycles;I Interupt Mask;
#Number of Program Bytes;N Negative (sign bit);
+Arithmetic Plus;Z Zero (byte);
-Arithmetic Minus;V Overflow, 2's compliment;
Boolean AND; CCarry from bit 7;
MSPContents of memory location
pointed to by the stack Pointer;
Test and set if true,
cleared otherwise;
Boolean Inclusive OR; RReset Always;
=Boolean Exclusive OR; SSet Always;
MComplement of M; Not Affected;
Transfer Into; CCRCondition Code Register;
0Bit = 0; LSLeast Significant;
MSMost Significant;
MICRO 68 PARTS LIST
REFERENCE*QUANTITYMANUFACTURERPART NUMBERDESCRIPTION
11Moore Electro Printed Circuit Board
21Micro-Switch16NW7-37Keyboard
1Dynamic Instrument4-14228.5V, 1.5a, Transformer
31NationalLM309K5V, 1A, Regulator
41Sprague39D109-
GO1OJT4
10,000 Mfd 10V
Capacitor
51Motorola/AMI6800MPU
62Motorola/AMI6820PIA
76Motorola/AMI6810RAM
84HarrisHPROM-
1-1024
256x4 PROM
96MonsantoMAN3840LED
10274S04Segment Driver
1119602Oscillator
14CK050.01 Mfd Bypass
2CK0539 pF Capacitor
121Signetics8T26Line Driver
1317430Gate
14174S00Clock Driver
1514 2200 Ohm Pullup
2 47K Ohm
2 10 Ohm
2 820 Ohm
161 ROM
6 #6-32 Screws
1HeycoSR-13-1Strain Relief
1Precision Graphics Cabinet Assembly
176 2N2222LED Driver
184 1N4001Diode
1TIC83240224 Pin Socket
1TIC83160216 Pin Socket
1TIC83400240 Pin Socket
* See A. - Micro 68 PC Block Diagram
EPA Micro 68 CLOCK - Page 1
EPA Micro 68 MPU, ROM, and RAM - Page 1
Page 1 - EPA MICRO 68 - MPU, MIKBUG/MINIBUG ROM, and RAM
P1
33
A15
/M
A14
/N
A13
34
A12
9
GND
8
GND
K
GND
H
GND
35
A11
/P
A10
/R
A09
36
A08
37
A07
/S
A06
/T
A05
38
A04
39
A03
/U
A02
/V
A01
40
A00
/J
D07
30
D06
/H
D05
29
D04
/L
D03
32
D02
K
D01
31
D00
18
TSC
/F
HALT
E
NMI
/E
BA
F
VMA
10
VUA
8
R/W
5
RESET
D
IRQ
J
∅2
7
∅1
A00
9
A01
10
A02
11
A03
12
A04
13
A05
14
A06
15
A07
16
A08
17
A09
18
A10
19
A11
20
A12
22
A13
23
A14
24
A15
25
D00
33
D01
32
D02
31
D03
30
D04
29
D05
28
D06
27
D07
26
CLK1
3
CLK2
37
RESET
40
NMI
6
HALT
2
IRQ
4
TSC
39
DBE
36
NC1
35
NC2
38
BA
7
VMA
5
R/W
34
U11
M6800
M
P
U
24
A0
23
A1
22
A2
21
A3
20
A4
19
A5
18
A6
17
A7
16
A8
15
A9
D0
2
D1
3
D2
4
D3
5
D4
6
D5
7
D6
8
D7
9
CS0
10
CS1
11
CS2
13
CS3
14
U9
MCM6830
R
O
M
$E000
23
A0
22
A1
21
A2
20
A3
19
A4
18
A5
17
A6
D0
2
D1
3
D2
4
D3
5
D4
6
D5
7
D6
8
D7
9
R/W
16
CS0
10
CS1
11
CS2
12
CS3
13
CS4
14
CS5
15
U12
MCM6810
R
A
M
$A000
A15♰
A14♰
A13♰
A12♰
A11♰
A10♰
A09♰
A08♰
A07♰
A06♰
A05♰
A04♰
A03♰
A02♰
A01♰
A00♰
D00
D01
D02
D04
D04
D05
D06
D07
TSC
HALT
NMI
BA
VMA♰
R/W
RESET
IRQ
∅2
∅1
A00♰
A01♰
A02♰
A03♰
A04♰
A05♰
A06♰
A07♰
A08♰
A09♰
A10♰
A11♰
A12♰
A13♰
A14♰
A15♰
D00
D01
D02
D03
D04
D05
D06
D07
∅1
∅2
RESET
NMI
HALT
IRQ
TSC
DBE
BA
VMA♰
A00♰
A01♰
A02♰
A03♰
A04♰
A05♰
A06♰
A07♰
A08♰
A09♰
A14♰
A15♰
A13♰
D00
D01
D02
D03
D04
D05
D06
D07
A00♰
A01♰
A02♰
A03♰
A04♰
A05♰
A06♰
D00
D01
D02
D03
D04
D05
D06
D07
A13♰
A12♰
A14♰
A15♰
VMA·∅2
Pg 5 (U15-11)
Jumper E2 to C
when using
MIKBUG
A[15..00]♰
Pg 1,2,3,4
D[07..00]
Pg 1,2,3,4
R1
2.2KΩ
+5V
HALT
R2
10KΩ
+5V
IRQ
R3
2.2KΩ
TSC
∅2
Pg 5 (R4)
∅2
IRQ
Pg 3 (U10,U11)
IRQ
HALT
To P2,3,4
HALT
R/W
To P2,3,4
NOTES:
⚬ TP(x) = TEST POINTS
⚬ NUMBERS NEAR DEVICES = PIN NOS.
⚬ The +/- 12V power supply must be floating with respect to ground.
⚬ All IRQ lines are wired-OR together. A 3K external resistor to VCC
   should be used for optimum control of interrupts.
⚬ Jumper E2 to C when using MIKBUG.
⚬ Jumper U9-Pin 16 to +5V for 30CPS, or GND for 10CPS.
⚬ A "♰" marks Address lines that come directly from the CPU.
   For off-board use, use a Tri-State Bus Interface.
⚬ Connector pins with "/" indicate bottom of board.