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.
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 | |
FIGURE | TITLE |
1 | MINIMUM COMPUTER SYSTEM |
2 | PERIPHERAL HOOK-UP |
3 | PIA-INTERNAL ORGANIZATION |
4 | READER DATA FORMAT |
5 | MEMORY MAP |
6 | SUBROUTINE HIERARCHY |
7 | TYPICAL INTERNAL ORGANIZATION OF A CPU |
8 | MC6800 MPU INTERNAL ORGINIZATION |
LIST OF TABLES | |
TABLE | TITLE |
1 | ACCUMULATOR AND MEMORY INSTRUCTIONS |
2 | INDEX REGISTER AND STACK MANIPULATION INSTRUCTIONS |
3 | JUMP AND BRANCH INSTRUCTIONS |
4 | CONDITION CODE REGISTER MANIPULATION INSTRUCTIONS |
EPA Micro-68 User Manual - Weatherford |
The Micro 68 Computer
C | D | E | F |
---|---|---|---|
8 | 9 | A | B |
4 | 5 | 6 | 7 |
0 | 1 | 2 | 3 |
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
BINARY | DECIMAL | HEXADECIMAL |
---|---|---|
%0000 | 0 | $0 |
%0001 | 1 | $1 |
%0010 | 2 | $2 |
%0011 | 3 | $3 |
%0100 | 4 | $4 |
%0101 | 5 | $5 |
%0110 | 6 | $6 |
%0111 | 7 | $7 |
%1000 | 8 | $8 |
%1001 | 9 | $9 |
%1010 | 10 | $A |
%1011 | 11 | $B |
%1100 | 12 | $C |
%1101 | 13 | $D |
%1110 | 14 | $E |
%1111 | 15 | $F |
%10000 | 16 | $10 |
%10001 | 17 | $11 |
: | : | : |
Binary | ... | 23 | 22 | 21 | 20 |
---|---|---|---|---|---|
Decimal | ... | 103 | 102 | 101 | 100 |
Hexadecimal | ... | 163 | 162 | 161 | 160 |
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 | |||||
---|---|---|---|---|---|
ADDRESS | CONTENTS | ||||
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, 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
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.
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.
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 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
MEMORY LOCATION | $8004 | ||||||||
Key | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
MEMORY LOCATION | $8006 | ||||||||
Key | F | E | D | C | B | A | 9 | 8 |
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.
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:
- Select the first three LED's by writing the following bit pattern into memory location 800A: 00001100
- 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
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 |
---|---|---|
0000 | FE | . |
0001 | FE | . |
0002 | FE | . |
0003 | FE | . |
0004 | FE | . |
0005 | FE | . |
0006 | 91 | H |
0007 | 61 | E |
0008 | E3 | L |
0009 | E3 | L |
000A | 03 | O |
000B | FF | |
000C | FF | |
000D | FF | |
000E | FF | |
000F | 63 | C |
0010 | 11 | A |
0011 | 13 | N |
0012 | FF | |
0013 | FF | |
0014 | FF | |
0015 | 9F | I |
0016 | FF | |
0017 | FF | |
0018 | FF | |
0019 | 91 | H |
001A | 61 | E |
001B | E3 | L |
001C | 31 | P |
001D | FF | |
001E | FF | |
001F | FF | |
0020 | 89 | Y |
0021 | 03 | O |
0022 | 83 | U |
0023 | FF | |
0024 | 35 | ? |
0025 | FF | |
0026 | FF | |
0027 | FF | |
0028 | FF |
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 |
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.
LOAD and DATA Flow Diagram |
Step, Do, Examine, Forward, Backward, and Change Flow Diagram |
INPUT and DISPLAY Flow Diagram |
FRAME, STRTREAD, FRAMEOUT, SETUP, and INTERRUPT Flow Diagram |
BYTEIN and BYTEOUT Flow Diagram |
SUBROUTINE HIERARCHY |
Table 1 - Accumulator and Memory Instructions |
ADDRESSING MODES | BOOLEAN/ARITHMETIC OPERATION | COND. CODE REG. | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ACCUMULATOR AND MEMORY | IMMED | DIRECT | INDEX | EXTND | INHER | (All register lables | 5 | 4 | 3 | 2 | 1 | 0 | |||||||||||
OPERATIONS | MNEMONIC | OP | ~ | # | OP | ~ | # | OP | ~ | # | OP | ~ | # | OP | ~ | # | refer to contents) | H | I | N | Z | V | C |
Add | ADDA | 8B | 2 | 2 | 9B | 3 | 2 | AB | 5 | 2 | BB | 4 | 3 | A + M ➜ A | ↕ | ● | ↕ | ↕ | ↕ | ↕ | |||
ADDB | CB | 2 | 2 | DB | 3 | 2 | EB | 5 | 2 | FB | 4 | 3 | B + M ➜ B | ↕ | ● | ↕ | ↕ | ↕ | ↕ | ||||
Add Acmltrs | ABA | 18 | 2 | 1 | A + B ➜ A | ↕ | ● | ↕ | ↕ | ↕ | ↕ | ||||||||||||
Add with Carry | ADCA | 89 | 2 | 2 | 99 | 3 | 2 | A9 | 5 | 2 | B9 | 4 | 3 | A + B + C ➜ A | ↕ | ● | ↕ | ↕ | ↕ | ↕ | |||
ADCB | C9 | 2 | 2 | D9 | 3 | 2 | E9 | 5 | 2 | F9 | 4 | 3 | A + B + C ➜ B | ↕ | ● | ↕ | ↕ | ↕ | ↕ | ||||
And | ANDA | 84 | 2 | 2 | 94 | 3 | 2 | A4 | 5 | 2 | B4 | 4 | 3 | A ● M ➜ A | ● | ● | ↕ | ↕ | R | ● | |||
ANDB | C4 | 2 | 2 | D4 | 3 | 2 | E4 | 5 | 2 | F4 | 4 | 3 | B ● M ➜ B | ● | ● | ↕ | ↕ | R | ● | ||||
Bit Test | BITA | 85 | 2 | 2 | 95 | 3 | 2 | A5 | 5 | 2 | B5 | 4 | 3 | A ● M | ● | ● | ↕ | ↕ | R | ● | |||
BITB | C5 | 2 | 2 | D5 | 3 | 2 | E5 | 5 | 2 | F5 | 4 | 3 | B ● M | ● | ● | ↕ | ↕ | R | ● | ||||
Clear | CLR | 6F | 7 | 2 | 7F | 6 | 3 | 00 ➜ M | ● | ● | R | S | R | R | |||||||||
CLRA | 4F | 2 | 1 | 00 ➜ A | ● | ● | R | S | R | R | |||||||||||||
CLRB | 5F | 2 | 1 | 00 ➜ B | ● | ● | R | S | R | R | |||||||||||||
Compare | CMPA | 81 | 2 | 2 | 91 | 3 | 2 | A1 | 5 | 2 | B1 | 4 | 3 | A - M | ● | ● | ↕ | ↕ | ↕ | ↕ | |||
CMPB | C1 | 2 | 2 | D1 | 3 | 2 | E1 | 5 | 2 | F1 | 4 | 3 | B - M | ● | ● | ↕ | ↕ | ↕ | ↕ | ||||
Compare Acmltrs | CBA | 11 | 2 | 3 | A - B | ● | ● | ↕ | ↕ | ↕ | ↕ | ||||||||||||
Complement, 1's | COM | 63 | 7 | 2 | 73 | 6 | 3 | M ➜ M | ↕ | ● | ↕ | ↕ | R | S | |||||||||
COMA | 43 | 2 | 1 | A ➜ A | ↕ | ● | ↕ | ↕ | R | S | |||||||||||||
COMB | 53 | 2 | 1 | B ➜ B | ↕ | ● | ↕ | ↕ | R | S | |||||||||||||
Complement, 2's | NEG | 60 | 7 | 2 | 70 | 6 | 3 | 00 - M ➜ M | ● | ● | ↕ | ↕ | 1 | 2 | |||||||||
(Negate) | NEGA | 40 | 2 | 1 | 00 - A ➜ A | ● | ● | ↕ | ↕ | 1 | 2 | ||||||||||||
NEGB | 50 | 2 | 1 | 00 - B ➜ B | ● | ● | ↕ | ↕ | 1 | 2 | |||||||||||||
Decimal Adjust, A | DAA | 19 | 2 | 1 | Converts Binary Add. of BCD | ● | ● | ↕ | ↕ | ↕ | 3 | ||||||||||||
Characters into BCD Format | |||||||||||||||||||||||
Decrement | DEC | 6A | 7 | 2 | 7A | 6 | 3 | M - 1 ➜ M | ● | ● | ↕ | ↕ | 4 | ● | |||||||||
DECA | 4A | 2 | 1 | A - 1 ➜ A | ● | ● | ↕ | ↕ | 4 | ● | |||||||||||||
DECB | 5A | 2 | 1 | B - 1 ➜ B | ● | ● | ↕ | ↕ | 4 | ● | |||||||||||||
Exclusive OR | EORA | 88 | 2 | 2 | 98 | 3 | 2 | A8 | 5 | 2 | B8 | 4 | 3 | A ⊕ M ➜ A | ● | ● | ↕ | ↕ | R | ↕ | |||
EORB | C8 | 2 | 2 | D8 | 3 | 2 | E8 | 5 | 2 | F8 | 4 | 3 | B ⊕ M ➜ B | ● | ● | ↕ | ↕ | R | ↕ | ||||
Increment | INC | 6C | 7 | 2 | 7C | 6 | 3 | M + 1 ➜ M | ● | ● | ↕ | ↕ | 5 | ● | |||||||||
INCA | 4C | 2 | 1 | A + 1 ➜ A | ● | ● | ↕ | ↕ | 5 | ● | |||||||||||||
INCB | 5C | 2 | 1 | B + 1 ➜ B | ● | ● | ↕ | ↕ | 5 | ● | |||||||||||||
Load Acmltrs | LDAA | 86 | 2 | 2 | 96 | 3 | 2 | A6 | 5 | 2 | B6 | 4 | 3 | M ➜ A | ● | ● | ↕ | ↕ | R | ● | |||
LDAB | C6 | 2 | 2 | D6 | 3 | 2 | E6 | 5 | 2 | F6 | 4 | 3 | M ➜ B | ● | ● | ↕ | ↕ | R | ● | ||||
OR, Inclusive | ORAA | 8A | 2 | 2 | 9A | 3 | 2 | AA | 5 | 2 | BA | 4 | 3 | A ✚ M ➜ A | ● | ● | ↕ | ↕ | R | ● | |||
ORAB | CA | 2 | 2 | DA | 3 | 2 | EA | 5 | 2 | FA | 4 | 3 | B ✚ M ➜ B | ● | ● | ↕ | ↕ | R | ● | ||||
Push Data | PSHA | 36 | 4 | 1 | A ➜ MSP, SP - 1 ➜ SP | ● | ● | ● | ● | ● | ● | ||||||||||||
PSHB | 37 | 4 | 1 | B ➜ MSP, SP - 1 ➜ SP | ● | ● | ● | ● | ● | ● | |||||||||||||
Pull Data | PULA | 32 | 4 | 1 | SP + 1 ➜ SP, MSP ➜ A | ● | ● | ● | ● | ● | ● | ||||||||||||
PULB | 33 | 4 | 1 | SP + 1 ➜ SP, MSP ➜ B | ● | ● | ● | ● | ● | ● | |||||||||||||
Rotate Left | ROL | 69 | 7 | 2 | 79 | 6 | 3 | M A B C b7 b0 |
● | ● | ↕ | ↕ | 6 | ● | |||||||||
ROLA | 49 | 2 | 1 | ● | ● | ↕ | ↕ | 6 | ● | ||||||||||||||
ROLB | 59 | 2 | 1 | ● | ● | ↕ | ↕ | 6 | ● | ||||||||||||||
Rotate Right | ROR | 66 | 7 | 2 | 76 | 6 | 3 | M A B C b7 b0 |
● | ● | ↕ | ↕ | 6 | ● | |||||||||
RORA | 46 | 2 | 1 | ● | ● | ↕ | ↕ | 6 | ● | ||||||||||||||
RORB | 56 | 2 | 1 | ● | ● | ↕ | ↕ | 6 | ● | ||||||||||||||
Shift Left, | ASL | 68 | 7 | 2 | 78 | 6 | 3 | M A B 0 C b7 b0 |
● | ● | ↕ | ↕ | 6 | ● | |||||||||
Arithmetic | ASLA | 48 | 2 | 1 | ● | ● | ↕ | ↕ | 6 | ● | |||||||||||||
ASLB | 58 | 2 | 1 | ● | ● | ↕ | ↕ | 6 | ● | ||||||||||||||
Shift Right, | ASR | 67 | 7 | 2 | 77 | 6 | 3 | M A B C b7 b0 |
● | ● | ↕ | ↕ | 6 | ● | |||||||||
Arithmetic | ASRA | 47 | 2 | 1 | ● | ● | ↕ | ↕ | 6 | ● | |||||||||||||
ASRB | 57 | 2 | 1 | ● | ● | ↕ | ↕ | 6 | ● | ||||||||||||||
Shift Right, | LSR | 64 | 7 | 2 | 74 | 6 | 3 | M A B 0 C b7 b0 |
● | ● | R | ↕ | 6 | ● | |||||||||
Logic | LSRA | 44 | 2 | 1 | ● | ● | R | ↕ | 6 | ● | |||||||||||||
LSRB | 54 | 2 | 1 | ● | ● | R | ↕ | 6 | ● | ||||||||||||||
Store Acmltrs | STAA | 97 | 4 | 2 | A7 | 6 | 2 | B7 | 5 | 3 | A ➜ M | ● | ● | ↕ | ↕ | R | ● | ||||||
STAB | D7 | 4 | 2 | E7 | 6 | 2 | F7 | 5 | 3 | B ➜ M | ● | ● | ↕ | ↕ | R | ● | |||||||
Subtract | SUBA | 80 | 2 | 2 | 90 | 3 | 2 | A0 | 5 | 2 | B0 | 4 | 3 | A - M ➜ A | ● | ● | ↕ | ↕ | ↕ | ↕ | |||
SUBB | C0 | 2 | 2 | D0 | 3 | 2 | E0 | 5 | 2 | F0 | 4 | 3 | B - M ➜ B | ● | ● | ↕ | ↕ | ↕ | ↕ | ||||
Subtract Acmltrs | SBA | 10 | 2 | 1 | A - B ➜ A | ● | ● | ↕ | ↕ | ↕ | ↕ | ||||||||||||
Subtr. with Carry | SBCA | 82 | 2 | 2 | 92 | 3 | 2 | A2 | 5 | 2 | B2 | 4 | 3 | A - M - C ➜ A | ● | ● | ↕ | ↕ | ↕ | ↕ | |||
SBCB | C2 | 2 | 2 | D2 | 3 | 2 | E2 | 4 | 2 | F2 | 4 | 3 | B - M - C ➜ B | ● | ● | ↕ | ↕ | ↕ | ↕ | ||||
Transfer Acmltrs | TAB | 16 | 2 | 1 | A ➜ B | ● | ● | ↕ | ↕ | R | ● | ||||||||||||
TBA | 17 | 2 | 1 | B ➜ A | ● | ● | ↕ | ↕ | R | ● | |||||||||||||
Test, Zero or Minus | TST | 6D | 7 | 2 | 7D | 6 | 3 | M - 00 | ● | ● | ↕ | ↕ | R | R | |||||||||
TSTA | 4D | 2 | 1 | A - 00 | ● | ● | ↕ | ↕ | R | R | |||||||||||||
TSTB | 5D | 2 | 1 | B - 00 | ● | ● | ↕ | ↕ | R | R |
Table2 -Index Register and Stack Instructions |
ADDRESSING MODES | BOOLEAN/ARITHMETIC OPERATION | COND. CODE REG. | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
INDEX REGISTER AND STACK | IMMED | DIRECT | INDEX | EXTND | INHER | (All register lables | 5 | 4 | 3 | 2 | 1 | 0 | |||||||||||
POINTER OPERATIONS | MNEMONIC | OP | ~ | # | OP | ~ | # | OP | ~ | # | OP | ~ | # | OP | ~ | # | refer to contents) | H | I | N | Z | V | C |
Compare Index Reg | CPX | 8C | 3 | 3 | 9C | 4 | 2 | AC | 6 | 2 | BC | 5 | 3 | (XH/XL) - (M/M + 1) | ● | ● | 7 | ↕ | 8 | ● | |||
Decrement Index Reg | DEX | 09 | 4 | 1 | X - 1 ➜ X | ● | ● | ● | ↕ | ● | ● | ||||||||||||
Decrement Stack Pntr | DES | 34 | 4 | 1 | SP - 1 ➜ SP | ● | ● | ● | ● | ● | ● | ||||||||||||
Increment Index Reg | INX | 08 | 4 | 1 | X + 1 ➜ X | ● | ● | ● | ↕ | ● | ● | ||||||||||||
Increment Stack Pntr | INS | 31 | 4 | 1 | SP + 1 ➜ SP | ● | ● | ● | ● | ● | ● | ||||||||||||
Load Index Reg | LDX | CE | 3 | 3 | DE | 4 | 2 | EE | 6 | 2 | FE | 5 | 3 | M ➜ XH, (M + 1) ➜ XL | ● | ● | 9 | ↕ | R | ● | |||
Load Stack Pntr | LDS | 8E | 3 | 3 | 9E | 4 | 2 | AE | 6 | 2 | BE | 5 | 3 | M ➜ SPH, (M + 1) ➜ SPL | ● | ● | 9 | ↕ | R | ● | |||
Store Index Reg | STX | DF | 4 | 2 | EF | 6 | 2 | FF | 5 | 3 | XH ➜ M, XL ➜ (M + 1) | ● | ● | 9 | ↕ | R | ● | ||||||
Store Stack Pntr | STS | 9F | 4 | 2 | AF | 6 | 2 | BF | 5 | 3 | SPH ➜ M, SPL ➜ (M + 1) | ● | ● | 9 | ↕ | R | ● | ||||||
Index Reg➜Stack Pntr | TXS | 35 | 4 | 1 | X - 1 ➜ SP | ● | ● | ● | ● | ● | ● | ||||||||||||
Stack Pntr➜Index Reg | TSX | 30 | 4 | 1 | SP + 1 ➜ X | ● | ● | ● | ● | ● | ● |
Table 3 - Jump and Branch Instructions |
ADDRESSING MODES | COND. CODE REG. | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JUMP AND BRANCH | RELATIVE | INDEX | EXTND | INHER | 5 | 4 | 3 | 2 | 1 | 0 | ||||||||||
OPERATIONS | MNEMONIC | OP | ~ | # | OP | ~ | # | OP | ~ | # | OP | ~ | # | BRANCH TEST | H | I | N | Z | V | C |
Branch Always | BRA | 20 | 4 | 2 | None | ● | ● | ● | ● | ● | ● | |||||||||
Branch If Carry Clear | BCC | 24 | 4 | 2 | C = 0 | ● | ● | ● | ● | ● | ● | |||||||||
Branch If Carry Set | BCS | 25 | 4 | 2 | C = 1 | ● | ● | ● | ● | ● | ● | |||||||||
Branch If = Zero | BEQ | 27 | 4 | 2 | Z = 1 | ● | ● | ● | ● | ● | ● | |||||||||
Branch If ≧ Zero | BGE | 2C | 4 | 2 | N ⊕ V = 0 | ● | ● | ● | ● | ● | ● | |||||||||
Branch If > Zero | BGT | 2E | 4 | 2 | Z ✚ (N ⊕ V) = 0 | ● | ● | ● | ● | ● | ● | |||||||||
Branch If Higher | BHI | 22 | 4 | 2 | C ✚ Z = 0 | ● | ● | ● | ● | ● | ● | |||||||||
Branch If ≦ Zero | BLE | 2F | 4 | 2 | Z ✚ (N ⊕ V) = 1 | ● | ● | ● | ● | ● | ● | |||||||||
Branch If Lower or Same | BLS | 23 | 4 | 2 | C ✚ Z = 1 | ● | ● | ● | ● | ● | ● | |||||||||
Branch If < Zero | BLT | 2D | 4 | 2 | N ⊕ V = 1 | ● | ● | ● | ● | ● | ● | |||||||||
Branch If Minus | BMI | 2B | 4 | 2 | N = 1 | ● | ● | ● | ● | ● | ● | |||||||||
Branch If Not Equal Zero | BNE | 26 | 4 | 2 | Z = 0 | ● | ● | ● | ● | ● | ● | |||||||||
Branch If Overflow Clear | BVC | 28 | 4 | 2 | V = 0 | ● | ● | ● | ● | ● | ● | |||||||||
Branch If Overflow Set | BVS | 29 | 4 | 2 | V = 1 | ● | ● | ● | ● | ● | ● | |||||||||
Branch If Plus | BPL | 2A | 4 | 2 | N = 0 | ● | ● | ● | ● | ● | ● | |||||||||
Branch To Subroutine | BSR | 8D | 4 | 2 | See Special Operations |
● | ● | ● | ● | ● | ● | |||||||||
Jump | JMP | 6E | 4 | 2 | 7E | 3 | 3 | ● | ● | ● | ● | ● | ● | |||||||
Jump To Subroutine | JSR | AD | 4 | 2 | BD | 3 | 3 | ● | ● | ● | ● | ● | ● | |||||||
No Operation | NOP | 01 | 2 | 1 | Advance Prog. Ctr. | ● | ● | ● | ● | ● | ● | |||||||||
Return From Interrupt | RTI | 3B | 10 | 1 | See Special Operations |
10 | 10 | 10 | 10 | 10 | 10 | |||||||||
Return From Subroutine | RTS | 39 | 5 | 1 | ● | ● | ● | ● | ● | ● | ||||||||||
Software Interrupt | SWI | 3D | 12 | 1 | ● | ● | ● | ● | ● | ● | ||||||||||
Wait For Interrupt | WAI | 3E | 9 | 1 | ● | 11 | ● | ● | ● | ● |
Table 4 - Condition Code Register Instructions |
ADDRESSING MODES | BOOLEAN | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CONDITIONS CODE REGISTER | INHER | OPERATION | 5 | 4 | 3 | 2 | 1 | 0 | |||
OPERATIONS | MNEMONIC | OP | ~ | # | H | I | N | Z | V | C | |
Clear Carry | CLC | 0C | 2 | 1 | 0 ➜ C | ● | ● | ● | ● | ● | R |
Clear Interrupt Mask | CLI | 0E | 2 | 1 | 0 ➜ I | ● | R | ● | ● | ● | ● |
Clear Overflow | CLV | 0A | 2 | 1 | 0 ➜ V | ● | ● | ● | ● | R | ● |
Set Carry | SEC | 0D | 2 | 1 | 1 ➜ C | ● | ● | ● | ● | ● | S |
Set Interrupt Mask | SEI | 0F | 2 | 1 | 1 ➜ I | ● | S | ● | ● | ● | ● |
Set Overflow | SEV | 0B | 2 | 1 | 1 ➜ V | ● | ● | ● | ● | S | ● |
Acmltr A ➜ CCR | TAP | 06 | 2 | 1 | A ➜ CCR | 12 | 12 | 12 | 12 | 12 | 12 |
CCR ➜ Acmltr A | TPA | 07 | 2 | 1 | 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. |
12 | ALL | Set according to the contents of Accumulator A. |
LEGEND: | 00 | Byte = Zero | |
OP | Operation Code (Hex); | H | Half 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; | C | Carry from bit 7; |
MSP | Contents of memory location pointed to by the stack Pointer; |
↕ | Test and set if true, cleared otherwise; |
⊕ | Boolean Inclusive OR; | R | Reset Always; |
= | Boolean Exclusive OR; | S | Set Always; |
M | Complement of M; | ● | Not Affected; |
➜ | Transfer Into; | CCR | Condition Code Register; |
0 | Bit = 0; | LS | Least Significant; |
MS | Most Significant; |
MICRO 68 PARTS LIST |
REFERENCE* | QUANTITY | MANUFACTURER | PART NUMBER | DESCRIPTION |
---|---|---|---|---|
1 | 1 | Moore Electro | Printed Circuit Board | |
2 | 1 | Micro-Switch | 16NW7-37 | Keyboard |
1 | Dynamic Instrument | 4-1422 | 8.5V, 1.5a, Transformer | |
3 | 1 | National | LM309K | 5V, 1A, Regulator |
4 | 1 | Sprague | 39D109- GO1OJT4 | 10,000 Mfd 10V Capacitor |
5 | 1 | Motorola/AMI | 6800 | MPU |
6 | 2 | Motorola/AMI | 6820 | PIA |
7 | 6 | Motorola/AMI | 6810 | RAM |
8 | 4 | Harris | HPROM- 1-1024 | 256x4 PROM |
9 | 6 | Monsanto | MAN3840 | LED |
10 | 2 | 74S04 | Segment Driver | |
11 | 1 | 9602 | Oscillator | |
14 | CK05 | 0.01 Mfd Bypass | ||
2 | CK05 | 39 pF Capacitor | ||
12 | 1 | Signetics | 8T26 | Line Driver |
13 | 1 | 7430 | Gate | |
14 | 1 | 74S00 | Clock Driver | |
15 | 14 | 2200 Ohm Pullup | ||
2 | 47K Ohm | |||
2 | 10 Ohm | |||
2 | 820 Ohm | |||
16 | 1 | ROM | ||
6 | #6-32 Screws | |||
1 | Heyco | SR-13-1 | Strain Relief | |
1 | Precision Graphics | Cabinet Assembly | ||
17 | 6 | 2N2222 | LED Driver | |
18 | 4 | 1N4001 | Diode | |
1 | TI | C832402 | 24 Pin Socket | |
1 | TI | C831602 | 16 Pin Socket | |
1 | TI | C834002 | 40 Pin Socket | |
* See A. - Micro 68 PC Block Diagram |
EPA Micro 68 CLOCK - Page 1 |
EPA Micro 68 MPU, ROM, and RAM - Page 1 |