EK DCTEM UG 001

EK-DCTEM-UG-001 EK-DCTEM-UG-001

User Manual: EK-DCTEM-UG-001

Open the PDF directly: View PDF PDF.
Page Count: 221

DownloadEK-DCTEM-UG-001
Open PDF In BrowserView PDF
EK-OCTEM-UG-OO 1

DCTll-EM
Evaluation Module
User's Guide

mamaama

EK-DCTEM-UG-OO 1

DCTll-EM
Evaluation Module
User's Guide

Prepared by Educational Services
of
Digital Equipment Corporation

1st Edition, September 1983

.14
1>.15
1>.16
(,.17

INTRODUCTION ..................................................................................................... 6-1
DCTll-AA M1CROPROCESSOR ........................................................................... 6-3
RAM .................................................................................................... ,", ................... 6-3
MONITOR EPROM ................................................................................................. 6-4
PERIPHERAL CHIPS AND DRIVERS ................................................................. 6-4
Parallel Port (8255A) ......................................................................................... 6-4
DLART Console Serial Line .............................................................................. 6-5
Auxiliary Serial Line (8251 A) ........................................................................... 6-5
INTERNAL DATA BUS BUFFER ......................................................................... 6-5
USER BUFFERS ..................................................................................................... 6-5
PROCESSOR CYCLE DECODING ........................................................................ 6-5
ADDRESS LATCHING AND RANGE DECODIl"G ........................................... 6-5
PERIPHERAL CHIP ADDRESS DECODING .................................................... 6-6
INTERRUPTS AND TRAPS .................................................................................. 6-6
TIMING ..................................................................................................................... 6-7
MISCFLLA I\EOUS CONTROL LOGIC ................................................................ 6-7
KEYPAD/LEDS ........................................................................................................ 6-7
HALT AND INT SWITCHES ................................................................................. 6-7
CONNECTORS ......................................................................................................... 6-8
HARDWARE EXPANSION - EXAMPLE ......................................................... 6-11

APPENDIX A

MONITOR LISTING

.\PPE"'D1X B

SCHEMATIC DRAWINGS

APPENDIX C

ERROR MESSAGES

to ~

to
to
to
to
to

~
~

~ I
~.2

53

to b
to ~ ~

to 9
to 10
b

II

to 12

FIGURES
Figure No.
2-1
2-2
2-3
2-4
3-1
4-1
4-2
5-1
5-2
5-3
5-4
6-1
6-2
6-3

6-4

Title

Page

Attaching Pin to Wire........... ......................................................... .. ..................... 2-1
Inserting Pin into Connector ...................................................................................... 2-2
Power Supply Connector Pin Assignments ................................................................ 2-2
Power Supply Connector ............................................................................................ 2-3
DCTII-EM Keypad, Switches, and Displays ............................................................ 3-1
Connecting a Console Terminal to the DCTII-EM .................................................. 4-1
Connecting a Host Computer to the DCTII-EM ................................................... 4-22
LED Segment Assignments ........................................................................................ 5-4
SEGBUF Assignments ............................................................................................... 5-4
DCT II-EM Memory Map ....................................................................................... 5-14
Map of I/O Space .................................................................................................5-16
DCTII-EM System Block Diagram .......................................................................... 6-2
Address Range Decoding .......................................................................................... 6-6
60-Pin Connector Pin Assignments .......................................................................... 6-11
16 KB Memory Module .......................................................................................... 6-12

v

TABLES
Table No.
4·1
4·2
6·1

6·2
6·3
C·I

Title

Page

Control Command Summary.
............... ..
................
. ... 4-3
DCTII·EM Directives..................
.. ......................................................... 4-21
Reserved I/O Locations for Peripheral Chips ................
.. ......... 6-4
Interrupt Vector Locations ..................................................
. ............................. 6-7
DCT II-EM Connector Pin Assignments ............... .....................
.. ..................... 6-H
Console Messages... . ............ ............. ................
...................
.. ................ c- 3

vi

PREFACE
This book explains how to use the DCTII-EM evaluation module. Although the book presents many
topics in simplified form, some technical background is assumed on your part. It is assumed, for example,
that you are familiar with the basics of microprocessor software and hardware. However, you need not be
familiar with microprocessors manufactured by Digital Equipment Corporation.
To understand software details such as those contained in the monitor listing (Appendix A), you should be
familiar with the MACRO-II language. To understand hardware details, you should be able to read and
interpret schematic diagrams and data sheets.
The book is organized as follows.
Chapter I is an introduction to the DCTII-EM and contains a specification summary for your reference.
Chapter 2 explains how to install and power up your DCTlI-EM.
Chapter 3 shows you how to operate your DCTlI-EM using the on-board keypad and switches.
Chapter 4 shows you how to operate your DCTII-EM using a console terminal.
Chapter 5 provides software information and describes the use of monitor subroutines.
Chapter 6 gives an overview of the DCTII-EM hardware and contains information you will find useful if
you plan to design external circuitry.
Appendices A and B contain the DCTII-EM monitor listing and schematics, respectively. Appendix C
contains a summary of error messages.
You will find that this book requires a high degree of interaction between you and the DCTII-EM.
Chapters 3 and 4, in particular, are structured so that examples are an integral part of the text.

vii

CHAPTER 1
OVERVIEW
1.1
INTRODUCTION
The OCTlI-EM is a standalone, single-board computer. It is designed as a tool to introduce you to the
OCT I I-AA microprocessor CPU chip and the PDP-II architecture. It contains supporting hardware and
software which greatly simplify the task of evaluating the DCTlI-AA for your application.
The OCT I I-EM gives you considerable flexibility in designing your own software and hardware. You can
write programs to run on the DCTII-EM which are substantially.the same as those written in the versatile
PDP-I I assembly language. You can also design your own hardware interfaces to use with the OCT I 1EM. In fact, your hardware can connect directly to the DCTlI-EM's internal data paths through an onboard, 60-pin male connector.
This chapter summarizes the features of the DCTII-EM. You will find more detail in the chapters that
follow.

1.2

THE DCfll-EM AT A GLANCE

Central Processor
•
•

OCTII-AA microprocessor
133 ns cycle time (standard)

Memory

•

4 K bytes of RAM, expandable to 8 K bytes

•

16 K bytes of EPROM which contains the DCTII-EM monitor

Input/Output
•
•
•

Two serial ports, one for a console terminal and the other for an auxiliary RS232-C device
Onc 8-bit parallel port
One 60-pin connector for use by expansion hardware; allows access to DCT II-EM internal data
paths

Host Communication
•
•
•

Host computer can be connected to the auxiliary serial port for down line loading of programs
Character format is asynchronous, 8 bits, ASCII, no parity, one stop bit
Available baud rates are: 300, 600, 1200, 2400, 4800, 9600, 19200

Software
•
•
•

Software is EPROM resident
Keypad monitor for performing operations with the on-board keypad
Console monitor for performing operations with a console terminal and with a host computer

I-I

On-Board Control Hardware
•
•

20-key keypad (4 X 5 array)
HALT push-button switch

On-Board Displays
•
•

Two rows of 6-digit octal LEOs
User LED

Interrupts
•
•

Four levels of interrupt priorities
On-board interrupt push-button switch

Diagnostics
•

Contained in EPROM, automatically run at power-up time

Documentation (provided with DCTll-EM)

•
•
•

DCTl/-EM User's Guide
DCTlJ-AA (MICRO/T-ll) User's Guide
DC3f9-AA DLART Data Sheet

Physical
•
•
•
•

Width: 20.3 em (8 in)
Length (including connectors): 27.9 em (II in)
Height: 3.8 em (1.5 in)
Weight: 450 gm (15 oz)

Environment
•
•
•
•

Noncaustic environment required
Operating temperature: 10 to 40 degrees C
Relative humidity: 10% to 90% (noncondensing)
Altitude: Up to 2.4 km (8000 ft)

DC Power Requirements
•

For keypad operation only:
+5 V (±5%) , and Displays

3-\

1034~

Figure 3-1 shows two rows of six LED digits which display data, addresses, and other information. Below
the two rows of LED digits is a single LED (called the user LED) which you can use as an indicator in your
programs. To the right of the LEOs are the HALT and [NT push-button switches. These switches perform
the functions their names imply; that is, they can halt and interrupt OCT I I-EM operation. To the extreme
right is a 4 X 5 array of switches called the keypad. The keypad is used to enter commands, instructions,
and other information to the DCTll-EM. Pressing keys will generally cause responses to appear on the
LED displays.

3.2

NUMBER SYSTEM

Information that is input or output via the keypad/LED combination must be represented in octal
notation. Since the DCTll-AA is a 16-oit processor, the acceptable range of octal inputs and outputs is
000000 through 177777.

3.3 EXAMINING REGISTERS
To examine the contents of a DCTll-AA internal register, you must first place the DCTll-EM in register
mode. Do this by pressing the REG key. The LEOs display:

111-1+11
1 111111
Now you may examine a register by pressing any of the following keys:

o through

9

or
CLR, which is equivalent to key O.
[n general, the name of the register being examined appears on the upper row of LEOs, and the contents of
the register appears on the lower row of LEOs. The exception to this is when the watch point (WP) is
examined. [n that case, an address called the watchpoint (WP) address is displayed on the upper row of
LEOs, and the WP contents are displ,ayed on the lower row.
Keys 0 through 7 select RO through R7, the eight registers in the DCTll-AA register file. Registers 6 and
7 are dedicated and are referred to as the stack pointer (SP) and program counter (PC), respectively.
Key 8 selects the processor status (PS) word. Only the lower 8 oits of the PS word are meaningful. The PS
word contains the current processor priority, the processor condition codes (N, Z, V, and C), and the T-bit.
Key 9 selects the watchpoint (WP). The WP is useful in connection with program debugging and is
discussed in Paragraph 3.8.3.

3-2

NOTE
If you have just powered up your DCTll-EM or if
you ha"e haIted its operation, it is not necessary to
press the REG key to get into register mode.
The upper row of LEOs will display:

111+111
The lower row of LEOs will display the current
value of the PC, and you can simply press one of the
keys 0 through 9 or CLR to select a register.
Examining Registers - Example ]
You want to examine the contents of various registers. It is assumed that the registers still contain their
initial (power-up) values.
UPPER
KEY

IREGI

G
[]

GJ
lelRI

0
0

DISPLAY

I 11,1+11
I II' HII

LOWER
DISPLAY

1 I I I I II

COMMENTS

Get Into register mode

101+101+1

I I I+H+H
I 11+11 I H+H+I
1 I 1'101 I I 1+101+101
1 11+1 I I 1+101+101
I+H+H H+H+I
1 11+1

The ADV and BAC keys allow you to examine register contents sequentially. Pressing the ADV key allows
you to examine registers in ascending order. You cannot advance beyond the WP. Pressing the SAC key
allows you to examine registers in descending order. You cannot back up beyond RD.
If you want to examine registers nonsequentially after you have pressed ADV or BAC, you must first press
the REG key to reinitialize register mode. Otherwise, you will alter the contents of the register you are
currently examining.

3-3

Examining Registers - Example 2
You want to examine more registers. You begin by examining them sequentially. It is assumed that the
registers still contain their initial (power-up) values.

KEY

UPPER
DISPLAY

LOWER
DISPLAY

COMMENTS

1111111

Get mto register mode.

111+111 1+1+1+1
/01+101+1

H+I+H
H+H+I
101+101+1
111+111 H+H+I
111+111 1+1+1+1

You wanced to examine
R4 but you altered RO
instead.

Clear the incorrect entry.

1111111

This is how to examine A4

1+1+1+1

Now you're sequentially
examining again.

3.4 ALTERING REGISTERS
To alter the contents of a DCTII-AA internal register, you must first examine the register as described in
Paragraph 3.3. To review, this means you must place the DCTlI-EM in register mode by pre~sing the
REG key and examine the desired register by pressing one of the keys 0 through 9. Once you have done
this, press the EXA key and alter the contents of the selected register by pressing keys 0 through 7 in the
desired order.

3-4

The previous contents of the register will be cleared and you will see the new contents being shifted in from
the right side of the lower row of LEOs as you press keys.
If you wish ta clear the contents af a register, press the CLR key after yau have pressed the EXA key.
Pressing the CLR key also clears a register while you are entering data.
Altering Registers - Example 1
You want ta set register R3 to 000232 and the SP to 6000. It is assumed that the registers still contain
their initial (pawer-up) values.
UPPER
KEY

IREGI

[2]

B
[J
[2]

0
leLRI
IREG]

0
B

0
G

LOWER
DISPLAY

DISPLAY

COMMENTS

[ l'I'[ai I I I I I I I I
I II' HI I [01+101+1
I 11'101 I I 1+[01+[01
I iI'H I I H+H+I
I I I' HI I 11+101+1
I II' HII 1+1+1+1
1II' HII [01+/01+1
I I 1,1+1 I I I Ii I II
I I 1+1 I I l+i+I+1
I I 1+1
1+1+1+1
I 1+1 I 1 [01+/01+1
I [ lsi pi I I /01+/01+1
I

Get into register mode

EKamine R3

Enlel 232

0

I I

I

3-5

You change your mind.

and clear R3 instead

Get back into register
mode to change another
register.

Examme R6 !the SP). It

currently" 7400.

Set SP = 6000.

111+111 1+[0[+101
IIl lplli 1+1+1+1
s

The ADV and BAC keys allow you to alter register contents sequentially. Pressing the ADV key allows
you to alter registers in ascending order. You cannot advance beyond the WP. Pressing the BAC key
allows you to alter registers in descending order. You cannot back up beyond RO.
Press the ADV or BAC keys until you arrive at the register you want to alter, then press the desired
sequence of keys 0 through 7 to enter the data. If you want to clear the register, press CLR. If you want to
alter registers nonsequentially after you have pressed the ADV or BAC keys, you must first press the REG
key to reinitialize register mode. Then press 0 through 9 to select the desired register. followed by EXA,
followed by the data you wish to enter.
It is generally easier to stay in seq uential mode and step forward or backward to the desired register than
to perform nonsequential alterations.

Altering Registers - Example 2
You have just completed example

KEY

ISAcl

8
0
IBAC!
IBAC!

0

UPPER
DISPLAY

and now want to sequentially change some registers.
LOWEA
DISPLAY

COMMENTS

I I 1'1 51I I 1+101+101
1I I,lsi II 1+1+1+1
I I I' 151 I I 1+1+1+1
1I I' I_I

II 1+101+101
I II' HII H+H+I
1 II' HI I H+JoI+1

IADvl

I I I' I_I I I 101+101+1

ISACI

1 II' HI I

H+H+I
3-6

R5

IS

now alterable.

Enter 43.

R4 is now alterable.

R3 is now alterable,

Enter 1.

R4 is now alterable. But
now you want to clear R3
and alter RO.

IClRI
ISACI
ISACI
ISACI

8

1I 1+1 I I 101+101+1
1II' H 1I 1+1+1+1
I I I' I, I I 1 101+101+1
11 1'101 1 I 101+101+1
I II' HI I 1+1 1+1,1
0

RO is now alterable.

Enter 1.

3.5 EXAMINING MEMORY LOCATIONS
To examine a memory location, you must first place the OCT II·EM in address mode. Do this by pressing
the ADR key. The first time you do this, the LEOs display:

11+1+11
1+1+1+1
Subsequently, when you press the ADR key, the upper row of LEOs displays:

and the lower row of LEOs displays the most recently examined address.
Enter the address of the memory location you wish to examine by pressing the appropriate sequence of
keys 0 through 7 .
The previous address will be cleared and you will see the address you are entering being shifted in from the
right side of the lower row of LEDs as you press keys.
If you make a mistake entering your address, you can press the CLR key to clear your entry and try again.
Once you are satisfied with the address you have entered, press the EXA key. The address of the location
you are examining (the address you just entered) appears on the upper row of LEOs, and the contents of
this location appear on the lower row of LEOs. Only even addresses can be examined. If you enter an odd
address, it is rounded down when you press the EXA key.

3·7

Examining Memory Locations - Example I
You have just powered up your DCTII-EM and want to examine some memory locations. There is a
program that resides in the OCT 1 I-EM called the monitor which begins at address 140000. You will learn
more about the monitor later, but for now, all we want to do is examine some of its locations.
UPPER

KEY

LOWER
DISPLAY

DISPLAY

COMMENTS

IADRI

I 1+1"1,1 I 1+101+101

8

1Hdldl'l I

8

1

~

1 Hdid 1'1

~

1 I+i+( 1 1+1+\+1

~

1 Hd Id 1,1 I

G

1Hdldl'l I 1+101+101

B

1 Hd idl' I I 1+1+:+1

H+H+I

Get Into address mode

Enler 140000.

Hdldl'l I 1+1+[,[-1

I 1+1+1+1

I+H+/ol

The ADV and BAC keys allow you to examine memory locations sequentially. Pressing the ADV key
allows you to examine memory locations in ascending order. Advancing beyond address 177776 results in
examining locations starting at 000000. Pressing the BAC key allows you to alter registers in descending
order. Backing up beyond 000000 results in examining locations starting at 177776.

If you want to examine memory locations nonsequentially after you have pressed ADV or BAC, you must
first press the ADR key to reinitialize address mode. Otherwise, you will change the contents of the
memory location you are currently examining.
Examining Memory Locations - Example 2
You have just finished example I and now want to examine more locations in the monitor. You start by
examining them sequentially.

3-8

KEY

IADVI
IADVI
1ADVI
IBACI

IADRI

8

8

G
8
G

8
IEXAI

tSAcl

UPPER
DISPLAY

LOWER
DISPLAY

COMMENTS

1+1+1+1 1+1+1+1
I,I+H+I 1+1+1+1
1+1+1+1 1,I+i+1 1
1,1+1+1-1 1+\01,1+1
11+1+1 1 1+101+1-1
1H+I'I I 1+1+1+1
1H_I_ I' 11 1+1+1,1-1
1H- I_ I' 11 H+I+H
1H_I· I' 11 1+1,1-1+1
1H·I·I 'I 1 I+H+H
I H· I_ 1,1 I 1+1 1,1+1
1+1+1+1 1+1+1+1
1+1+1+1 1,1+1+1-1
2

Relnltialize address
mode lot flof1sequcnllal
examine

You try to eX[

Back to address mode to
alief another !ocatic.n
Note - most recent address
examined is dIsplayed.

Enter 2000.

[

[

1+[+1+1
2000 is currently
empty.

Enter 1.

The ADV and BAC keys allow you to alter memory locations sequentially. Pressing the ADV key allows
you to alter memory locations in ascending order. Pressing the BAC key allows you to alter memory
locations in descending order.
Press the ADV or BAC keys until you arrive at the memory location you want to alter and press the
desired sequence of keys 0 through 7 to enter the data. If you want to clear the memory location, press
CLR.

Altering Memory Locations - Example 2
You have just completed example I and now want to sequentially alter memory locations.
UPPER
KEY

IADVI

0
[]
IADVI

DISPLAY

LOWER
DISPLAY

!oI+[O[+1 I+H+H
101+[0[+1 101+[0[+[
101+[0[+1 101+[0[+1
\01+[01+1 1+[+[+1
3-1 1

COMMENTS
Location 2002 is now

alterable.

Enter 47.

location 2004 is now
alterable

0
IADVI

GJ

0
lBACI

leLRI

101+101+1
101+101+1
H+H+I
101+101+1
101+101+1
101+101+1

1+1+1+1
101+101+1
101+101+1
1+1+1+1
101+101+1
101+101+1

Enter 5.

Location 2006 is now
alterable.

Enter 22

Location 2004 is now

alterable

Clear II

3.7 ENTERING AND EXECUTING A SIMPLE PROGRAM
In this paragraph, we will tie together the material presented thus far by entering and running a simple
program. It is assumed you are familiar with an assembly language instruction set. A full description of the
instruction set used in the following example is found in Chapter 6 of the DCTI/-AA User's Guide (EKDCTll·UG).
The following program takes a number in register R 1, adds it to a number in register R2, and puts the
result in register R3.
Octal Code

Instruction

Comments

010103
060203
000000

MOV RI,R3
ADD R2,R3
HALT

Get first term.
Add second term.
Halt program execution.

We will place this program in user RAM, starting at address 2000.

KEY

IADAJ

~

G

G

UPPER

LOWER

DISPLAY

DISPLAY

COMMENTS

I H+lrl 1
1H+I'I 1 I+H+H
I H"i-I'I I I+H+H
Hdldlrl 1+1+1+1
Most recently exam·
ined address shown

on lower LEOs.

1

1

3·12

bamme 2000.

0
B

1H+I'I 1 1+1+1+1
1+1+1+1
Current contents of

locatlun 2000 are

shown on lower LEDs.

~

H+H+I I+H+I,I
H+H+I I+H+H
1+/>1+:°1 H+I,:+I
1+1 1°[°1 1 1° i°I' 11' i°1

0

101+1+[01 H,loh+1

IADvl

H+H+I

[J

0
[]

0
~

[J
~

0
IADvl
leLRI

2

0

Enter first instruction

You don"t lleNJ 10 enter
leadulg zeroes

0

Current contents of

2002 are shown on
lower LEDs

1+1+1+1 H+H+I
101+101+1 I+H+H
H+H+I 1+1+1+1
1+1+1+1 I+H+H
1°1+/01+1 1+1+1+1
1+1+1+1
1+1+1+1 1+/01+101
Current contents of
2004 are shown on
lower LEOs.

3-13

Ex.am'fle next address

Enter second Instruction.

E~amlne

next address.

Enler third instruction.

HALT IS entered by
clearmg the locatIon.

Now place some numbers in R I and R2 that the program can work with. Also make sure R3 is cleared.

11I, I' I ! 1
1 1 I' I' I I 1

Current contents of
R 1 shown on lower

LEDs

Current contents. of
R 1 remain on lower

LEDs.

I I I, I'I I I
I I I'

121

I1

Current contents of
R2 shown or\ lov;er

LEOs.

~r~:~:,~o~:e~o':;:

IADYI

1 I I, 131 1 1

B

I I I, 11i 1 H H I

++

3

e,,,, R3

Now go back and check what you have just entered.

o

I I+Id1,I I
11+/+11
IH+I'II
I H+I'II
IH+I'II

8

1+1+1+1 11+1+1 1

B

o
~

~

I+I+I+1
1+1+1+1
1+1+1+1
H+I+H
1+1+1+1
0

3

3-14

Ge"n,o add,." mode
'"m;", 2000

!ADV!
IADvl
IREGi

0
[]

0

1+1+1+1 1+1+1+1
101+101+1 I+H+H
I I 1,1+1 1 I I II ! 1I
II I' I' 11I 1+1+1+1
I I I' 121 I 1 1+1+1+1

I 1I' 111I 1+/01+101
3

Examine 2002.

Examme 2004.

Get mto register mode.

Examme registers

Everything O.K

Now run the program. Set the PC to the starting address of the program (2000) and press the GO key to
begin program execution. Since you are currently in register mode, press the AOV key until you get to the
PC.
Current contents of
PC shown on lower

o

111+111
111+111 101+101+1

G

111+111 101+1+101

G

111+111 1+1+10/01

G

111+111 1+1+1+1

E]

1 I IpHI I

LEOs.

,,,,,2000

Hoj> H+I ",,",

'he

pcog"m

The program is now halted. The current PC (2006) is displayed On the lower row of LEOs.

3-15

Check R3 to find out if the program executed properly. Since you are in register mode, press the BAC key
until you get to R3:

and the result is correct.
3,8 WORKING WITH A LONGER PROGRAM
Consider a program that calculates the sum of all the numbers from 0 to n, where you specify n. That is,
the program determines:
n

x=o

You place the value of n in RO, and the program deposits the sum it calculates in memory location 2044.
Use the keypad to enter the following summation program starting at location 2000.

Octal
Location

Code

Instruction

Comments

2000
2002
2004
2006
2010
2012
2014
2016
2020
2022
2024
2026
2030
2032
2034
2036
2040
2042
2044

005001
020001
003413
005037
002044
010037
002044
005300
060037
002044
102404
020001
003372
000000
005000
005037
002044
000000
xxxxxx

CLR RI
CMP RO,RI
BLE 2034
C LR «> # 2044

Set R I = O.
RO contains n.
Illegal input (n oS 0)'>
No, start operation by clearing 2044.

MOV RO,(iJ #2044

Place first value of n in 2044.

DEC RO
ADD RO,(a,#2044

n ~ n-I
Add next value (n--I) to 2044.

BVS 2036
CMP RO,RI
BGT 2016
HALT
CLR RO
Cl.R «>#2044

Overflow'>
No overflow.
Continue operation if n > O.
Operation complete if n = O.
Illegal input. Clear RO, 2044.
Overflow. Clear 2044.

HALT

Illegal input or overflow occurred.
1nitial contents of 2044 irrelevant.

3-16

To test the operation of the program, deposit a value of 10 (octal) into RO. The program should sum 10+
7 + 6 + 5 + 4 + 3 + 2 + I (octal) in memory location 2044 to produce 44 (octal). )';ote that this is
equivalent to having a value of 8 (decimal) in RO and letting the program sum 8 + 7 + 6 + 5 + 4 + 3 + 2 +
I (decimal) to produce 36 (decimal).

Set RO

=

JO

SP = 7400

PC

=

2000

Press the GO key.
The result should be:

111+111
1+1+1+1
The program halted at location 2032. Now examine location 2044.
The result should be:

101+101+1

1+\01+1-1
3.8.1 Using the Single-Step Function
The single-step function is a powerful program analysis tool. It allows you to execute your program one
mstruction at a time. At the end of each instruction. you may examine various registers and memory
locations to determine how the program has affected them.
To perform the single-step function, press the SST key.
Result: the instruction currently pointed to by the PC is executed.
Let us now single step through the preceding summation program. First set up your initial conditions:
Set RO

=

SP

=

PC

=

10
7400
2000

3-17

Then key in the following.

KEY

155TI

ISSTI
ISSTI

ISSTI
ISST!

UPPER

LOWER

OISPLAY

DISPlAY

I I I+i
111+1
1i 1+1
111+1

1I 1+1+1+1
1I

H+H+I

11 101+101+1
i I 1+1+1+1

I I 1+1 1I H+H+I
I H+I'I 1
I Hdi+1 I l+i+I+1
I H+I'I 1 H+H+I

COMMENTS

2000 execllted

2002 executed.

2004 executed

2006 executed.

2012 executed.

Most recently exam·

iADAi

0
G

0
8
!EXA!

ISSTI
IREGI

GJ

ined address shown

on lower lE Os.

I H+I'I 1 1+1+1+1
I Hdl+1 I H+I+H
1+1+1+1 1+101+101
111+1 I 1 1+1+1+1
I 11'1-101 I 111I I I I
I 1I' H11 101+1+[71
3-18

Has RO been moved to 2044 J

Yes.

2016 executed.

Old RO get decremented?

Yes.

111+111
11+1+11
101+[0]+1
111+111
111+111
111+111
1+111

2020 executed.

1+1+1+1

Has RD been added to 2044)

Yes

1+1+1+1
I+!+I+I
1+1+1+1
1+1+1+1
I I 1I I 11

111+i II

2024 executed

2026 executed

Program branched correctly

2016 executed

Oid RO get decremented?

2020 executed

Did RO get added to 2044'

101+101+1 /0/+101+1
You can continue executing the program one instruction at a time by repetitively pressing the SST key.
3..8.2 Using Breakpoints
Tbe use of breakpoints is another means of analyzing and debugging your programs. Breakpoints cause
'0tlr program to halt whenever they arc encountered. When the program is halted, you can then examine
"~nous registers and memory locations to determine how the program has affected them.
I' there were no debugging aids, you would have to insert breakpoint (BPT) instructions in your program
.!-cd write a breakpoint trap handling routine if you desired breakpoints. The DeTlt-EM, however, does
"JHain debugging aids and provides a convenient means of inserting up to four breakpoints via the
t:. ",d. Do not attempt to set breakpoints by inserting BPT instructions in your program. If you do this,
_ '.' ill get an error message when you try to execute the program (see Appendix C).

3-t9

To insert breakpoints, press the BPT key.
The upper row of LEOs displays:

and the lower row of LEOs displays the current address of breakpoint 1. If breakpoint I is not currently
set, the lower row of LEOs displays:

1+101+/01
You can then press the appropriate sequence of keys 0 through 7 to enter the address of breakpoint 1.
You can set up to four breakpoints in this way. Use the ADV and BAC keys to examine breakpoints 1
through 4 and press the appropriate sequence of keys 0 through 7 to enter an address for each breakpoint.
If you press BAC while you are examining breakpoint 1, you are examining something called the
watch point address. The use of the watch point is explained in Paragraph 3.8.3.
Breakpoints are recognized only if you use the GO key or the "Go With LEOs" special function
(Paragraph 3.12.2) to execute your program from the keypad. Breakpoints are disabled when you single
step through a program.
When you execute a program with breakpoints in it (by pressing the GO key, for example), your program
halts at the address of your first breakpoint without executing the instruction at that address. The
instruction at the breakpoint address is executed when you reSUme program execution (e.g., by pressing the
GO or SST keys).
Using Breakpoints - Example
We want to set two breakpoints in the summation program shown in Paragraph 3.g. Set the first
breakpoint at address 2020 to make sure RO has been decremented properly. Then set the second
breakpoint at address 2024 to check the results of the cumulative addition.
UPPER
KEY

\SPTj

[]

G

0

DISPLAY

LOWER
DISPLAY

Ibi'lpH'I'1
1+1+I,i,1
1bl 'I +1 ,i,l
Ibi'I"I+I'1

1°1°1+:+1
1+I+i+1
1+I+i+1
1+1+1+1
3-20

COMMENTS
Assume no breakpomts

have been previously set

Enter 2020

G
IADVI

0
0

0

GJ

1":'1-1+1,1 101+101+1
1_1'1+1+1 1+101+101
1-1,1+1,1 1 H+H+I
2

JREG/

G

B

Enter

2024

1+1+1+1 H+H+I
1-1,1-1+1 1 1+1+1+1
l+i+I+1 1+1+1+1
2

Set your initial conditions as before (RO

EJ

Set breakpoint 2.

111+1 I 1
11i'i+11
111'101 11
111+1 II

=

10, SP

=

7400, PC

1+1+1+1
11i ~ I II

H+H+I
H+H+I

=

2000) and execute the program.

FirSt breakpoint
encountered.

Old RO get decremented>

Yes

Resume execu\!on

Examine address 2044 to see if the first addition was performed correctly.
Most rCCef'ltJy eXilJn-

G

11+1+11
1H+1,11 1+1+1+1

G
GJ

1H+I'II 1+1+1+1
1H+I,II 1+1+1+1

ined address sllown
on lower LEOs

3-2 J

h,mme2044.

G
!EXAI

B

1l+i"I'1 1 I+H+H

/01+1+1-1 1+1+1,1 1
I 11+: 1I 1+>iOI+1
7

11 1,1+1

~

11i' H1 I l+i+i+1

IGOI

I I 1+: i I /01+1+1-1

1 : 1I 11

correctly

Resume e)(eClitlOn

I

IREGI

1

Adfhtion perlormed

Resu"le execu1'on

3.8.3 Using the Watchpoinl
In Paragraph 3.3 we identified the watchpoint (WP) and showed how it could be examined. In this section,
you will learn how to use the WP for program analysis and debugging.
The watch point is a convenient means of monitoring and altering a memory location. Once you set the
watch point address to the address of a memory location, you can examine and alter that location just as
you would a register. To set a watch point address, press the BPT key, then the BAC key.
The upper row of LEOs displays:

and the lower row of LEOs displays the current WP address.
If the WP is not set, the lower row of LEOs displays:

1+1+1+1
You may now enter the new WP address by pressing the desired sequence of keys 0 through 7. You can
clear the WP by setting its address to zero.

3-22

Using the Watchpoint - Example I
In our summation program in Paragraph 3.8, we used location 2044 to deposit our accumulated result.
Since we would like to examine (and possibly alter) this location frequently, we set our watchpoint address
at 2044.
UPPER

KEY

IBPTI

ISACI

[J

DISPLAY

LOWER
DISPLAY

1+lpl+!,1 H+/o!+1
I+I,H+I H+H+I
Ipl+I+I,1 1°:+1°1+1

0

1+1+1_1'1

8

H+H-I'I H+I+H
H+I+i,1 10i+h+1

0

COMMENTS

Currem value of BPI
displayed 011
lower LEOS.

Enter watchpoint address
of 2044.

101+1+101

",ow We can examine and alter the contents of location 2044 just as we would a register. If you run the
summation program in Paragraph 3.8 and want to inspect the result, do the following.

1111111

1+1+1+1
1+1+1+1
1+1+1+1 1+1+1+1
Current conlents of
2044 shown on
lower LE Ds.

Gl"t mto register mode

Examine WP.

Current contents of
2004 shown on
lower LEOs.

Clear It

You have just cleared the contents of location 2044.
The watchpoint can be used in conjunction with the single-step function to continuously monitor the
.,mtents of a memory location. When this is done, the contents of the watch point appear on the upper row
"f LEDs, and the current PC appears on the lower row of LEDs.

3-23

Using the Watchpoint - Example 2
You are still working with the summation program in Paragraph 3.8. You have established a watch point at
location 2044, as shown in the previous example, and want to continuously monitor the contents of this
loca tion as you single step through the program.
Set your initial conditions as before (RO = 10, SP

KEY

ISSTI

ISSTI

UPPER

LOWER

DISPLAY

DISPLAY

7400, PC = 2000) and key in the following.

=

COMMENTS

I+H+H

101+101+1
101+101+1 H+H+I

2000 executed:
2044 contents shown Oil

upper LEOs.

2002 executed.

!sSTI

I+H+H 101+101+1

2004 executed

ISSTI

1°I°I°1°! °I01 H+H+I

2006 eJ(ecu!cd

ISSTI

101+:+101 H+H+I

ISSTI

1+101+101 1+1+1+1
1+1+['i ' l 1°1°1 1°1 11

\SST[

2

2

4

2012 executed.
2044 has changed.

2016 executed

2020 execllted
2044 has changed,

And so on. When you finish executing the program (e.g., after you have executed instruction 2032 in the
example above), the upper row of LEOs displays:

111+111
and the lower row of LEDs displays the current Pc.

3.9 USING THE HALT SWITCH
Pressing the HALT switch causes you to unconditionally halt the operation of your program and return
control to the OCTIl-EM keypad. When you press the HALT switch, the upper row of LEDs displays:

111+111
and the lower row of LEOs displays the current Pc.

3-24

You can use the HALT switch, for example, to escape from an infinite loop your program is executing or
to inhibit hardware problems which are interrupting the proper operation of the DCTII-EM.
After pressing HALT, you are in register mode and can readily examine the contents of the DCTII-EM
registers as described in Paragraph 3.3.
3.10 THE INT SWITCH
Pressing the INT switch causes you to generate a power-fail (PF) nonmaskable interrupt. Pressing this
switch will have no effect on the operation of the DCTII-EM unless you specifically write a program that
recognizes input from it. The program in the following example shows you how to use this switch to
experiment with interrupts. Also refer to Chapter 6 for more information on interrupts.
Using the INT Switch - Example
This program simply loops on itself at location 1510 until you press the [NT switch. Then the current PC
and PS are pushed onto the hardware stack and the DCTII-EM goes to locations 24 and 26 for its new PC
and PS, respectively. Location 24 is called the power-fail vector and usually points to a power-fail service
routine. The first line of your program, however, changes location 24 to point to your own "power-fail
service routine." This routine, which you specify to start at location 1514, is not a power-fail service
routine at all, but a routine that sets RO to the number of times (in octal) that the interrupt switch has been
pressed.
Enter the following.

Location

Octal
Code

1500
1502

012737
001514

1504
1506
1510
1512
1514
1516

000024
005000
000777
000000
005200
000002

Instruction

Comments

MOY #1514.0,#24
Set power-fail vector to "service

routine. "
Initialize RO.
Await interrupt.

CLR RO
BR 1510
HALT
INC RO
RTI

Start of "service routine."
Restore old PC and PS.

Start the program at 1500 and press the [NT switch a number of times. The upper and lower row of LEDs
..ill be blank while you are pressing the INT switch. Each time you press INT, you execute the "service
routine'" which increments RO. When the routine is done, it returns to 1510 to await another [NT switch
press. Press the HALT switch to suspend operation and examine RO.
3.11 THE USER LED
The user LED is a general-purpose indicator lamp that your program can use to indicate the status of some
condition. You can turn on the user LED by writing 00001 1 to port C of the 8255A parallel port chip (see
Paragraph 6.5.1). Port C of the 8255A chip has an address of 177444. Writing 000010 to port C of the
8255A chip turns off the user LED once it has been turned on by your program.

3-25

User LED - Example
The following is a short program that turns the user LED on and off. Use the keypad to enter this program
starting at location 1000.

Location

Octal
Code

1000
1002
1004
1006
1010
1012
1014
1016
1020
1022
1024
1026
1030
1032

012737
000011
177444
012700
100000
077001
012737
000010
177444
012700
100000
077001
000137
001000

Instruction

Comments

MOY #ll,gram (see Paragraph 5.3.l.1). Another way is to execute your program by activating function I rather
:un by pressing the GO key. Activating function I turns on the LEOs and starts your program.

3-27

3.12.3 Function 2 - Start Console
If you connect a console terminal to your DCTII-EM, you will use function 2 frequently. Activating
function 2 starts a program called the console monitor. The console monitor resides in the on-board
PROMs and allows you to enter, execute, and debug programs through the use of a console terminal rather
than the keypad. The console monitor also allows you to perform other operations and is described in more
detail in Chapter 4.
Before activating function 2, connect a console terminal to the DCTII-EM and select an appropriate baud
rate by activating function 3 (see Paragraph 3.12.4).
When function 2 is activated, the upper and lower LEOs are blank and the message:
TEM CONSOLE MONITOR VI.O
TEM>
appears on the console terminal.
3.12.4 Function 3 - Set Baud Rates
The DCTII-EM has two serial ports: a console terminal port and an auxiliary serial port. Activating
function 3 allows you to select baud rates for these ports. When the DCTII-EM is powered up, it
automatically sets both baud rates to 9600.
When you first activate function 3, the upper row of LEOs displays:

and the lower row of LEOs displays:

II+H+I
This tells us that the console terminal port is currently set at 9600 baud. Note that the baud rate is
displayed as a decimal number.
Pressing the ADV and BAC keys steps you backward and forward among the various baud rate values
available for the console terminal port. The available baud rates for the console terminal port are: 300,
600, 1200, 2400, 4800, 9600, and 19200.
You can now set the baud rate of the auxiliary serial port by pressing the EXA key. The first time you do
this, the upper row of LEOs displays:

and the lower row of LEOs displays:

II+H+I
3-28

This tells US that the auxiliary serial port is currently set at 9600 baud. Repetitively pressing any of the
keys CLR, 0 through 9, ADV, or BAC causes you to alternate between two available baud rates. The two
ayailable baud rates for the auxiliary serial port are: the current baud ratc of the console terminal port and
one-fourth the current baud rate of the console terminal port. Pressing EXA again puts you into register
mode.
Fmction 3 - Example
You want to use function 3 to experiment with setting baud rates for the console terminal serial port and
the auxiliary serial port. You have not altered these baud rates since powering up.

KEY

UPPER
DISPLAY

LOWER
DISPLAY

COMMENTS

11+1+11 I I 1I 1[ I

Get into function mode.

I I,lui ""! I

Select function 3

Baud rate for console
terminal pOri

=

9600

11+1+\01
11+1+101
Il o l21'l o !ol

I+H+I,I II+H+I
II+H+I
II+I+H
I joj'I+H
H Ipl+ltl I H+I+I

Band rate for auxiliary
port

= terminal port.

300 = one fourth of 1200

Back to 1200

Back to 300

Now In register mode

111+111

Current PC sl10wn on
lower LEOs.

3-29

Console port = 1200
AUXiliary port

=

300.

3.12.5 Function 4 - Release Protection
There is an area of RAM that the DeTlI-EM normally prevents you from directly altering from the
keypad. This area is called the keypad monitor scratch pad and occupies the memory space from addresses
7400 to 7777. Refer to Paragraphs 5.2 and 5.4.1 for more information about the keypad monitor and this
protected area.
Additionally, if you have a console terminal connected to your OCT I I -EM, there are two other areas of
RAM that are protected. These areas are the console monitor scratch pad and the symbol table. They
occupy the memory space from addresses 6500 to 7377. Again, more information is provided in Chapter
5. Activating function 4 releases the protection associated with these memory spaces. Note that "protection" refers to protection from direct alteration via the keypad or console terminal. Programs that you
write can and will alter these locations. Therefore, when you write your programs make sure these spaces
are not inadvertantly violated.
Protection is restored when you press the HALT switch, when a HALT instruction is encountered, or
whenever you restart the OCTI I-EM.
When you activate function 4, the upper row of LEOs displays:

111+111
and the lower row of LEOs displays the current value of the Pc.

Function 4 - Example
You want to alter location 7400, a normally protected location.

jFNCI

[J
EXA

f

LOWER

UPPER
DISPLAY

KEY

!

COMMENTS

DISPLAY

1 11 1 i 1 1
I ~ : H1 I
1 1,1"1+1

11+1+1

Get mto function mode.

1

Select function 4.

1

I i !+I

i

1

Current PC shown 011
lower LEOs'

Protection off.

Alter the location.

11+1+11

Most recently exalll'
ined (lddress shown
on lower LEOs.

I H+i,11

Alter 7400

1+1+1+1
3-30

G
~

I H+I'! I H+ITH
1 1+1 1+1°1
I

:+!+I

7

!exAI

H+I+H I+H+iOI

0

I+I+!+I 1+l l+i 1
o

2

Enter 2

Restore protection by pressing the HALT switch.

0
'OW

111+1 11

Current PC shown on
lowt
and the console monitor is ready to accept your input.
The following default conditions are set when the console monitor is started:
I.
2.

The stack pointer is set to 6500
The PASS2, NOHOST. INSTRU, SYMBOL, and VTOFF operating modes are set.

More information about the stack pointer is given in Paragraph 5.2.1. The operating modes are described
in detail elsewhere in this chapter and are summarized in Paragraph 4.18,

4.2

TRANSFERRING CONTROl. BETWEEN THE CONSOLE TERMINAL AND THE KEYPAD

Either the console or the keypad can control the DCTII-EM. but not both at the same time,
From the keypad. your primary means of transferring control to the console is by activating function 2
(see Paragraph 3.12.3). You can regain keypad control by pressing the HALT switch. When you press the
HALT switch. DCTII-EM operation is stopped and the LEDs display the current Pc.
From the console. you can transfer control back to the keypad by typing in the EXIT command or by
executing a HALT instruction.

4.3

GENERAL RULES FOR CONSOLE INPUT

Information you input via the console terminal is typically in the form of commands. instructions. or data,
In general. your input should conform with the following guidelines.
I.

Your input line must not exceed 96 characters in length, If you exceed this limit. the console
terminal does not accept further input until you type in a CTRLjC or CTRLjY. Then. you
must reinput the line.

2.

Any number of commands and instructions can be strung together on a line as long as the line
docs not exceed 96 characters.

3.

Commands or instructions strung together on a line should be separated with a space or a
comma. Extra separation characters (space, tab. line feed. form feed) between commands or
instructions on a line are ignored.

4.

If a command or an instruction in a one-line string causes an error. the commands or instructions following it are ignored.

5.

Extra separation characters (space, tab, line feed, form feed) inserted between parts of a
command or instruction are ignored.

6.

Information preceded by a semicolon on a line is interpreted as a comment and is ignored by the
DCT11-EM.

4-2

7.

Pressing the DELETE key deletes characters on a line. As characters are deleted, they are
echoed (preceded by a slash character) on the console terminal if you are in VTOFF mode. The
console monitor defaults to VTOFF mode when it is started or restarted. Type in the VTON
command if you are using a video terminal as a console device. VTON mode eliminates the
echoing of deleted characters. Typing in VTOFF returns you to VTOFF mode from VTON
mode.

8.

A line is terminated by pressing the RETURN key. Characters on a line are ignored until you
press RETURN. In all the examples in this chapter, a RETURN is used to end your input line
unless otherwise noted.

A summary of the various forms of acceptable console input is given in Paragraph 4.18. Information about
specific commands and instruction formats is given elsewhere in this chapter.
4.4 CONSOLE CONTROL COMMANDS
The DCTlI-EM recognizes several control commands that allow you to easily perform a variety of
operations from the console terminal. These commands and their typical uses are listed in Table 4-1.
Table 4-1

Meaning

Control Command Summar),

Typical Use

CTRL/U
CTRL/X

Delete line.

You made several typing errors in your input line. You want 10 cancel

CTRL/R

Display linc.

You used the DELETE key several times while typing your input line.
You want to see a clean version of the line you are editing.

CTRI./S

Suspend execution.

You want to suspend the operation of the console monitor or the
execution of a currently running program.

CTRL/Q

Resume execution.

You have previously used the CTRL/S command and want to resume
operation.

CTRL/C
CTRL/Y

Abort operation.

You wanl to abort the current operation of the DCTII-EM and input
a new line.

CTRL/O

Ignore host message.

You are in HOST mode (see Paragraph 4.17.1) and want to ignore
information currently being sent by your host computer.

CTRL/A

Select option.

You arc in TALK or LOA D modes (see Paragraphs 4.17.3 and 4.17.4)
and want to select one of these four options: exit, resume. send break,
send CTR 1./ A.

the line and try again.

4.5 EXPRESSIONS
Several commands and instructions accept expressions as parameters. This paragraph familiarizes yeu with
expressions and provides the rules for their definition.

If you wish to ignore the use of expressions for the moment, you can advance to the paragraph that
describes the command or function you are interested in. You can return to this paragraph when you need
more detail on how to define an expression for a particular command or instruction.

4-3

An expression is simply a user-definable combination of one or more components called terms that
represents a 16-bit number. There are three types of terms allowable in a DCTlI-EM expression:
•
•
•

Numeric
Literal
Symbolic

Numeric terms are either octal or decimal numbers. Octal numbers can be any sequence of the digits 0
through 7. Decimal numbers can be any sequence of the digits 0 through 9 followed by a decimal point (.).
Do not attempt to define decimal fractions.
Examples of Numeric Terms
100702

377
39874.
A literal term is an ASCII character you use as data. Precede an ASCII character with an apostrophe (') to
form a literal term.
Examples of Literal Terms

'.

'E

'4

Symbolic terms are values symbolized by names wbich are defined according to the rules in Paragraph

4.13.
Examples of Symbolic Terms
RI
P$PORC
SUM
Terms are joined together in an expression by binary operators. (The word binary in this case means that
at least two terms are involved.) The DCTlI-EM allows six types of binary operators:

+ (addition)
- (subtraction)
• (multiplication)
/ (division)
& (logical AND)
! (logical OR)
The unary (one term) operators, + (plus sign) and - (minus sign), can only be used at the beginning of an
expression (or parenthesized term). Multiple unary operators are not valid.
Expressions are evaluated from left to right with no operator hierarchy rules. Two types of brackets can be
used to nest ex pressions up to seven levels deep. Use angle brackets « » as you would arithmetic
parentheses and use square brackets (D) if you want the DCTII-EM to substitute the enclosed information
with the contents of the memory word it addresses, Note that if the information in square brackets
represents an odd address, it is first rounded down.

4-4

A quick way to evaluate the octal value of an expression is to type in the expression followed by a question
mark. This command has the form:
expression?
Expressions - Examples
The following are examples of valid OCT II-EM expressions. You can verify the octal values of these
expressions by using the question mark command.
Expression

Octal Value

65209
7077+ 189.+'E
-2*<300/25>+ 70
120.*<-8.>
177777&25+3

177271
007501
000046
176100
000030

4.6 EXAMINING REGISTERS
There are two ways to examine registers. One way is to type in the appropriate register symbol followed by
a question mark. This command has the general format:
register symbol?
where the register symbol (RO, RI, etc.) is as defined in Paragraph 4.13.1.
Another way to examine registers is to type in the SHOWRE command. The SHOWRE command
displays the values of all the registers and the PS in ascending order. If a watch point has been set, it is also
displayed. Paragraph 4.14.1, which describes program debugging, gives you an illustration of the
SHOWRE command.
4.7 ALTERING REGISTERS
Registers are altered by using an equal sign to set the register to the desired value. The general format for
this is:
register symbol=expression
where the register symbol (RO, Rl, etc.) is as defined in Paragraph 4.13.1 and the register is set to the
value of the expression. (See Paragraph 4.5 for expression formats and conventions.)
Altering Registers - Example
Alter and examine the values of RO and the SP.
TEM> RO=65.
TEM> SP=6500
TEM> RO? SP?
000101
006500
TEM>
4.8 EXAMINING AND ALTERING MEMORY LOCATIONS-INTRODUCTORY CONCEPTS
There are several ways to examine and alter memory locations. Before discussing the specific techniques,
there are some introductory concepts you should be familiar with.

4-5

4.8.1

The Address Pointer

The address pointer specifies your current open location, i.e., the address of the location currently
available to you for alteration. It is important to keep track of the address pointer because it determines
where in memory you deposit information. As you will discover later, most commands which alter and
examine memory locations are closely linked to the value of the address pointer. This paragraph gives an
overview of how the address pointer can be affected.
Since the OCT II-EM recognizes a period (.) as the symbol for the address pointer, you can manipulate the
value of the address pointer just as you would any other symbol (see Paragraph 4.13.2). For example, to
set the value of the address pointer use an equal sign:
.=expression
where the value of the address pointer is determined by the expression (see Paragraph 4.5). To determine
the current value of the address pointer, use a question mark:
.)

Another way to set the address pointer is to use the backslash (\) character. The general format for a
backslash command is:
expression\
where the value of the address pointer is determined by the expression. This command also displays the
memory location specified by the expression (see Paragraph 4.9).
There are two other commands which affect the address pointer. These commands are the caret (")
command and the RETURN (or null line input) command. The effects of these commands depend upon
which output format mode the OCT II-EM is in (see Paragraph 4.8.2). A description of their effects is
given in Paragraphs 4.9 and 4.10.
When you type in a program, the OCT 1 I-EM automatically increments the address pointer for each
instruction or data object you input. Note that whenever you power up, the address pointer is initialized to
zero.
Do not confuse the address pointer with the PC (program counter). They are unrelated. As you type in a
program, the address pointer is incremented, but the PC is unaffected. And the execution of a program
will affect the PC but not necessarily the address pointer.

4.8.2 Output Formatting Modes
When you examine memory locations, the values the OCT I I-EM displays on the console depend upon
your current output formatting mode. There are five output formatting modes: INSTRU, WORD, BYTE,
SYMBOL, and ABSOLU.
The INSTRU (or instruction disassembly) mode causes memory locations to be displayed as disassembled
DCTII-AA instructions. INSTRU is one of the modes that the DCTI1-EM is initalized to when you
power up.

4-6

The WORD and BYTE modes cause memory locations to be displayed octally. Set the WORD mode (by
typing in the WaR D command) if you want the values of memory locations to be displayed as l6-bit
..-ords. Set the BYTE mode (by typing in the BYTE command) if you want the values of memory
locations to be displayed as individual bytes. If you are in WORD or BYTE mode. type in the INSTR U
command to return to instruction disassembly mode. Notice that the INSTRU, WORD. and BYTE
commands are mutually exclusive. To summarize:
Mode

Memory Locations Are Displayed As

INSTRU
BYTE
WORD

Disassembled DCTII-AA instructions
8-bit octal bytes
l6-bit octal words

Odd addresses (i.e., upper bytes) can only be examined in BYTE mode. If you try to examine an odd
address in INSTRU or WORD mode, an error message results.
The SYMBOL and ABSOLU modes determine how the symbols you have defined in your program are to
be displayed. You will usually use SYMBOL and ABSOLU in conjunction with instruction disassembly
(lNSTRU) mode.
If your program contains user-defined symbols (see Paragraph 4.13), these symbols will be displayed only
if you are in SYMBOL mode. SYMBOL is one of the modes the DCTII-EM is initialized to when you
power up.
If you want user-defined symbols to be displayed as octal values, type in the ABSOLU command to set the
ABSOLU mode. Typing in SYMBOL restores the SYMBOL mode. Note that SYMBOL and ABSOLU
are mutually exclusive. To summarize:
Mode

User-Defined Symbols Are Displayed As

SYMBOL
ABSOLU

Symbols
Octal values

4_9 EXAMINING MEMORY LOCATIONS
This paragraph summarizes the commands with which you can examine memory locations. The examples
in this paragraph are intended to give you a general idea of what to expect when you use these commands
in different output formatting modes.
One way to examine a memory location is to type in the desired memory location followed by a backs lash.
The general format for this command is:
expression\
where the memory location you examine is determined by the value of the expression (see Paragraph 4.5).
The backslash command also sets the address pointer, so a location examined with a backslash becomes
the current open location.

4-7

Examining Memory Locations - Example I
Use the backslash command to examine a memory location. Try this in different output formatting modes.
You have not altered any memory locations from their initial (power-up) values.
TEM> WORD
TEM> 2000\
002000: 000000
TEM> 100\
000100: 135676
TEM> BYTE
TEM> 100\
000100: 276
TEM> INSTRU
TEM> 140000\
140000: JMP 155334
140004:
TEM>

Examining Memory Locations - Example 2
You use the backslash command to try to examine location 100 I without first typing in the BYTE
command. This causes an error message to be generated.
TEM> INSTRU
TEM> 1001\
001001:

\\\

ODD ADDRESS
TEM>
Another way to examine memory locations is to simply press the RETURN key. When you press the
RETURN key as a command input, the result depends on both your output formatting mode and the
value of the address pointer. If you are in INSTRU mode, RETURN displays the next eight instructions
relative to the address pointer. In WORD mode, the contents of the next eight words relative to the
address pointer are displayed. In BYTE mode, the contents of the next eight bytes relative to the address
pointer are displayed. Note that the RETURN command is ignored when you are loading a program from
a host computer (see Paragraph 4.17).

4-8

Examining Memory Locations - Example 3
You want to examine memory locations by pressing the RETURN key. You have not altered these
locations since you have powered up. Start with location 1000.
TEM> INSTRU
TEM> 1000\
001000: HALT
001002:
TEM>
001000: HALT
001002: HALT
001004: HALT
001006: HALT
001010: HALT
001012: HALT
001014: HALT
001016: HALT
001020:
TEM> WORD
TEM>
001000: 000000
TEM>
001020: 000000
TEM> BYTE
TEM>
001020: 000
TEM>
001030: 000
TEM>

000000

000000

000000

000000

000000

000000

000000

000000

000000

000000

000000

000000

000000

000000

000

000

000

000

000

000

000

000

000

000

000

000

000

000

." one-line string of bytes or words is numbered from left to right.
'ote that consecutive RETURN keypresses increment the address pointer but nonconsecutive ones do
For example, in WORD mode you incremented the address pointer from 1000 to 1020 by pressing
RETURN twice in a row. In BYTE mode you incremented the address pointer from 1020 to 1030 by
pressing RETURN twice in a row. Pressing RETURN only once (as you did in INSTRU mode) had no
effect on the address pointer.
DOl.

" way to examine a range of memory locations is to use the underscore (_) character. The general format
for this command is:
expression l_expression2
.. here the beginning of the range is determined by the value of expression I and the end of the range is
determined by the value of expression2. See Paragraph 4.5 for expression formats.
bpression I should be less than expression2. If it is not, only one location is displayed: the beginning of
range location.
'.
The use of the underscore command has no effect on the address pointer.

4-9

Examining Memory Locations - Example 4
You want to examine groups of memory locations by using the underscore command. Try this command
in INSTRU, WORD, and BYTE modes. These memory locations have not been altered since you have
powered up.

TEM> INSTRU
TEM> 2000\
002000: HALT
002002:
TEM> 1004_1012
001004: HALT
001006: HALT
001010: HALT
001012: HALT
001014:
TEM> WORD
TEM> 1002_1006
001002: 000000
TEM> BYTE
TEM> 1005_1020
001005: 000
001015: 000
TEM> INSTRU
TEM>
002000: HALT
002002: HALT
002004: HALT
002006: HALT
0020 I 0: HALT
002012: HALT
002014: HALT
002016: HALT
002020:
TEM>

000000

000000

000
000

000
000

000
000

000

000

000

000

Notice that the address pointer value of 2000 which was set at the beginning of the example is still 2000 at
the end of the example.
4.10 ALTERING MEMORY LOCATIONS
You can deposit data into a memory location by setting the address pointer to the address of the location
you wish to alter and typing in the information. The address pointer is automatically incremented as you
deposit instructions and data to consecutive memory locations (as when you type in a program, for
example).

If you make an error during data entry, you can use the caret (1') command to decrement the address
pointer and retype the input line. In INSTRU and WORD modes, the address pointer is decremented by
one word for each caret command, and in BYTE mode it is decremented by one byte for each caret
command.

4-10

Altering Memory Locations - Example 1
You type in a short program starting at address 1000. You make an error while typing in the program and
use the caret (1\) command to help you correct the error. You then examine the program. The program
adds R I to R2 and places the result in R3. The final line restarts the console monitor so that you will get a
TEM> prompt after you execute the program.
Comments
TEM> INSTRU
TEM> .=1000
TEM> MOY RI,R3
TEM> ADD R2,R4
TEM> 1\
TEM> ADD R2,R3
TEM> JMP @#140010
TEM> 1000\
001000: MOY
001002:
TEM>
001000: MOY
001002: ADD
001004: JMP
001010: HALT
001012: HALT
001014: HALT
001016: HALT
001020:
001022:
TEM>

;you really wanted to type ADD R2,R3
;decrement address pointer by one word
;type in correct line
;continue typing in program
;now examine your program
RI,R3
RI,R3
R2,R3
@#140010

.-\ltering Memory Locations - Example 2
You type in some data starting at location 2000. You type several values on a line, remembering to include
separation characters (in this case, spaces) between them. You then examine the data you have typed in.
Comments
TEM> .=2000
TEM> I 234
TEM> .7
002010
TEM> .=2000
TEM> WORD
TEM> ._.+10
002000: 000001
TEM>

;type in four data values
;the address pointer is incremented
;reinitialize the address pointer
000002

000003

;examine the data
000004 000000

".11

INSTRUCTION FORMAT
This paragraph provides some guidelines for formatting instructions for input to the DCTlI-EM. A
complete description of the instruction set is found in the DCT11-AA User's Guide (EK-DCTH-UG).
An acceptable instruction consists of the instruction mnemonic followed by the appropriate string of
operands (if any). A separation character (space, tab, feed) must be used to separate a mnemonic from its
first operand (if any). A comma must appear between two operands in a two-operand instruction.

Expressions can be used as operands, if desired. Refer to Paragraph 4.5 for expression formats.

4-11

If you wish, you may enter your instructions in octal format, rather than in assembly language format.
Refer to Chapter 6 of the DCTII-AA User's Guide for information on constructing octal equivalents of
instructions.
4.12 TYPING II'i A PROGRAM
Set the address pointer to 2000 and type in the summation program from Paragraph 3.8 as shown below.
TEM>
TEM>
TEM>
TEM>
TEM>
TEM>
TEM>
TEM>
TEM>
TEM>
TEM>
TEM>
TEM>
TEM>
TEM>
TEM>

.=2000
CLR RI
CMP RO,R 1
BLE 2034
CLR @#2044
MOY RO,@#2044
DEC RO
ADD RO,@#2044
BYS 2036
CMP RO,R 1
BOT 2016
HALT
CLR RO
CLR @#2044
HALT

Now verify you have typed in the program correctly by setting the address pointer to 2000 and repeatedly
pressing the RETURN key. If you are in INSTRU mode, the following will be displayed.
TEM> .=2000
TEM>
002000: CLR
002002: CMP
002004: BLE
002006: CLR
002012: MOY
002016: DEC
002020: ADD
002024: BYS
002026:
TEM>
002026: CMP
002030: BOT
002032: HALT
002034: CLR
002036: CLR
002042: HALT
002044: HALT
002046: HALT
002050:
TEM>

RI
RO,RI
002034
@#002044
RO,@#002044
RO
RO,@#002044
002036
RO,RI
002016
RO
@#002044

The address pointer is automatically incremented each time you type in an instruction.

4-12

','(l may want to use symbolic names to represent values such as 2044 (the location of the accumulated
.. mJ to increase the readability of the program. The next few paragraphs tell you how to define and
..... nipulate symbols.
If ~ou want to execute the program and learn how to use the DCTII-EM's console debugging facilities,
.t-·ance to Paragraph 4.14.
~13

USING SYMBOLS

Tbc OCT II-EM allows you to define symbols in your programs. This paragraph describes the formats
mjuired for DCTll-EM symbols and explains the use of the commands which allow you to define and
_nipulate symbols.
~13.1

Symbol Names

Tbc following characters may be used in symhol names.
A through Z

o through 9

. (Period)
$ (Dollar sign)
." symbol name must not begin with 0 through 9, however .
." symbol name may have any length; however, only the first six characters are stored by the DCTII-EM.
Thus, to avoid ambiguities, make the first six characters of your symbol names unique.
The following predefined symbol names are reserved.

RO
RI
R2
R3
R4
R5
SP
PC
PS
WP
BI
B2

B3
B4

Register 0
Register I
Register 2
Register 3
Register 4
Register 5
Stack pointer (register 6)
Program counter (register 7)
Processor status word
Watchpoint address
Address pointer
Breakpoint 1
Breakpoint 2
Breakpoint 3
Breakpoint 4

These predefined symbols must not be used as user-defined symbol names, although they can be used as
arguments in expressions, instructions, or commands.
OCTlI-EM directives, commands, and OCTll-AA instruction mnemonics (e.g., MOY, ADD, JMP) are
also reserved and must not be used as symbol names.

4-13

4.13.2 Commands That Define And Manipulate Symbols
There are two ways you can define a symbol. One way is to use the equal sign
specific value. The general format of this is:

(~)

to equate a symbol to a

symbol~expression

where the value of the symbol is determined by the expression.
The other way of defining a symbol is to use a colon (:). The colon defines a symbol as the label of the
current address. The general format of this is:
symbol:
where the value of the symbol is defined as the value of the address pointer.
Once you have defined a symbol, you cannot redefine it unless you first delete it. Symbol deletion is
accomplished with the DELETE command. This command has the general format:
DELETE symbol
where the name of the symbol you wish to delete follows the command. The DELETE command causes
the OCT II-EM to display the symbol and its value as it performs the deletion.
Predefined symbols (see Paragraph 4.13.1) cannot be deleted with the DELETE command. Predefined
symbols can be redefined, however, by using the equal sign.
When you define a symbol, it is stored in an area called the user symbol table. There is sufficient space in
the user symbol table to store up to 66 symbols. If you try to define more than 66 symbols, you will cause
an error message to be generated.
If you want to display your user symbol table, type in the SHOWSY command. The symbols are displayed
in the order in which you defined them, starting with the most recently defined symbol.
If you want to delete your entire symbol table, type in the CLEAR command. The CLEAR command is
typically used at the beginning of a long program or a program you are loading in from a host computer
(see Paragraph 4.17). CLEAR gives the program plenty of room in the symbol table for symbols and
avoids conflicts between symbol names in the program and any symbol names you may have previously
defined.
If you want to display the value of an individual symbol, type in the symbol followed by a question mark
(?). The general format for this is:
symbol?

4-14

Defining and Manipulating Symbols - Example 1
You set the address pointer to 1000 and define the symbols FIRST, SECOND, and THIRD. You
experiment with displaying and deleting these symbols.

TEM> CLEAR
TEM> .=1000
TEM> FIRST:
TEM> SECOND=FIRST+IOO
TEM> THIRD=SECOND+300
TEM> SHOWSY
THIRD = 001400
SECOND= 001100
FIRST = 001000
TEM> DELETE FIRST
FIRST = 001000
TEM> SHOWSY
THIRD = 001400
SECOND= 001100
TEM> CLEAR
TEM> SHOWSY
TEM>
SECOND is set equal to 1100 because FIRST equals LOOO at the time of definition. If you delete FIRST
after you delete SECOND SECOND will be unaffected.
4.14 EXECUTING AND DEBUGGING PROGRAMS
Refer to the summation program you typed in (Paragraph 4.12). You will make some minor changes to
this program and use the DCTll-EM's debugging facilities to observe its operation.

First, replace memory location numbers with symbolic names (see Paragraph 4.13).
TEM>
TEM>
TEM>
TEM>
TEM>

ILLIN=2034
SUM=2044
OVFLO=2036
LOOP=2016

Instead of having the program HALT when it completes execution (which returns control to the keypad),
~ou want it to restart the console monitor and give you a TEM> prompt. You do this by placing a JMP
~.1400 10 instruction at location 2032 which restarts the console monitor when executed.
TEM> .=2032
TEM> JMP @#140010
TEM>
'ow set your initial conditions as follows.
TEM> RO=IOO
TEM> PC=2000
TEM> SP=6500
TEM>

4-15

Then execute the program by typing in the GO command.
TEM> GO
TEM>
To check the result. examine SUM.
TEM> SUM\
SUM : 004040
TEM>
This is the correct sum in octal of the numbers from 0 to 100 (octal).
4.14.1 Using The Watchpoint
The DCTII-EM recognizes WP as the symbol for the watch point. Set the watchpoint address by using the
eq ual sign command. The general format for this is:

WP=expression
where the watchpoint address is determined by the value of the expression.
For example, to monitor the accumulated sum in your program, set your watch point at the location SUM.
TEM>WP=SLM
TEM>
Now reset your initial conditions (set RO= I 00) and execute the program. After you receive the TEM>
prompt, use the SHOWRE command to examine your registers.
TEM> SHOWRE
RO
= 000000
RI
= 000000
R2
= 000000
R3
= 000000
R4
= 000000
R5
= 000000
SP
= 006500
= 002000
PC
PS
= 000004
SUM
: 004040
TEM>
Notice your watch point appears as well. Another way to examine the watehpoint is to use the question
mark command. WP? displays numerically the watch point address. [WPj? displays numerically the
watchpoint contents.
TEM> WP?
002044
TEM> [WPj?
004040
TEM>
The watch point can be cleared by setting it to zero or by typing in the CANCEL command, which not
only clears the watch point but the breakpoints as well.

4-16

•. 14.2 Using the Single-Step Function
Single stepping is accomplished by typing in the STEP command. STEP executes the instruction at the
current PC and displays: (1) the new values of your registers and watchpoint, and (2) the next instruction
to be executed.
To experiment with the STEP command, reset the initial conditions for your program (set RO= I00) and
type in STEP. You can then continue single stepping by repeatedly pressing the RETURN key.
TEM> STEP
RO
= 000100
RI
= 000000
R2
= 000000
R3
= 000000
R4
= 000000
R5
= 000000
SP
= 006500
PC
= 002002
= 000024
PS
SUM : 004040
002002 : CMP RO,RI
002004 :
TEM>
RO
= 000100
RI
= 000000
R2
= 000000
R3
= 000000
R4
= 000000
R5
= 000000
SP
= 006500
PC
= 002004
= 000020
PS
SUM : 004040
002004 : BLE ILLIN
002006 :
TEM>
RO
= 000100
RI
= 000000
R2
= 000000
R3
= 000000
R4
= 000000
R5
= 000000
SP
= 006500
PC
= 002006
= 000020
PS
SUM : 004040
002006 : CLR @#SUM
002012 :
TEM>
RO
= 000100
RI
= 000000
R2
= 000000
R3
= 000000
R4
= 000000
R5
= 000000

4-17

SP
= 006500
= 002012
PC
PS
= 000024
SUM : 000000
002012 : MOV RO,@#SUM
LOOP:
TEM>
RO
= 000100
RI
= 000000
R2
= 000000
R3
= 000000
R4
= 000000
R5
= 000000
SP
= 006500
PC
= LOOP
PS
= 000020
SUM : 000100
LOOP: DEC RO
002020 :
TEM>
RO
= 000077
= 000000
RI
R2
= 000000
R3
= 000000
R4
= 000000
R5
= 000000
SP
= 006500
= 002020
PC
PS
= 000020
SUM : 000100
002020 : ADD RO,@#SUM
002024 :
TEM>
RO
= 000077
RI
= 000000
R2
= 000000
R3
= 000000
R4
= 000000
R5
= 000000
SP
= 006500
= 002024
PC
= 000020
PS
SUM : 000177
002024 : BVS OVFLO
002026 :
TEM>
The program is functioning properly; RO is getting decremented and added to SUM.

4-18

4.14.3 Using Breakpoints
The use of breakpoints with a console terminal is similar to the use of breakpoints with the keypad (see
Paragraph 3.8.2).
The OCT I I-EM recognizes BI, B2, B3, and B4 as the symbols for the four breakpoints. Set a breakpoint
~

using the equal sign command. The general format for this is:
breakpoint symbol=expression

_here the breakpoint is determined by the value of the expression.
F BI=2020
TEM> B2=2024
TEM>
'ow reset your initial conditions (set RO= 100, PC=2000) and execute the program.
TEM> GO
BREAK POINT ENCOUNTERED
002020: ADD RO,@#SUM
002024:
TEM>
'fou get a message which indicates that your first breakpoint (BI) was encountered by the console monitor.
T() determine the current state of your program, type in the SHOWRE command.
TEM>
RO =
Rl =
R2 =
R3 =
R4 =
R5 =
SP =
PC =
PS =
SUM:
TEM>

SHOWRE
000077
000000
000000
000000
000000
000000
006500
002020
000000
000100

4-19

You sec that RO has been correctly decremented. When you type in GO again:
TEM> GO
BREAK POIl\T ENCOUNTERED
002024: BVS OVFLO
002026:
TEM>
the console message appears (this time because of B2), and you again examine the state of your program.
TEM> SHOWRE
RO ~ 000077
R I ~ 000000
R2 ~ 000000
R3 ~ 000000
R4 ~ 000000
R5 ~ 000000
SP ~ 006500
PC ~ 002024
PS ~ 000000
SUM: 000177
TEM>
You see that the first addition was performed correctly. You can continue to observe the operation of the
program by typing in the GO and SHOWRE sequence as just shown.
To examine a breakpoint, type in BI?, B2?, B3?, or B4? Breakpoints can be cleared by setting them to
zero or by typing in the CANCEL command, which not only clears the breakpoints but the watch point as
well.
4.t5 Dellt-EM DIRECfIVES
As a convenience for users who are familiar with assemblers (and in particular the PDP-II MACRO-II
assembler), the DCTlI-EM recognizes several directives which are similar to those used in the MACROII language. These directives are listed in Table 4-2 with a brief explanation of their operation. For
detailed information about how to use these directives in your programs, refer to the PDP-II MACRO-II
Language Reference Manual (AA-5075A-TC).

4-20

Tabl.4-2

DCTII-E'VI Direeli,es

Operation

Directive Form

\SCII /string/

Generates a block of data containing the ASCI] equivalent of the character string
(enclosed in delimiting characters), one character per byte. The delimiting characters i.:an
be slashes or any other visible character. The ASCII code for each character is ~torcd in
successive bytes of memory starling at the location indicated by the current address
pointer. The address pointer is advanced by the length (in characters) of the enclosed
string.

BLKB expr

Reserves a block of storage space whose length in bytes is determined by ehe specified
expression. The current address pointer is advanced by the value of the expression.

BLKWexpr

Reserves a block of storage space whose length in words is determined by the specified
expres::>ion. The current address pointer is advanced by two times the value of the
expressIon.

BYTE exprl, expr2, , . ,

Generates successive bytes of data: each byte contains the value of the corresponding
specified expression. The lower eight bits of each expression art: stored in successive bytes
of memory, starting at the location indicated by the curren I address pointer. The address
pointer is advanced by the number of expressions given. The last expression must not be
followed by a comma.
Ensures that the current address pointer contains an even address by adding I if it is odd.

.ORD exprl. cxpr2, . .

Generates successive words of data; each word contains the value of the corresponding
specified expression. The value of each expression is stored in successive words of memory
starting at the location indicated by the current address pointer. The addre::.s pointer is
advanced by two times the number of expressions given. The last expre:'>sion must not be
followed by a comma.

4.16 MISCELLANEOUS CONSOLE FUNCTIONS
The DCTII-EM has a HELP facility which displays all the commands available to you. To invoke this
b.ility, type in HELP.

lou can display the current operating modes of the OCT II-EM by typing in the SHOWMO command .
• ben you first power up, typing in the SHOWMO command displays the default operating modes:
PASS2

NOHOST

INSTRU

SYMBOL

VTOFF

The operating modes that can be displayed are: PASSI, PASS2. HOST, NOHOST, INSTRU, WORD,
J)TE, SYMBOL, ABSOLU, VTON, and VTOFF. See the command summary in Paragraph 4.18 for
~f descriptions of these modes. The command summary also contains references to paragraphs that
aplain the modes in detail.
The DCTII-EM has a REPEAT function which allows you to repeatedly input a line of commands or
-,ructions. The form of this command is:
REPEA T expression, input line

4-21

where the input line is executed the number of times specified by the value of the expression. One
application of the REPEAT command is to fill memory. For example, the REPEAT 1000,NOP command will fill 1000 (octal) locations with NOP instructions. The REPEAT command also lets you single
step without having to press the RETURN key repeatedly (see Paragraph 4.14.2). The REPEAT 7, STEP
command, for example, single steps through your program seven times.
Repeat Command - Example
A third application of the REPEAT command is to move blocks of memory. You must specify the
beginning and ending addresses of the range to be moved (the source range) and the beginning address of
the destination range. The general format for a command sequence which moves a block of memory is:

TEM> .=destination
TEM> REPEAT /2+1,[.+start-destination]
where start and end are the beginning and ending addresses (respectively) of the source range, and
destination is the beginning address of the destination range. Both ranges must begin at even addresses,
and only words of memory can be transferred.
For example, if you want to move the contents of locations 1000 through 1010 to 2030 through 2040, type
in the following.
TEM> .=2030
TEM> REPEAT <1010-1000>/2+1,[.+1000-2030]

4.17 LOADING THE DeTlt-EM FROM A HOST COMPUTER
This paragraph describes how to load information (usually a program) from a host computer into your
DCTIl-EM. Two broad areas are covered. First, you are familiarized with the console monitor commands
that initiate and control the host loading process. Second, you are shown how to prepare a DCTll-EM
loadable program on your host.
4.17.1 Configuring the DCrU-EM for Host Loading
Since host loading is accomplished through the use of console monitor commands, you must have your
DCT1I-EM connected to a console terminal.
Your host computer must have a serial communication line capable of sending data to the DCTll-EM in
ASCII text format. Connect the serial line from the host to the DCTll-EM auxiliary serial port connector
(13) as shown in Figure 4-2.
STANDARD 25-PIN CONNECTOR AND CABLE

HOST COMPUTE R

CONSOLE TERMINAL

j3

rTTTTTl ~
ITIIID

00000
00000

VT100

00000
00000

DCT11-EM
""" 10254

Figure 4-2

Connecting a Host Computer to the DCTII-EM

4-22

No other wiring or jumpering is required. Set the baud rate of your console terminal equal to the baud rate
of your host line. Use the DCTll-EM keypad to set the same baud rate for the console serial port by
activating function 3 as described in Paragraph 3.12.4. Also make sure you are set up to transmit and
receive characters in the following format: asynchronous, ASCII, 8 bits (eighth bit is always space), no
parity, one stop bit.
You need not set the baud rate of the auxiliary serial port. When you communicate with a host, the
DCTlI-EM automatically sets the baud rate of the auxiliary serial port equal to the baud rate of the
console serial port.
Activate function 2 as described
displays a prompt, type in:

In

Paragraph 3.12.3 to start the console monitor. When the console

TEM> HOST
The HOST command places you in HOST mode and is a prerequisite for performing any operation with a
host computer.
HOST mode only allows you to receive messages from the host. If you want to communicate directly with
the host, use the TALK command in addition to HOST. If you want to load information from the host, use
the LOAD command in addition to HOST. The TALK and LOAD commands are explained in
Paragraphs 4.17.3 and 4.17.4.
The NOHOST command cancels HOST mode.
4.17.2 The HOST Command
Typing in the HOST command has two effects:

1.
2.

It defines the auxiliary serial port as a host communication line.
It creates an input buffer to hold information received from the host.

A HOST> prompt precedes any messages you receive from your host while in HOST mode.

Host Mode - Example
You are in HOST mode and you receive a message from the host before you finish typing an input line. If
you simply continue typing the line, the console monitor restores the interrupted line and appends your
new material to it. Messages from the host are ignored as console input.
Comments
TEM> HOST
TEM> MOY RO,R I
TEM> MOY R
HOST>
This is a message from the host ...
TEM> MOY RO.R2
TEM>

:You were typing MOY RO.Rl

;You type O.R2 and the previous line is restored.

4.17.3 The TALK Command
Typing in the TALK command allows you to communicate directly with the host just as if the DCTIIEVI were not there. It has the same effect as connecting the serial line from the host directly to your
.:onsole terminal.

4-23

Typically, you might use the TALK mode to prepare a DCT II-EM loadable file with your host's editing
facilities (sec Paragraph 4.17.5).
The user LED is illuminated in TALK mode.
There are two ways to cancel TALK mode. One way is to press the BREAK key on the console. The
DCT II-EM responds:
CONSOLE BREAK
TEM>
and you not only cancel TALK mode but HOST mode as well. The other way is to type in CTRL/A. The
DCT II-EM responds:
E (EXIT), R (RESU'vIE), B (SE"JD BREAK)," A (SEND I\A)?
If you type in the letter E, TALK mode is canceled but HOST mode is not.
Note that typing in CTRL/ A ("A) in TALK mode gives you three other options. You can send a break or
CTRL/ A character to the host by typing in Bar CTRL/ A, respectively. Typing in an R or any characters
other than E, B, or CTRL/ A, causes TALK mode to be resumed.
4,17.4 The LOAD Command
Use the LOAD command only after you have prepared a DCTII-EM loadable program on your host as
explained in Paragraph 4.17.5.
Typing in the LOAD command allows you to communicate directly with the host just as the TALK
command does. In LOAD mode, however, the DCTII-EM constantly monitors the characters received
from the host and begins loading if it sees the .ST AR T directive.
To initiate host loading while in LOAD mode, therefore, simply enter a command (which depends on the
particular host you are using) that types out your program on the console terminal. For example, if you
were using a VAX/VMS host, you would use TYPE PROG.TXT to type out the file PROG.TXT on your
terminal. Since your DCTlI-EM loadable program always has the .START directive as its first line,
typing the program causes the DCTII-EM to start loading.

NOTE
During the loading process, the DCT 11-EM accepts
input from both serial ports simultaneously. As a
rule, do not press keys on the console terminal during loading since this interferes with your host's
input. The only exception to this rule is the use of
the CTRLjO command (see below).
Once loading begins, it continues until the .END directive is received or until an error in the incoming
program is detected. In both cases, when loading stops, you are returned to HOST mode. If loading stops
as a result of an error in your program, the portion of the program that follows the error will be displayed
on your console terminal as a "message" from the host.
If loading is terminated by an error in your program, you can suppress further display of the program by
typing in the CTRLjO command. CTRLjO causes the DCTlI-EM to ignore messages from the host until
you press the RETURN key. If you want to terminate output from the host, enter CTRLjO followed by
the TALK command followed by the appropriate interrupt control sequence your host recognizes (such as
CTRL/Y or CTRL/C).

4-24

Note that the user LEO is illuminated in LOAD mode. Also note that pressing BREAK or typing in
CTRL/ A has the same effect in LOAD mode as in TALK mode.
4.17.5 Preparing OCfIl-EM Loadable Programs on a Host
In general, you will find it convenient to use your host's editing facilities to create programs. This is
particularly true if the programs are long or require extensive alteration. In order to prepare a program the
DCTlI-EM will accept, keep the following in mind.
Make sure the .START directive precedes your program. The DCTII-EM will not be able to load your
program unless it first sees the .START directive.
Next, realize that when your program is loaded into the DCTII-EM, the OCTII-EM will behave as if
each line of your program were being entered by you directly from the console terminal. This means that
the rules and conventions of console monitor input apply also to each line of the program you create on
your host. The one exception is that the null line command (i.e., pressing RETURN to examine successive
memory locations) is disabled during host loading.
If your program contains undefined symbols or expressions (for example, a "forward reference"), prepare
your program as two identical segments. Precede the first segment with the PASSI command and the
second segment with the PASS2 command. The idea behind the PASSI and PASS2 commands is as
follows.
Normally, the DCTII-EM does not allow you to input undefined symbols. This mode of operation is
called the PASS2 mode (PASS2 is one of the power-up default modes of the DCTl I -EM). The use of
undefined symbols in your programs, however, is commonly desirable. for example, consider the following
program segment.
CMP #177700,RI
BNE .+14
INC R2
CMP R2,#200
BLO .+4
CLR R2
MOV R2,R3
In this example, you are branching to a defined location (i.e., the location that contains the MOV R2,R3
instruction), but are doing so in a cumbersome way. You need to perform a calculation for each branching
instruction. An easier way to write this program segment would be:
CMP # I 77700,R I
BNE THERE
INC R2
CMP R2,#200
BLO THERE
CLR R2
THERE: MOV R2,R3
But if the DCTII-EM is in a mode in which it rejects undefined symbols, an error results when you try to
input BNE THERE.
The DCTII-EM solves this problem by having a mode of operation in which undefined symbols are
tolerated called the PASS I mode.

4-25

In the PASS] mode, the DCTll-EM substitutes the value zero for each undefined symbol encountered in
expressions except when the undefined symbol is the operand of a branch instruction. In that case, the
value of the current address pointer is substituted for the value of the branch operand. If an undefined
symbol is later defined through the use of an equal sign (~) or colon (:), the symbol is entered into the
symbol table with its proper value.

NOTE
Undefined expressions involving the address pointer
are never tolerated, not even in PASSl. For example
if A, B, and C are undefined, the following are
unacceptable:
.=A
.BLKB B
.BLKW C

Make sure the .END directive terminates your program.
A DCTll-EM Loadable Program - Example 1
Use your host's editing facilities to create the summation program presented in Paragraph 3.8. Comments
from the original program are shown in lowercase, and comments added for the benefit of the example are
shown in uppercase.

,START
, = 2000

CLR Rl
CMP RO,Rl
BLE 2034
CLR @#2044
MOY RO,@#2044
DEC RO
ADD RO,@#2044
BYS 2036
CMP RO,Rl
BGT 2016
HALT
CLR RO
CLR @#2044
HALT
.END

;THIS LINE MUST APPEAR FIRST.
;ENTER THE PROGRAM STARTING AT LOCATION 2000.
;Set Rl ~ O.
;RO contains n.
;Illegal input (n < 0)°
;No, start operation by clearing 2044.
;Place first value of n in 2044.
;n

~ n~1

;Add next value (n~ I) to 2044.
;Overflow?
;No.
;Continue operation if n > O.
;Operation complete if n ~ O.
;Yes, illegal input. Clear RO, 2044.
;Yes, overflow. Clear 2044 only.
;Illegal input or overflow occurred.
;STOP HOST LOADING .

4-26

.4. DCTlI-EM Loadable Program - Example 2

In this example, the summation program above is changed slightly such that forward references to the
symbols ILLIN and OVFLO are made. Since these symbols are undefined when first referenced, you must
create the program in two segments to make it acceptable to the DCTII-EM.
.sTART
CLEAR
PASSI

. =

2000

BEGIN:

LOOP:

ILLlN:
OVFLO:

CLR RI
CMP RO,RI
BLE ILLIN
CLR @#2044
MOV RO,@#2044
DEC RO
ADD RO,@#2044
BVS OVFLO
CMP RO,Rl
BGT LOOP
HALT
CLR RO
CLR @#2044
HALT

PASS2

. =

2000

BEGIN:

LOOP:

ILLlN:
OVFLO;
.END

CLR RI
CMP RO,RI
BLE ILLIN
CLR @#2044
MOV RO,@#2044
DEC RO
ADD RO,@#2044
BVS OVFLO
CMP RO,Rl
BGT LOOP
HALT
CLR RO
CLR @#2044
HALT

;THIS LINE MUST APPEAR FIRST.
;DELETE ALL PREVIOUSLY DEFINED
;SYMBOLS.
;PERFORM FIRST PASS INPUT OF PROGRAM.
;ALLOW UNDEFINED SYMBOLS AND SET
;THEIR VALUES TO ZERO.
;INPUT THE PROGRAM STARTING AT
;LOCATION 2000.
;Set Rl = 0.
;RO contains n.
;lIIegal input (n <: OJ?
;No, start operation by clearing 2044.
;Place first value of n in 2044.
;n = n-I
;Add next value (n-I) to 2044.
;Overflow?
;No.
;Continue operation if n > 0.
;Operation complete if n = 0.
;Yes, illegal input. Clear RO, 2044.
;Yes, overflow. Clear 2044 only.
;Illegal input or overflow occurred.
;PERFORM SECOND PASS ENTRY OF
;PROGRAM.
;SYMBOLS ARE NO LONGER UNDEFINED AND
;ARE ASSIGNED CORRECT VALUES.
;UNRESOLVED ADDRESSES ARE RESOLVED.
;iNPUT THE PROGRAM AGAIN STARTING AT
;LOCA nON 2000.
;Set RI = 0.
;RO contains n.
;lIlegal input (n <: OJ?
;No, start operation by clearing 2044.
;Place first value of n in 2044.
;n = n-I
;Add next value (n-l) to 2044.
;Overflow?
;No.
;Continue operation if n > 0.
;Operation complete if n = 0.
;Yes, illegal input. Clear RO, 2044.
;Yes, overflow. Clear 2044 only.
;IIlegal input or overflow occurred.
;STOP HOST LOADING .

4-27

4.17.6

An Illustration of the Host Loading Process

This paragraph steps you through a session with the DCTII-EM during which you load the summation
program you created on your host (see example I, Paragraph 4.17.5).
Assuming you are in NOHOST mode, the first step is to get into LOAD mode by typing in:
TEM> HOST LOAD
Press RETURN until your host responds with its usual prompting character(s).
Then direct your host to type or otherwise display on the console terminal the program you wish to load.
This command might be in the form:
TYPE SUMM
where TYPE is the the command your host recognizes to display the program and SUMM is the name you
gave the program. When the host starts typing the program, the following appears on your console
terminal. (This program does not contain any undefined symbols and requires only one pass.)
.START
TFM>
:THIS LINE MUST APPEAR FIRST.
TEM> CLEAR
:DELETE ALL PREVIOUSLY DEFINED
TEVf>
:SYMBOLS.
TEM> . ~ 1000
:ENTER THE PROGRAM STARTING AT
TEM>
;LOCA TION 2000.
TF\1>CLRRI
;Set RI = O.
TEM> CMP RO,R I
;RO contains n.
TE'v1> BLE 2034
:Illegal input (n < 0),'
TEM> CLR 0#2044
:No, start operation by clearing 2044.
TEM> MOV RO,~,#2044
;Place first value of n in 2044.
TEM> DEC RO
;n = n-I
;Add next value (n-I) to 2044.
TEM> ADD RO,~,#2044
;Overfiow'J
TEM> BVS 2036
TEM> CMP RO,R I
;No.
TEM> BGT 2016
;Continllc operation if n > O.
TFM> IIALT
;Operation complete if n = O.
TEM> CLR RO
;Yes, illegal input. Clear RO, 2044.
TEM> CLR ([I #2044
;Yes, overflow. Clear 2044 only,
:Illegal input or overflow occurred.
TEM> HALT
TEM> E\D
;STOP HOST LOADING.
HOST>

The DCTII-EM successfully loaded your program and you are now back in HOST mode. The console
monitor can now respond to your input. If you type in 2000, you can examine the program you just loaded
by pressing RETURN repeatedly.

4-28

If your program is successfully being loaded into the DCTlI-EM, each line is preceded by the TEM>
prompt. If a program line causes a console error message, loading stops but typing continues (without the
TEM> prompt).
4.18

CONSOLE COMMAND SUMMARY

General Form

Operation

expr

Deposit the expression in RAM unless the expression is part of another
command. Advance the address pointer accordingly.

instr

Assemble and deposit the instruction at the location indicated by the
address pointer. Advance the address pointer accordingly.
Display the contents of the locations from expr 1 through expr2. If expr 1 is
greater than expr2. only exprl contents displayed.

expr?

Display numerically the value of the cxpression.

expr\

Set the address pointer to the value of the expression. Display the contents
of the location specified by the expression.

null line

Display, relative to the address pointer, the next eight instructions if in
INSTRU mode. the next eight words if in WORD mode, or the next eight
bytes if in BYTE mode. If single stepping, single step again.

sym bol~expr

Define the symbol to be equal to the expression.

symbol:

Define the symbol to be equal to the current value of the address pointer.
Decrement the address pointer by one byte if you are in BYTE mode or
by one word if you are in WORD or INSTRU mode.

Form

Paragraph
Reference

ABSOLU

4.8.2

Sets the ABSOLU mode. Causes user-defined
symbols in programs to be displayed as numeric
values.

.ASCII jstringj

4.15

Generates a block of data containing the ASCII
equivalent of the character string (enclosed in
delimiting characters), one character per byte.

.BLKB expr

4.15

Reserves a block of storagc space whose length in
bytes is determined by the specified expression.

.BLKWexpr

4.15

Reserves a block of storage space whose length in
words is determined by the specified expression.

Operation

4-29

.BYTE expr I, expr2, ...

4.15

Generates successive bytes of data; each byte contains the value of the corresponding specified
expression.

BYTE

4.8.2

Sets the BYTE mode for memory examination
and alteration operations. Causes memory to be
displayed as three digit bytes.

CANCEL

4.14.1
4.14.3

Clears all four breakpoints and the watch point.

CLEAR

4.13.2

Clears the user symbol table.

DELETE symbol

4.13.2

Deletes user-defined symbol from the user symbol
table.

.END

4.17.4

Used at the end of programs that are to be loaded
into the DCTII-EM from a host. Causes the
DCTII-EM to terminate host loading if in LOAD
mode .

. EVEN

4.15

Ensures that the current address pointer contains
an even address by adding I if it is odd.

EXIT

4.2

Transfers console control to the keypad.

GO

4.14

Executes the user program at the current PC
value.

HELP

4.16

Displays a table of commands.

HOST

4.17.1

Sets the HOST mode. Allows the DCTII-EM to
receive messages from a host.

INSTRU

4.8.2

Sets the INSTRU mode. Data is displayed as
DCTII-AA assembly language instructions. Is set
by default when the DCTII-EM is powered up.

LOAD

4.17.1

Sets the LOAD mode. Establishes host communication. Allows the DCTII-EM to begin loading if
it encounters the .START command.

NOHOST

4.17.1

Clears the HOST mode. Is set by default when
the DCTII-EM is powered up.

PASSI

4.17.5

Sets the PASS I mode. Allows the use of undefined symbols.

PASS2

4.17.5

Sets the PASS2 mode. Requires all symbols to be
defined. Is set by default when the DCTlI-EM is
powered up.

4-30

REPEAT expr,cmd

4.16

Repeatedly performs the specified command(s)
by the number of times specified by the
expression.

SHOWMO

4.16

Displays the current operating modes of the
DCTII-EM.

SHOWRE

4.6

Displays the contents of user registers and the
watch point if the watchpoint is set.

SHOWSY

4.13.2

Displays the contents of the user symbol table.

START

4.17.5

Used at the beginning of programs that are to be
loaded into the DCTlI-EM from a host. Causes
the DCTII-EM to start host loading if in LOAD
mode.

STEP

4.14.2

Executes one instruction of a user program at the
current value of the Pc. Displays the contents of
user registers and the watch point if the
watch point is set. Displays the next instruction to
be executed.

SYMBOL

4.8.2

Sets the SYMBOL mode. Causes user-defined
symbols in programs to be displayed as symbols
rather than as numeric values. Is set by default
when the DCTII-EM is powered up.

TALK

4.17.1

Sets the TALK mode. Establishes host communication. Allows you to communicate directly with
a host as if the DCT II-EM were not there. Typically used for program development on a host.

\TOFF

4.3

Sets the VTOFF mode. Causes deleted characters
to be echoed (preceded by a slash) on the console
terminal when you press the DELETE key. Is set
by default when the DCT I I-EM is powered up.

\TON

4.3

Sets the VTON mode. Characters you delete by
pressing the DELETE key are not echoed in this
mode. Typically used if you have a video terminal
for a console.

WORD exprl, expr2, ...

4.15

Generates successive words of data; each word
contains the value of the corresponding specified
expression.

4-31

4.19

CONTROL COMMAND SUMMARY

Command

Meaning

Typical Use

CTRL/U
CTRL/X

Delete line.

You made several typing errors in your input line.
You want to cancel the line and try again.

CTRL/R

Display line.

You used the DELETE key several times while
typing your input line. You want to see a clean
version of the line you are editing.

CTRL/S

Suspend execution.

You want to suspend the operation of the console
monitor or the execution of a currently running
program.

CTRL/Q

Resume execution.

You have previously used the CTRL/S command
and want to resume operation.

CTRL/C

Abort operation.

You want to abort the current CTRL/Y operation of the DCTlI-EM and input a new line.

CTRL/O

Ignore host message.

You are in HOST mode (sec Paragraph 4.17.1)
and want to ignore information currently being
sent by your host computer.

CTRL/A

Select option.

You are in TALK or LOAD modes (see
Paragraphs 4.17.3 and 4.17.4) and want to select
one of these four options: exit, resume, send
break, send CTRL/ A.

4-32

CHAPTERS
SOFTWARE

5.1

INTRODUCTION

This chapter provides some information about the DCTII-EM monitor and introduces you to monitor
subroutines you can use in your programs. The chapter also describes how address space is allocated in the
OCT I I-EM and shows you which areas are available and unavailable for use.
This material is summary in nature. More detailed information can be found in the OCT II-EM monitor
listing (see Appendix A) and in the DCTII-EM schematics (see Appendix B).

5.2 THE MONITOR
The monitor is a PROM resident program that controls the operation of the DCTII-EM. Its main purpose
is to provide an environment in which you can develop and run programs. The portion of the monitor that
allows you to operate the OCT I I-EM with the keypad is called the keypad monitor and the portion that
lets you usc a console terminal is called the console monitor. When you learned how to operate the
OCT I I-EM with the keypad and console in Chapters 3 and 4, you were really learning how to get the
monitor to do things for you.
When you execute a program, the monitor relinquishes control of the DCTII-EM to your program.
Control is returned to the monitor (i.e., the monitor is restarted) by any of the following ways:
I.
2.
3.
4.
5.
6.
7.
8.

Pressing the HALT switch
Executing a HALT instruction
Encountering a breakpoint or executing a BPT instruction
Attempting to execute an illegal instruction
Performing a single step
Sending a BREAK from a console terminal
Executing a JMP @#14001 0 instruction
Sending a CTRL/C or CTRL/Y command from a console terminal

The first two ways (1 and 2) always return control to the keypad monitor. The remaining ways (3 through
8) return control to the keypad monitor if you are using the keypad or the console monitor if you are using
a console terminal. When control is returned to the kcypad monitor, the PC is displayed on the LEOs and
you are in register mode. (If a flashing error message appears on the LEDs, press the HALT switch or any
key to display the PC.) When control is returned to the console monitor, a TEM> prompt is displayed on
your console terminal. Refer to Appendix A for details about how the HALT and BPT instructions
interact with the monitor. Also refer to Appendix A for information on the effects of setting the T-bit.

5-1

When you return control to the monitor, the DCTll-EM registers contain the values they had at the time
your program slopped with the following exceptions.
I.

If you execute a JMP @#140010 instruction, the PC is restored to the value it had when your
program started. This allows easy restarting of the program.

2.

If you type CTRL/C or CTRL/Y from a console terminal, all the DCTI1-EM registers are
restored to the values they had when your program started.

3.

If you encounter a breakpoint, the stack pointer is set to the value it had just before the
break point occurred.

5.2.1 The Stack Pointer
The monitor initializes your stack pointer to 7400 when you power up. The monitor also checks to make
sure your stack pointer is in the range 4 through 7400, inclusive (for the keypad monitor), or 4 through
6500, inclusive (for the console monitor), before it allows your program to execute. It is up to you,
however, to make sure the stack pointer has a reasonable value before you attempt to run a program.
For example, it is a good idea to make sure your stack pointer and the information you push onto the stack
do not overlap your program. To decrease the chance of this happening, set the stack pointer well above
the area in which your program resides.

5.3

MONITOR SUBROUTINES

Several portions of the DCTll-EM monitor arc accessible to your programs as subroutines. If you want to
use one of these subroutines in your program, simply include a JSR instruction in the form:
JSR PC,@#subroutine
where subroutine refers to the address of the desired subroutine.
Subroutine mnemonics arc defined within the monitor only, so make sure your program defines these
mnemonics before it uses them as symbols.

5.3.)

KeYI'ad/LED Subroutines

Address

Mnemonic

Descril'tion

140014

DGDISP

Display Hex Digit
Takes the value contained in the lower four bits of RO and
displays it as a hexadecimal number on the LED digit indexed
by R I. Values of R 1 correspond to LED digits as follows. Uses
RO and RI .

. :3

'1

07

05

03

0'

.,

10

06

04

0'

00

5-2

Address

Mnemonic

Description

140020

UPDlSP

Display Octal Number on Upper LEOs
Takes the value in R2 and displays it as a six-digit octal number
on the upper row of LEOs. Uses RO and R I.

140024

LODISP

Display Octal Number on Lower LEOs
Takes the value in R2 and displays it as a six-digit octal number
on the lower row of LEOs. Uses RO and R I.

140030

DECDSP

Display Decimal Number
Takes the value in R 1 and displays it as a five-digit decimal
number on the row of LEOs indexed by R2. R2 = 12 for the
lower row, R2 = 13 for the upper row. Uses RO, R I, R2, and
R3.

140034

UPBLNK

Clear Upper Row
Blanks out the upper row of LEOs. Uses RO and R I.

140040

LOBLNK

Clear Lower Row
Blanks out the lower row of LEOs. Uses RO and R 1.

140044

GETKEY

Get Key Number
Turns on LEDs and waits for a keypress. When a keypress
occurs, takes the number of the key and stores it in R I. Keys are
numbered as follows.

BGGDG
BGDGD
8GDG[J

GBGDG
140050

BCDKEY

Convert Key ;\lumber to BCD
Takes the key number in R 1 and converts it to a BCD value for
the keys 0 through 9. Returns 12 for the CLR key and 13 for
the EXA key. Returns -I (i.e., 177777) for any other key.
Stores the result in R I.

5-3

Address

Mnemonic

Description

140054

GETNUM

Input Number From Keypad
Displays the value in R2 as a six-digit octal number on the lower
row of LEDs. Enables the user to modify the value of R2 using
keys 0 through 7 and CLR. Stores modified value in R2 when
the EXA key is pressed. Uses RO, R I, and R2.

5,3.1.1 Using the LEDs and Keypad - This paragraph contains some information you may find useful
when writing programs that use the LED, and keypad. This is intended as introductory material only. For
further detail, refer to the monitor listing in Appendix A and the DCTlI-EM schematics in Appendix B.
You can create your own characters to display on the LED digits. First, form bytes that represent the
segment patterns of the characters you wish to display as shown in Figure 5-1.

'/ /'

dp.

,I

g

o

Ie

dp

,

9

d

,
MfI-10348

d

Figure 5·1

LED Segment Assignments

For example, 0 II 10100 (or 164 octal) corresponds to the letter h and aI 00 IIII (or I 17 octal) corresponds
to the numeral 3.
Then, move the bytes containing the segment patterns to locations 7712 through 7725. Thcsc locations
(collectively called SEGBUFj are used by the LED interrupt service routine in the monitor to display
segment patterns on the LEDs. Each location (byte) corresponds to an LED digit as shown in Figure 5-2.

UPPER ROW
OF

77'25 7723 7721 7717 7715 7713

Lf:llS

LOWER ROW

7724 7722 7120 7716 7714 7717

OF

LEOS

Figure 5-2

SEGBUF Assignments

For example, if you moved 164 (octal) to location 7721, 117 (octal) to location 7717, and
SEGBUF locations. you would display h3 centered in the upper row of LEDs.

a to all the other

Finally, turn on the LEDs by writing 000007 to port C of the 8255A parallel port chip (address 177444).
Make sure your program keeps the LEDs on long enough for you to see them. One way of leaving the
LEDs on is to incorporate one or more delay loops in your program of the form:
CLR R5
SOB R5,.

5-4

The LED interrupt (INTA) is disabled (i.e., the LEOS arc turned off) by writing 0000 I 0 to port C of the
8255A chip. This also disables the user LED.
To turn on the user LED (which, incidentally, also disables the LED digits), write 000011 to port C of the
8255A chip.
Examples of displaying values on the LEOs are provided in Paragraph 5.3.1.2. You can also create your
own interrupt service routines to respond to keypresses. When a key is pressed, program control is
transfered to the routine pointed to by 7676. If 7676 is zero, keypresses are ignored. The number of the
key pressed is available to your routine through RI. See the description of the GETKEY subroutine in
Paragraph 5.3.1 for key numbers.
In order for a keypress to be sensed, the LEOs must be enabled. This can be done by writing 000007 to
location 177444 as explained above or by executing your program from the keypad with the "Go With
LEOs" special function (see Paragraph 3.12.2).
At the end of your keypress service routine, include the sequence:
MOY (SP)+,R2
MOY (SP)+,RI
MOY (SP)+,RO
RTI
to restore the state of your interrupted program. As an example, here is a program which loops on itself
and increments R3 each time a key is pressed. To check the operation of the program, start it at location
1000 and press keys. Press HALT and examine R3.

Address

Data

1000
1002
1004
1006
1010
1012
1014
1500
1502
1504
1506
1510

012737
000007
177444
012737
001500
007676
000774
005203
012602
012601
012600
000002

Symbolic
Representation

Comments

MOY #7,@#177444

:enable keypad

MOY #1500,@#7676

;attach interrupt rouline

BR 1006
INC R3
MOY (SP)+,R2
MOY (SP)+,R I
MOY (SP)+,RO
RTI

;Ioop infinitely
:interrupt service routine

5.3.1.2 Using Keypad/LED Subroutines - Example Programs - The following examples show you how
to use keypad/LED subroutines.
Example 1 - Countdown Program This program decrements a number at a rate inversely proportional to
the number's size. The program bcgins by displaying the word "EntEr" on the upper row of LEOs. You
enter a number (which is displayed on the lower row of LEOs) and press the EXA key. The number is
displayed as it is decremented. The program initializes itself at the end to allow you to enter another
number.
There are undefined symbols in this program, so if you enter the symbolic version via the console terminal,
make sure you incorporate the PASSI and PASS2 commands as described in Paragraph 4.17.5.

5·5

Address

Data

1000
1002
1004
1006
1010
1012
1014

012701
007713
012700
000006
116021
001063
005201

1016

077004

1020
1022
1024
1026
1030
1032
1034
1036
1040
1042
1044
1046
1050

004737
140054
005702
001774
012701
000003
004767
000012
077103
005302
004737
140024
000765

TEST:

Symbolic
Representation

Comments

SEGBUF = 7712
LODISP = 140024
GETNUM = 140054

;LED segment buffer
;octal number on lower LEDs
;input number from keypad

. = 1000

;position program at location
;1000

MOY #SEGBUF+I,RI

;point to rightmost
;digit of upper row of LEOs
;set digit count = six digits

MOY #6,RO
TEST!:

MOYB ENTER-I (RO),(R 1)+

TEST4:

TST R2
BEQ TEST2
MOY #3,RI

TEST3:

JSR PC,DELA Y

;transfer character to
;digit in upper row of LEDs
;advance pointer to next
;digit in upper row of LEDs
;Ioop to transfer all six
;characters
;input an octal number from
;the keypad
;reject zero as an input
;if zero, get a new number
;call delay routine three
;times
;wait a while

SOB RI,TEST3
DEC R2
JSR PC,@#LODISP

;decrement entered number
;display new value

BR TEST4

;see if we have zero yet

INC RI
SOB RO,TEST!
TEST2: JSR PC,@#GETNUM

;DELA Y loops a number of times inversely proportional to the size
;of R2. Thus there is a smaller delay when R2 is large.
1052
1054
1056
1060

012700
177777
160200
103376

1062

000207

DELAY, MOY #-I,RO

;set dividend

DELAY I: SUB R2,RO
BCC DELAY I

;divide by successive
;subtraction; keep
;subtracting until
;underflow occurs

RTS PC

; ENTER is a list of bytes corresponding to the segment patterns
; "EntEr".

1064
1066
1070

052171
074570
000120

ENTER: .BYTE 171,124,170,171,120,0

5-6

Example 2 - Clock Program
This program displays a minutes and seconds clock on the lower row of LEOs. The values for minutes and
seconds are obtained from a timer maintained by the monitor. You can use the INT switch to set minutes.
Note that the upper row of LEOs and the left-most digit of the lower row display the current contents of
the LED segment buffer for those digits.
All symbols referenced in this program are defined. The symbolic version of the program will run if
entered as follows. As an exercise, try to modify the program so that the upper row of LEOs and the leftmost digit of the lower row of LEOs are blank when the program is running.
Address

Symbolic
Representation

Data

PFVEC
TIME
SEGBUF
MINUTS
OECOSP
P$PORC
SETIME

=
=
=
=

24

7730
7712
776
140030
= 177444
= 1200
1000

1000
1002
1004
1006
1010
1012
1014
1016
1020
1022
1024
1026
1030
1032
1034
1036
1040
1042
1044
1046
1050
1052
1054
1056
1060
1062
1064
1066
1070
1072
1074

012706
006500
106427
000000
012737
001200
000024
005037
007730
005067
177750
112737
000007
177444
032737
001000
007730
001774
032737
001000
007730
001374
013701
007730
000301
006201
006201
042701
177700
001010
005267

Comments
;INT switch vector
;upper six bits count seconds
;LEO segment buffer
;Iocation to hold minutes count
;display decimal number
;LEO/keypad I/O port on 8255A
;subroutine to set minutes
;position program at lac. 1000

MOV #6500,SP

;initialize stack pointer

MTPS #0

;sct low priority

MOV #SETIME,@#PFVEC

;connect minute set
;routine to INT switch

CLR @#T1ME
CLR MINUTS

;clear seconds and second
;fractions
;clear minutes

MOVB #7,@#P$PORC

;turn on LEOS

LOOP:

BIT # I OOO,@#TIME

;wait for seconds to
;change

LOOP!:

BEQ LOOP
BIT #1000,@#TIME

CLOCK:

BNE LOOPI
SHOWIT: MOV @#TIME,RI
SWAB
ASR
ASR
BIC

RI
RI
RI
#1 77700,RI

BNE
INC

.+22
MINUTS

5-7

;show time
;get seconds
;mask out fractions of
;seconds
;not a new minute (BN E eLK I)
;else count minutes

Address

Data

1076
1100
1102
1104
1106
1110
1112
1114
1116
1120
1122
1124
1126
1130
1132
1134
1136
1140
1142
1144
1146
1150
1152
1154
1156
1160

177676
026727
177672
000074
103402
005067
177662
016702
177656
012700
000003
006302
010246
006302
006302
062602
077006
060201
012702
000010
004767
136656
112737
000100
007716
000725

CLKI:

LOOP2:

Symbolic
Representation

Comments

CMP

;overflow?

MINUTS,#60.

BLO
.+6
CLR MINUTS

;no (BLO CLKI)

MOV MINUTS,R2

;get minutes

MOY #3,RO

;shift minutes over three
;digits
;multiply R2 by 10 to shift
;one decimal digit to the left

ASL R2
MOY R2,-(SP)
ASL R2
ASL R2
ADD (SP)+,R2
SOB RI),LOOP2
ADD R2,RI
MOY #10,R2

;Ioop three times to make X 1000
;add minutes to seconds
;index lower display

JSR PC,@#DECDSP

;display time

MOVB #100,@#SEGBUF+4

;display dash between
;minutes and seconds

BR LOOP
= 1200

005037
007730
012706
006500
106427
000000
000717

1200
1202
1204
1206
1210
1212
1214

SETIME: CLR @#TIME

;reset seconds to increment
;minutes

MOY #6500,SP

;reinitialize stack

MTPS #0

;reinitialize priority

BR SHOWn

;display new time

As an exercise, try to modify the program so that the upper row of LEDs and the left-most digit of the
lower row of LEDs are blank when the program is running.
5.3.2

Console Subroutines

Address

Mnemonic

Description

140060

GETLIN

Get Input Line
Types an angle bracket and space (> ) as prompting characters
and awaits input from the console terminal. Echoes characters
as they are typed in. Stores these characters (up to 96 pcr line) in
a character buffer. Uses RO, R3.

5-8

Address

Mnemonic

Description

140070

GETCH

Get Character
Retrieves the character indexed by R3 from the character buffer. R3 must have a value from 0 to 137 octal (95 decimal).
Stores the character in the lower byte of RO and increments R3.
Lowercase characters are converted to uppercase. Sets the N
condition code bit if the character is a separator (space, tab,
feed). Sets the C condition code bit if the character has been
converted from lowercase to uppercase. Uses RO, R3.

140100

GETCHC

Get Character Preserve Case
1

Retrieves a character with its case intact from the character
buffer. Uses R3 as an index to the character. R3 must have a
value from 0 to 137 octal (95 decimal). Stores the character in
the lower byte of RO and increments R3. Uses RO, R3.
140104

GETNXT

Get Character, Ignore Separators
Retrieves the next character in the character buffer which is not
a separator (space, tab, feed). Uses R3 as a starting point index.
R3 must have a value from 0 to 137 octal (95 decimal). Stores
the character in the lower byte of RO and increments R3 in
accordance with the number of separators encountered. Lowercase characters are converted to uppercase. Sets the C condition
code bit if a character has been converted from lowercase to
uppercase. Uses RO, R3.

140120

CRLF

Type Carriage Return, Line Feed
Types a carriage return and line feed on the console.

140124

CHROUT

Type One or Two ASCII Characters
Takes the value in the lower byte of RO and types it as an ASCII
character on the console. If the upper byte of RO has a nonzero
value, it is also typed as an ASCII character on the console. Uses
RO.

140134

CHR02

Send Byte to Auxiliary Port
Takes the value in the lower byte of RO and sends it to the
auxiliary serial port. Uses RO.

140140

ASCOUT

Type One ASCII Character or String
Takes the value in the lower byte of RO and types it on the
console either as an ASCII character or as an ASCII string of
characters. ASCII strings that can be typed include ,
, , and "A through"_ where the caret denotes a
control character. Uses RO.

140144

PRINTA

Type ASCII String
Takes a string of bytes starting at the location pointed to by RI
and types them on the console as ASCII characters until until a
byte whose value is zero is is encountered. Uses RO, R I.

5-9

Address

Mnemonic

Description

140160

TYPOCT

Type Octal Number
Types the value in R I on the console as a six-digit octal number
if in the INSTRU or WORD output formatting modes. Types
the lower byte of R I on the console as a three-digit octal number
if in BYTE mode. Uses RO, Rl.

140164

TYPDEC

Type Decimal Number
Types the value in R I on the console as a signed five-digit
decimal number followed by a period. Uses RO, R I.

5.3.2.1 Console Character Manipulation - The console subroutines just described provide most of the
functions YOll will require to manipulate characters via the console. If you require other fUllctions, refer to
the monitor listing in Appendix A.
Keep the following in mind when using the GETCH, GETCHC, and GETNXT subroutines.
When you use these subroutines, characters you input via the console terminal are stored in a 96-character
buffer maintained by the monitor called BUFFER. All three subroutines use R3 as a pointer to determine
which character within BUFFER is retrieved. Since BUFFER is 96 characters in length, R3 can have a
value from 0 through 137 (octal), inclusive. For your convenience, the subroutines automatically increment R3 to point to the next character to be retrieved.
5.3.2.2

Using Console Subroutines - Sample Program

,
; NIM for the TEM
,
; In this version of NIM, there are 21 sticks. The game requires 2
;players (the user and the TEM). The players take turns picking up
; I, 2, or 3 sticks. The object of the game is to leave I stick for
;the other player to pick up in the last turn. The algorithm used
;by the TEM ensures that it will win if it goes second, or if it goes
;first and the other player leaves it an opportunity to win.

: Operation of the game is explained by prompts. All responses by the
;user must be terminated with a carriage return. However, several
;responses may be typed together on a line, separated by commas, and
;will be taken as needed by upcoming prompts for input.
; There are undefined symbols in this program, so if you enter the
;sym bolic version via the console terminal, make sure you incorporate
;the PASSI and PASS2 commands as described in Paragraph 4.17.5.

5-10

;•••••••••• SYMBOL DEFINITIONS •••••••••••
CLEAR ;empty symbol table
MONITR
G ETLIN
GETNXT
CRLF
CHROUT
PRINT A
TYPDEC
CR
LF
SPACE
STICKS

= 140010 ;reentry point for monitor
= 140060 ;get a line from the console
=

140104 ;get next significant character from BUFFER

= 140120 ;send , to console

140124 ;send a character to console
140144 ;print an ASCII string
= 140 )64 ;type a decimal number on the console
=

=

= IS

12
= 40
= 21.

=

;
;
;space
;initial number of sticks

,

; •••••••••••• START OF PROGRAM ••••••••••••

, = 1000

NIM:

MOY #GREET,RI
JSR PC,@#PRINTA

;print greeting message on console
;show no sticks taken yet
;(number of sticks left = STICKS - R5)

NEWGAM:CLR R5
NEW):

CLR R3
MOY #MEORU,RI
JSR PC,@#PRINTA
JSR PC,@#GETLIN
JSR PC,@#GETNXT
CMPB RO,#'M
BEQTEMGO
CMPB RO,#,Y
BEQ USERGO
CMPB RO,#'Q
BNE NEWI
JMP @#MONITR

;ask who plays first
;wait for response from console
;get first meaningful character
;m(e) means TEM goes first
;y(ou) means user goes first
;q(uit) means return to monitor
;If user has not entered a valid response,
;prompt for response again,

5-11

USERGO: MOY #LEFTI,RI
JSR PC,@#PRINTA
MOY #STlCKS,RI
SUB R5,RI
MOY Rl,R2
JSR PC,@#TYPDEC
MOY #LEFT2,R 1
JSR PC,@#PRINTA
JSR PC,@#CRLF
USERl:
MOY #400*SPACE+'/,RO
JSR PC,@#CHROUT
SOB R2,USERI

USER2:
NEXT:

;prinl header for number of sticks left
;calculate number of sticks left
;save a copy of result
;type decimal value on the console
;finish message
;start a ncw line

;put in RO the character pair "/"
;type a "stick" on the screen
;Ioop to type the appropriate number
;of slicks
;get next character
;is it a comma?
;yes, get next move from line.

JSR PC,@#GETNXT
CMPB RO,#',
BEQ NEXT
MOY #HOWMNY,R 1
JSR PC.@#PRINTA
JSR PC,@#GETLIN
JSR PC,@#GETNXT

;ask how many slicks the user wants
;get a line
;get first/next meaningful character
;on line

CMPB RO,#'l
BlO USER2

;illegal response, throwaway line and
;try again

CMPB RO,#,3
BHl USER2
SUB #,O,RO
ADD RO,R5
CMP R5,#STlCKS-1
BlO TEMGO
BHIUSER4
MOY #IlOSE,R 1
JSR PC,@#PRINTA
JMP NEWGAM
USER4:

TEMGO:

;illegal response
;convert digit in RO into a number
;add to sticks already taken away
;is only 1 stick left?
;no, it's TEM's turn
;user took too many sticks
;announce the loss
;ask a bOUl another game

MOY #GOOFED,R I
1SR PC,@#PRINTA
1MP NEWGAM

;tell the idiot that he goofed up
;and ask about another game

MOY #MYMOYE,R 1
JSR PC,@#PRINTA

;type beginning of TEM's move on
;console
;get number of sticks taken so far
;implemcnl algoritm to select mOve:
;if R5 MOD 4 ~ 0, take 2 sticks
; R5 MOD 4 ~ I, take 3 sticks
; R5 MOD 4 ~ 2, take 2 sticks

MOY R5,RI
NEG Rl
BIC #l77774,Rl
BNE TEMI
MOY #2,RI

5-12

TEMl:

ADD RI,R5
JSR PC,@#TYPDEC
MOY #MYMOYl,RI
JSR PC,@#PRINTA
CMP R5,#STICKS-l
BLO USERGO
MOY #IWIN,Rl
JSR PC,@#PRINTA
JMP NEWGAM

; R5 MOD 4 = 3, take I stick
;show how many sticks TEM is taking
;finish message
;is there only 1 stick left?
;no. it's the user's turn

;announce the victory
;and ask about a new game

GREET:

.BYTE CR,LF
.ASCII /NIM for the TEM/
.BYTE CR,LF,O
MEORU: .BYTE CR,LF
.ASCII /Who goes first" Me (M) or you (Yp (Q to quit)/
.BYTE 0
LEFT I :
.BYTE CR,LF
.ASCII /There are /
.BYTE 0
LEFT2:
.ASCII / sticks lef!./
.BYTE 0
HOWMNY:.BYTE CR,LF
.ASCII /How many sticks will you take? (1,2, or 3)/
.BYTE 0
MYMOYE: .BYTE CR,LF
.ASCII /1 take /
.BYTE 0
MYMOYI: .ASCII / stick(s)./
.BYTE 0
ILOSE:
.BYTE CR,LF,LF
.ASCII /You win!!! I demand a rematch!!
.BYTE 0
IWIN:
.BYTE CR,LF,LF
.ASCII /1 win .. ! Want to try again?/
.BYTE 0
GOOFED: .BYTE CR,LF,LF
.ASCII /You goofed up' Can you get it right this time? /
.BYTE 0
5.4 DeTIt-EM ADDRESS SPACE
OCT I I-EM address space is organized as shown in Figure 5-3. Functionally, the address space consists of:
standard RAM space, expansion RAM space. monitor space, I/O space, space available for external
hardware, and reserved space.

5-13

177777

AVAILABLE FOR EXTERNAL
HARDWARE

177600
177577

1;0 SPACE

177400
177377
AVAILABLE FOR EXTERNAL
HARDWARE

AVAILABLE FOR EXTERNAL
HARDWARE

167377
160000
157777

MONITOR

120000
117777

100000
77777
AVAILABLE FOR EXTERNAL
HARDWARE

USER RAM (OPTIONAL!

20000
17777

10000

~~~~LLLLLL~~LLLLLLLLLLLL~

7777
7400
7377
7320
7317

KEYPAD MONITOR SCRATCHPAQ
CONSOLE MONITOR SCRATCHPAD

6500
6477

SYMBOL TABLE

USER RAM

144
143

MR lDJr,O

Figure 5-3

DCTII-EM Memory Map

5-14

5.4.1 Standard RAM Space
Addresses 000000 through 007777 are allocated to the RAM that comes standard with the OCTII -EM,
This RAM space is utilized as follows,
Addresses

Use

000000-000143

Interrupt and Other Vectors, Contains vectors that point to
service routines for various interrupt. trace, and trap conditions,
See Chapter 6 for specific vector addresses,

000144-006477

User RAM Space, Space available for user programs,

006500-007317

Symbol Table (Console Monitor Only), Can contain up to 66
user defined symbols,

007320-007377

Console Monitor Scratchpad, Area for use by the console
monitor.

007400-007777

Keypad Monitor Scratch pad, Area for use by the keypad monitor and console monitor,

If you are using only the keypad, thc symbol table and console monitor scratch pad areas arc available to
you as user RAM,
The monitor ordinarily protects certain areas of RAM from direct alteration, If you are using the keypad
only. the keypad monitor scratch pad is the only area of protected RAM, If you are using a console
terminal, however, the symbol table, console monitor scratchpad, and keypad monitor scratch pad are all
protected, You can remove protection by activating special function 4 from the keypad (see Paragraph
lI2,5),
-";ote that "protection" refers only to protection from direct aiteration, such as examining a location from
the keypad or console and then trying to change the location, An executing program can violate any RAM
location, To avoid unpredictable results, therefore, make certain your programs do not inadvertantly write
data into areas not available as user RAM,
5.4.2 Expansion RAM Space
If you insert two 2 K X 8 RAMs into the expansion sockets (sec Paragraph 5,3), another portion of user
RAM space at locations 020000 through 027777 becomes available to you,
5.4.3 Monitor Space
The monitor space is the space occupied by the keypad and console monitors which reside in two 8 K X 8
PROMs at locations 120000 through 157777,

5.4.4 I/O Space
Locations 177400 through 177577 are designated as space for the OCTII-EM's I/O chips, The 8255A
parallel port, the 8251 A auxiliary serial line. and the DC319 OLART console serial line all use this space,
The I/O space consists of locations that can be written only and locations that can be written or read,
Figure 5-4 provides a detailed breakdown of how the I/O space is used,

5-15

177577
177566
177564
177562
177560

DLART TRANSMITTER DATA BUFFER
DLART TRANSMITTER COMMAND/STATUS REG
DLART RECEIVER DATA BUFFER

177552
177550

8251 STATUS REGISTER
8251 RECEIVER DATA BUFFER

177544
177542

8255 PORT C IINPUT FROM UPPER 4 BITS)
8255 PORT B 18-BIT INPUT]

DLART RECEIVER COMMAND/STATUS REG

READ/WRITE
I/O SPACE

177500
177477

177452
177450
177446
177444
177442
177440

8251 CONTROL REGISTER
8251 TRANSMIT DATA BUFFER
8255 COMMAND REGISTER
8255 PORT C 10UTPUT TO LOWER 4 BITS)
8255 PORT B (8-BIT OUTPUT]
8255 PORT A (8-BIT OUTPUT)

WRITE ONLY
I/O SPACE

177400
MA

Figure 5-4

103~1

Map of I/O Space

5.4.5 Space Available For External Hardware
The foJlowing space is available to you for any expansion hardware you may wish to design:
040000-077777
160000-167377

167600-177377
177600-177777

An example of a piece of external hardware that could use this space is a RAM board which responds to
addresses 040000 through 057777. Further information on hardware expansion is provided in Chapter 6.

5.4.6 Reserved Space
The shaded space in Figure 5-3 is reserved and unavailable for use. The addresses affected are:
010000-017777
030000-037777

100000-117777
167400-167577

5-16

CHAPTER 6
HARDWARE

6.1 INTRODUCTION
The DCTII-EM hardware is organized as shown in Figure 6-1. In general, the hardware consists of:
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•

The DCT II-AA microprocessor
RAM
Monitor EPROM
Peripheral chips and drivers
An internal data bus buffer
User buffers
Microprocessor control signal decoding logic
Address latching and range decoding logic
Peripheral chip address decoding logic
Interrupt logic
Timing logic
Miscellaneous control logic
Keypad/LEOs and supporting logic
The HALT and INT push-button switches
Connectors

The paragraphs that follow provide information on each of these. Refer to the DCT II-EM schematics in
Appendix B for further details.
Paragraph 6.17 contains a design for an expansion memory board you can build.

6-1

INT2

ECAS)--'
CONTROL
SIGNALS

TCLK-"
\~ICROPROrESS()R

RDY--

~

CONTROL
MICROPROCESSOR

VI

INn
INTF
INTA
INT7

LIN~S

kVJL

HALT

E:DMG

PF
--.

~

IN16

EAI<~

STATE
DRIVER

V

INTB

OMR

~

DAl<1500>

==:>

USER
CONTROL BUS

TRI·
STATE
DRIVER
iUSER
BUFFERI

h

ECAS

~

h

ARD' 7, ARD03, ARDO)

BUFFER

,I I

L ___________________________________

~~;~N

HBOIR _ _

--y

lBOIR -------to

~

L-

I:lKX8
PROM
: LOWER BYTE,

t== h

0\
I

1::\/vRH-,-

s~
AROOO

N

6116P-2

RAM
!UPPER BYTEI

6116P2
2K X 8

RAM
EVVRL

-.-+-

LOWER BYTE!

I

k::=
k::= ~ tJJ
08<15.08>

51
SOCKET
OPTIONAL
2K X 8

'lV

'fV

,.....,....-

EVALUATOR

~
o

~

""'

c:J

HALT

LPF

ROY

KCW

c

~

08<15'00>

DLART-

82S5A
PORT

"'""'"

,

HUH

LCLK -----.
EDBIN~

SAL<02'01>~

BC!.R ______

OC319

L.

DLART
CONSOLE
SERIAL
LINE

~ ;'~

INT2
INTF

UPPER BYTE!
L, lOP

52
SOCKET
OPTIONAL
2K X 8

E

k~

RAM

L-

PC3--.

8251 A
AUXILIARY
SERIAL

D8<07:00>

iLOWER BYTE'I

• V

CHIP
DECODER
LOGIC

E:

CONTROL~

L..1..-..INT6
1NT7

r-r--

SIGNALS
v

LINE

TCLK2~,-----tI

PERIPHERAL

I--

AUXILA.RY
CONNECTOR
IJ3<

I
6
R ...,......

---v
3

; --,.....

MISCEllANEOUS
CONTROL
LOGIC

riMING
lOGIC

DlSO, DLSI

Figure 6-1

DCTlI-EM System Block Diagram

E5EL
ROY
INTA
ERo

CONSOLE

PU

~

ECA52

SALI,,~L8DIR

ElA
DRIVERS

BRCLK
DLA.RT
PP1

,

CON mOL

08<0700>

~

o

::;;C:"" ~-I

RAM
I

AD< 15'00>' ' \

AD<15.00>

EDBIN--------e
ESEL-----+lL.._ _ _----'

EVVLB-----'

L

A.

A

USER
OATA BUS
BUFFER

DALEN -----tI,L-_ _ _-"

,~

[RD

CONNECTOR
IJ1'

t:

'CLK

T~LK ) H
DCLK

6.2 DCTI I-AA MICROPROCESSOR
The DCTII-AA microprocessor is the heart of the system. A detailed discussion of the operation and
architecture of the DCTII-AA is beyond the scope of this book. Refer to the DCTlI-AA User's Guide
(EK-DCTII-UG) for this information.
At power-up or when a RESET instruction is executed, the DCTII-AA mode register bits are set to the
following states and cannot be changed.
Mode
Register Bits

State

Mode

<15:13>

000

Start address ~ 140000
Restart address ~ 140004

12
II

User

o

10

9
8

16-bit bus
4 K/16 K memory

o
o

Dynamic memory
Normal read/write
Standard microcycle

o

COUT

~

processor clock

This mode configuration has the following implications:
•

Bit < II > ~ I - This allows you to usc either 8-bit or 16-bit data paths in your expansion
circuitry designs. If 8 bits, simply use the lower 8 bits of the 16-bit bus.

•

Bits < I0:09> ~ 10 - This allows you to use inexpensive 16 K dynamic RAMs for off-board
memory expansion (see Paragraph 6.17).

•

Bit <8> ~ 0 - This allows you to design expansion hardware with devices that respond to either
normal or delayed read/write controls. If you use devices that respond to delayed read/write
controls, include delay circuitry in your design.

NOTE
Do not use a RESET instruction in your program
unless your program reconfigures (i.e., reinitializes)
your peripheral chips. RESET causes the DenlAA to assert - BCLR which resets the peripheral
chips.

6.3

RAM
There are two 2 K X 8 CMOS static RAM chips in the basic DCTlI-EM which provide 4 K bytes of
memory space. These RAMs respond to addresses 000000 through 007777. Even numbered or low bytes
reside in one RAM, and odd numbered or high bytes reside in the other.

There are two expansion sockets on the board which can accommodate two additional 2 K X 8 static
RAMs. The RAMs in these sockets respond to addresses 020000 through 027777. One RAM stores low
bytes and the other stores high bytes.
6-3

Although the OCT II-AA generates refresh cycles as a result of being set to dynamic memory mode, this
is for the benefit of off-board expansion with dynamic RAMs. The on-board static RAMs ignore the
refresh cycles.

6.4 MONITOR EPROM
The OCT II·EM monitor is contained in two 8 K X 8 EPROM chips. The EPROMs respond to addresses
120000 through 157777.
Note that accesses to memory locations above 100000 cause a single cycle slip. This is not only for the
benefit of the monitor EPROMs, but also for the peripheral chips and any slow expansion hardware which
may be attached. Cycle slips are disabled if the jumper is installed (see Paragraph 2.5), If you install the
jumper, make sure you also decrease the microprocessor's 7.5 MHz clock frequency to a value between 3
MHz and 6 MHz by changing the crystal.

6.5 PERIPHERAL CHIPS AND DRIVERS
The peripheral chips are the 8255A parallel port, the DC319·AA DLART console serial line, and the
8251 A auxiliary serial line. The DLART and the 8251A have EIA drivers associated with them so that
they can communicate with RS232·C devices. The locations reserved for use by the peripheral chips are
listed in Table 6·1.
Table 6-1

Resened I/O Locations for Peripheral Chips

Location
Number

Location
Type

177566
177564
177562
177560
177552
177550
177544
177542
177452
177450
177446
177444
177442
177440

Read/write
Read/write
Read/write
Read/write
Read/write
Read/write
Read/write

Read/write
Write only

Write only
Write
Write
Write
Write

only
only
only
only

Use
DLAR T transmitter data buffer
DLART transmitter command/status register
DLART receiver data buffer

DLART receiver command/status register
8251A
8251 A
8255A
8255A
8251 A
8251 A
8255A
8255A
8255A
8255A

status register
receiver data buffer
port C (input from upper 4 bits)
port B (8-bit input)
control register
transmit data buffer
command register
port C (output to lower 4 bits)
port B (8-bit output)
port A (8-bit output)

6.5.1 Parallel Port (8255A)
The 8255A parallel port chip has two 8·bit ports and two 4·bit ports, all independently controllable. Port A
(8 bits) is dedicated to supplying LED segment data to the LED segment drivers. Port A is configured as
output only. Port B (8 bits) is initially configured as an input port and is available to your expansion
hardware via the 60-pin connector. You can configure port B as either an input port or an output port. Port
C is really two independent 4·bit ports. The upper four bits of port C are dedicated to sensing keypresses
and are configured as input only. The lower four bits of port C are dedicated to turning on the LEOs and
enabling the keypad. These lower four bits are configured as output only.
For detailed information on programming the 8255A, refer to the Intel Component Data Catalog (availa·
ble from Intel Corp., 3065 Bowers Ave., Santa Clara, CA 95051). The order number is 210298·001.

6·4

6.5.2 DLART Console Serial Line
The DLART (DC319-AA) is an asynchronous receiver/transmitter which the DCTII-EM uses to communicate with a console terminal.
The DLART can generate receiver, transmitter, and break detection interrupt requests. See Paragraph
6.11 for more information on interrupts.
The 800 Hz clock output of the DLART is used to generate the INTA interrupt request which causes the
LEOs and keypad to be activated. Again, see Paragraph 6.11.
Detailed information on programming the DLART is contained in the DLART Data Sheet (ED-23181).
6.5.3 Auxiliary Serial Line (8251A)
The 8251 A auxiliary serial line chip is a universal synchronous/asynchronous receiver/transmitter
(USART) which the DCTII-EM uses for general purpose asynchronous serial communications. Typically.
the auxiliary serial line is used for communicating with a host computer.
The auxiliary serial line features modem control. The Data Carrier Detect and the SYNDET functions of
the 8251A, however, are not used in the DCTII-EM.
For detailed information on programming the 8251A, refer to the Intel Component Data Catalog (available from Intel Corp., 3065 Bowers Ave., Santa Clara, CA 95051). The order number is 210298-001.
6.6 INTERNAL DATA BUS BUFFER
The internal data bus buffer is not accessible to you directly but is the buffer through which most of the
data in the DCTII-EM passes. It buffers DAL<15:00>, the microprocessor's primary data bus.
6.7 USER BUFFERS
The DCTII-EM has three user buffers. One buffer provides access to DAL<15:00>, the main internal
data bus. Another buffer provides access to AI<7:0>, the microprocessor's address interrupt lines. The
third buffer provides access to various DCTII-EM control signals. These buffers arc directly accessible
through the 60-pin connector. See Paragraph 6.16 for the names of the specific buffered signals available.
6.8 PROCESSOR CYCLE DECODING
There is some decoding logic that takes microprocessor control signals and combines them to direct the
operation of various chips within the DCTII-EM. Some of these decoded signals are available to you
through one of the user buffers. See Paragraph 6.16 for the names of these buffered control signals.
6.9 ADDRESS LATCHING AND RANGE DECODING
Memory addresses are latched from DAL< 15:00> when the microprocessor asserts ERAS L. As shown in
Figure 6-1, the upper three bits of the latched address are converted (decoded) to signals which enable
pairs of on-board ROMs or RAMs.

6-5

Decoded address range signals are also available to your expansion hardware via the 60-pin connector.
These signals are ARD02 L, ARD03 L, and ARDI7 L. Figure 6-2 illustrates the address ranges to which
these signals correspond.
177777 , - - - - - - - - - - ,
110 SPACE AND
SPACE AVAILABLE
TO EXTERNAL
HARDWARE

160000
157777

}

ARD 17

}

ARDIX

1-----------1
MONITOR

EPROM

120000 b770=777770=77777777'71

117777

NO CHIP ENABLE
SIGNAL AVAILABLE
}

}AROO3

}AROO2

}AROOl

}AROOO
'-'Fe 1DJ53

Figure 6-2

Address Range Decoding

6.10 PERIPHERAL CHIP ADDRESS DECODING
The peripheral chip decoding logic is similar in function to the address range decoding logic (see Paragraph
6.9). The difference is that this logic generates peripheral chip enable signals instead of memory chip
enable signals. Peripheral chips are enabled according to the addressing scheme shown in Paragraph 6.5.
The peripheral chip decoding signals are internal to the DCTll-EM and are unavailable for expansion
hardware.

6.11

INTERRUPTS AND TRAPS

Interrupt vectors are located as shown in Table 6-2.
Interrupts are encoded and sent to the DCTII-AA for handling. The DCTII-AA also handles DMA
requests and external vector requests via the interrupt logic.
Some of the interrupt vectors above point to a "null" service routine. That is, they simply point to an RTI
instruction. These include the power-fail, DLART transmitter, external, and 8251 A transmitter interrupts.
If you do not write your own service routines and change the interrupt vectors accordingly, these interrupts
will have no effect.

6-6

Table 6-2

Interrupt Vector Locations

Interrupt
Vector
Priority

Address

000024
000060
000064
000100
000104
000120

4

4
6

6

5

000124

5

000140

7

Type of Interrupt

HALT switch and HALT instruction
Nonmaskable power fail interrupt (caused by pressing JNT switch)
DLART ,oceiver (I"IT3)
DLART transmitter (INT2)
External interrupt ((NTB)
Keypad/LED scanning (I ~TA)
8251 A receiver (1"11'7)
8251A transmille, (INT6)
OLART receive, b,oak (lNTF)

Other vectors include the following.
Vector Address

Description

000010
000014

Illegal instruction trap
Breakpoint and trace service

6.12 TIMING
Fundamental timing signals are generated by:
I.
2.

A 7.5 MHz crystal oscillator which drives the OCT II-AA microprocessor
A 614.4 KHz clock which drives the DLART.

The 7.5 MHz signal is also divided down to 1.875 MHz to drivc the 8251 A auxiliary serial line. These
signals are unavailable for external use.

6.13 MISCELLANEOUS CONTROL LOGIC
There are pieces of logic spread throughout the OCT II-EM that generate miscellaneous control signals.
The only signal that the miscellaneous control logic makes available to you is the signal ROY L, which,
when asserted, causes a single cycle slip. Note that the installation of the jumper disables the on-board
generation of ROY L.
6_14 KEYPAD/LEDS
The keypad/LEOs combination communicates with the rest of the DCTII-EM through the 8255A
parallel port peripheral chip (sec Paragraph 6.5.1). Note that the lower four bits of port C arc decoded and
are used to drivc the LED anodes and keypad simultaneously. These lines are asserted sequentially in
response to the INT A interrupt request.
6.15 HALT AND INT SWITCHES
The opera ton of the HALT and INT switches is explained in Paragraphs 3.9 and 3.10, respectively. To
summarize, pressing the HALT switch asserts the HALT signal which restarts the keypad monitor and
unconditionally stops whatever operation was in progress. Pressing the INT switch asserts the PF signal
which causes a power-fail interrupt. Power-fail interrupts have no effect unless you write a service routine
(vectored by location 24) to handle the interrupts.
Both HALT and PF are available to you via the 60-pin expansion connector.

6-7

6.16 CONNECTORS
There are four male connectors on the DCTll-EM as follows.

Connector
Jl

Number
of Pins

J2

60
4

13
J4

25
25

Function
Connector for expansion hardware
Power supply connector
A uxiliary serial line
Console serial line

J I, 13, and J4 are all standard size connectors. 12 is the connector you assembled when you installed the
DCTll-EM.
The pin assignments of these connectors are listed in Table 6-3.
Table 6-3

DCTIl-EM Connector Pin Assignments

60-Pin Connector for Expansion Hardware (JI) (see Figure 6-3)
Pin
Number

Signal

Name

Description

I
2

ADOO H
ADOI H
AD02 H
AD03 H
AD04 H
AD05 H
AD06 H
AD07 H
ADM H
AD09 H
ADIO H
ADII H
ADI2 H
ADI3 H
ADI4 H
ADI5 H
AIO H
All H
AI2 H
AI3 H
AI4 H
AI5 H
AI6 H
AI7 H
GND
RESET L

AD<15:00> is the buffered version of DAL<15:00>, the bidirectional multiplexed data/address lines of the DCTlI-AA.

3
4
5
6
7

8
9
10
II
12
13
14
15
16
17
J8

19
20
21
22
23
24
25
26
27

28
29
30
31
32
33
34
35

PBO H
PBI H
PB2 H
PB) H
PB4 H
PB5 H
PB6 H
PB7 H
HALT L

Al<7:0> is the buffered version of the DCTII-AA's Al<7:0> address interrupt
lines. Output only. During DMA transactions, these lines are set to the high
impedance state.

Buffered control signal. Output only. Corresponds to the DCTII-AA's -BCLR
signal.
PB<7:0> arc the bidirectjon~1 port B lines of the 8255A parallel port chip.

Asserted when HALT switch is pressed. Open collector.

6-8

Table 6-3

Dent-EM Connector Pin Assignments (Cont)

60-Pin Connector for Expa.nsion Hardware (J 1) (see Figure 6-3)
Pin
Number

Signal

Name

Description

36

PF L

Asserted when INT switch is pressed. Open collector.

37

DMR L

External DMA request line. Input only.

38

tNTB L

External interrupt request line. Input only.

39

VEC L

External vector request line. Input only.

40

PI H

Buffered control signal. Corresponds to the DCT11-AA's PI signal. Output only.

41
42

GND
ARD02 H

Decoding signal ror the address range

43

ARD03 H

Decoding signal for the address range 060000-077777. Output only.

44

ARDI7 L

Decoding signal ror the address range

45

lACK L

Buffered control signal. Interrupt acknowledge. Output only.

46

DMG L

Buffered control signal. DMA acknowledge. Output only.

47

SELl H

Buffered control signal. Corresponds to DCTII-AA's SELl signal. Output only.

48
49

SELO H
WLB L

Buffered control signal. Corresponds to DCTII-AA's SElO signal. Output only.
Buffered control signal. Correspcnds to DCT1 I-AA·s R/-WlB signal. Set to
high impedance state during DMA. Input or output.

50

WHB L

Buffered control signal. Corresponds to DCTII-AA's R/-WHB signal. Set to
high impedance state during DMA. Input or output.

51
52

GND
RAS L

53
54

GND
CAS L

Buffered control signal. Corresponds to DCTII-AA's -CAS signal. Output only.

55
56

GND
DBIN L

Buffered control signal. Read enable line. Output only.

57
58

GND
COUT H

59
60

GND
RDY L

040000~057777.

160000~177777.

Output only.

Output only.

Buffered control signal. Corresponds to DCT! l-AA's -RAS signal. Output
only.

Buffered control signal. Correspcnds to DCTII-AA's COUT signal. Output
only.
Causes single cycle slip when asserted. Open collector.

6-9

T.ble 6-3

DCfll-EM Connector Pin Assignments (Cont)

Power Supply Connector (J2)

Pin

Number
I
2
3
4

Signal
Name
+12VDC
+5VDC
GND
-12VDC

Description
Power signal
Power signal
Power signal

Auxiliary Serial Line Connector (J3)

Pin
Number
I

2
3
4
5
6
7
8
9

Signal
Name

FGND

21

22
23
24
25

Frame ground

pcso

Serial da ta

PCSI
PRTS

Serial data in
Request to send
Clear 10 send
Data set ready
Signal ground
Not used
Not used
Not used
Not used
Not used

PCTS
PDSR
GND

10
II
12
13
14
15
16
17
I~
19

20

Description

Oll t

Not used
Nol used
Not used

Not used

PDTR

Not used
Not used
Not used
Data terminal ready
Not used
Not used
Not used
Not used
Not used

6-10

Table 6-3

DCnt-EM Connector Pin Assignments (Cont)

Console Serial Line Connector (J4)

Pin
Number

Signal

Name

Description

1

4

FGND
DLSO
DLSI
RTS

5
6
7

GND

Ffame ground
Serial data out
Serial data in
Request to send (always ON)
Not used
Not used
Signal ground
Not used
Not used
Not used
Not used
Not used
Not used
Not used
Not used
Nat used
Not used
Not used
Not used
Data terminal ready (always OJ\)
Not used
Not used
Not used
Not used
Not used

2
3

~

9
\0

11
12
13
14
15
16
17
18
19

DTR

20
21

22

23
24
25

59
0

z
a

57

55

53

51

0

0

0

G

0

0

0

0

z

z

z

z

49

47

~

g:

r

I

:;;

45

"

,n
r

43

41

>

0

§

0

>

z

39

~

n
r

37
0

<
>
r

35
I

~

r

33

3'

29

27

25

v

~

v
~

v
~

~

•

0

I

I

I

I

•

z
0

23

21

19

•• •" •
I

I

17

15

13

,.

• 9•
•

>

•

~

6

9

I

I

N

I

I

>

n

a

n

S

zr

~

m

r

r

r

,
0

a

I

60

58

~

56

>

54

>

•

52

~

I

~

r

50

~

Ii
I

48

a

<

a

>
>

§

r

I

44

42

r

46

>

>

~

,
I

z

~

~

r

~

r

• ~•

v
~

~

I

I

I

~
I

~
~
~

~

~

>

>
w

~

• •
~

~

I

I

I

I

~

w

I

I

>

r

40

38

Figure 6-3

36

34

32

30

28

26

I

24

"

20

60-Pin Connector Pin Assignments

~

C
I

>

~
I

9

>

• • •8
• ~ § a
>

8

8

I

I

•

I

I

I

~

8

•§ 8• §•

I

I

I

I

8

6

4

>

" " " " "

>

8

~

I

2/
PC BOARD
..,

~

'Ol',~

6.17 HARDWARE EXPANSION - EXAMPLE
If you plan to develop and run large programs, one of the first expansion hardware circuits you may want
to build is a memory module. Figure 6-4 shows a design for a 16 KB module.

The module responds to addresses 040000 through 077777. The address range decoding signals, ARD02
Hand ARD03 H, are used to enable the module.
Note that the signal names on connector J 1 of the memory module are in the opposite order as those
shown on connector JI of the DCTII-EM. This scheme eliminates the need to twist the interconnecting
cable.

6-11

16K x 1
2118
AI7 H
AI6 H
AI5 H
AI4 H

13
10
11

12

AI3 H

A6

74LS244

DOUT

14

A5
14

A4

14

1i17

E1
AI1 H

WHBL---':""OE18~

RAS
15

.F

AD 15 H

15

AO

RAS L
74 LSOO

2-..J

i'dJ 14 H

11
13

Al

AI2 H

1 Yl

1 A2

1 Y2

CAS

18
16
14

1 Y3

1 A3

A3
A2

lAl

12

AD 15 H
AD 14 H
AI) 13 H

1 A4

1 Y4

2Al

2Yl

AD 11 H

2A7

2Y2

AD 10 H

2A3

2Y3

AD 9 H

2A4

2Y4

AD 8 H

AD 12 H

E3

:N
DBIN L

E4

16K x 1
2118
AI7 H
AI6 H
AI5 H
AI4 H

AD101"~

0\
I

tv

E16

2

I

II

13
10
11

12

74LS244
14

lAl

1 Yl

A5

lA2

1 Y2

A4

1 A3

1 Y3

A3

1 A4

lY4

A6

AI3 H

A2

AI2 H

Al

AI1 H

AD

DOUT

~,.

E2

13

15

17

RAS

I

ARD 2 L

I

I

14

WLB L

12
AD 4 H
AD 3 H
AD 2 H
AD 1 H

2A4

2Y4

AD 0 H

lG

2G

DBINL~

14

AD 5 H

2Y2

I

ARD 3 I

AD 6 H

2Y3

E6

DIN

I

14

AD 7 H

2A2

W
j

16

2A3

14

CAS

LAS L------{)I _ _ ""'\ __

2Yl

18

AD
AD
AD
AD
AD

15
14
13
12
11

H
H
H
H
H

45
46
47
48
49
50
51
52

AD 10 H
AD 9 H
AD 8 H
AD I H
AD 6 H

53
54

AD 5 H
AD 4 H
AD 3 H

55
56
57

AD 2 H

58

AD 1 H
AD 0 H
AI7 H
AI 6 H
AI 5 H

14

AI 4 H
AI 3 H
AI 2 H
All H
PI H
ARD 2 L
ARD 3 L
WLB L
WHB L
HAS L
CAS L

NOTE. CONNECT A 047 fJ-F CAPACITOR BETWEEN +5 V AND GROUND FOR EACH IC

DBIN L
E20
8
-+5V
E22

Figure 6-4

16 KB Memory Module

h

r:=t; I~~
Jl

APPENDIX A

MONITOR LISTING
T-11 Evaluation Module Monitor MACRO V05.00
Table of contents

11-

4
2
3
2

15-

2

17-

2
2
2

2-

35-

20-

27323435363739-

44~5-

48~9-

5157-

5859-

Sunda~

13-l'tar-83 04:10

Defini lions

Scratch?ad locations in hi::lh RAM
Console Serial Line Support Routines
General I/O Support Routines
Host Line SUPF-ort Routines
110 Initiali:aliclri .!rid LED Driver

LED DisPla:l Support Routines
Error Condit.ion and StarliJP Entr':l Code

2
2

Eotrs Points

2
2

Key COlllland Routirles

2

Console Monitor

2
2
2
2
2
2
2
2
2

Parsing Routines
Directive and \'erb Handlin;! PDuhrli?s
S1Jlbol and label HandliM ROIJtinE':Arithaetic Routines
Instruction Encode/Decude ROIJtine::.
Conversion and T':Ipeout. Routines
Power-up Diagnostics
Special Dah Structures
Spare locations, Check.'3uII" and ROI'l I.D,

Ke':lpad l1onit.ol'
Special Ke'::Spad Monitor F!Joct.ioll'3

A-I

T-11 Evaluation ModulE! Monitor MACRO V05,QO SlJnd.;':l !3-/1u-S3 04:10 PasE' 1

2
4
5
6
7
8
9
10
11

12
13

14
15
16
17
18
19

20
21
22
23

E','AL~A::OII

1-11

3

NODULE HOmeR

Version 1.0

OIGlTAL
;
;
;
;
;
;

COPYRIGHT eCI 1?32 BY
CORrORArJa,v, MAYNARD,

fOOlP~£NT

~A5S.

THIS SOfTIlAAE IS fURNISliED UIIDER A LICENSE AND HAY BE USE!' AliD ':CPlEf'
OlU IN ACCOR!lAHCE WITH THE TERMS Of SUCH LICEIISE AND WITH TH,
IHCLUSI~ OF THE AIIOVE COPYRI5HT NOTICE. THIS SOfTWARE OR AllY OTHER
COI'IES THEREOF IIA! NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO AllY
OTl£R P!:R~, NO TITLE TO ANP OWIIERSHIP OF THE SOfTWARE IS HERHY
TRANSfERRED,

; TIE IIF_TION IN THIS SOFTWARE IS SU8Jm TO CHAlIGE WITHOUT NOTICE
; IIHD SI«lIJl.D HOT 8£ CONSTRUED AS A COHmHENT BY DIGITAL EDUIPHEIH
; CORPalATION,
; DIGITAl ASSUKES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
; SOFTWARE ON EOUIPHENT WHICH IS NOT SUPPLIED BY DIGITAl,

24

A-2

T·11 Evaluation Hodule Konitor MACRO VOS. 00 Surod .. 13-lIar-83 041\0 F'ag:e 2
I
2
3
4
5
I>
7
8
9
10
11
12
\3

.TITLE T-II E,a1uation
.IDENT 100.0011
.S8TTL D.finitions

~odul.

"onltor

0%0
oIl
012
0%3
014
oIS
oIl>
017

;RE'sisters

==0204

00060
00064
00120
00124
==100
==104
==140

;power fail vector, called b~ INT button
,DlART receiver interrupt vector
;OlART trans5litter interrupt ·...eoctor
;8251 receiver interrupt vector
;8251 translitter irlterruF-t vector
;unCOllitted interrupt v~ctor
;lEn displa~ interrupt vector
;OlART brea~_ interrupt vector

P$PORA
"'PORI
PIPORD
PIPDRC
PIPIlRD
PICREG

==177440
==177542
==177442
==177444
==177544
==177441>

;8255
;port
;F-ort
;port
;port
;8255

port A (write onl~)
B (read onl~) available to user
B (write orll~) available to user
C (write orlly) controls bits 3-~
C (read onl~) reads bits 7-4
Calland register (write on1':))

177550
177450
177552
177452

AIRBUF
AIXBUF
AISREG
AICR£G

==177550
==177450
==177552
==177452

;8251
;8251
;8251
;8251

receiver data buffer (reao onl~)
translitter d

CIRCSR ==177560
CIR8UF ==177562
CIXCSR ==1775M
ClXooF ~=177566

RO

000000
000001
000002
000003
000004
000005
000006
000007

Rl
R2
R3
R4
RS
SP
PC

000024
00001>0
000064
000120
000124
000100
000104
OOOHO

PFVEC
COHIN
CDNOtJT
AUXIN
AUXOUT
USER IV
LEDIV
COH8R1(

177140
177542
177442
177444
177544
177446

H

IS
11>
17
18
19
20
21
22
23
24
2S
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

A-3

iDlART receiver co~.and/status resiste~
iDlART receiver data butfer
iDlART trarrslitter cOlund/status resister
iDlART translitter data buffer

1-11 EYaluation "adult
Definitions

~onitDr

MACRO V05.00 Sund•• 13-Ho,-83 04:10 PaSi! 3

I

2
3
4 000000
5
6
006500
7
a
007320
9
10
006500

.SBTTl 5cratchpad locatlons in hish RAM
.ASECT
SCRPDl

==

TBlTOP --

IUR

==

SCRPDlt620

;bottol of default console lonitor scratcl'.
idefault s~lbol table--66. s~lbol capacit~
ao,. of sVlbol table, 2 words of nale scratch

6500

HBlTOP-(66.W

6500

;7000

11

12
13
14
15
16
17
18
19
20
21
22

23
24
25
26
27
28
29
30
11
32
33
34
35
3.
37

;console lanitor fiaS bvte

start at even address

007324
007325
000001
000004
000010
000020

lINfl6 ==
lASLIN -F.SST!
F.lUl
F.SAVX
F.COM

TBlTOPH
llNFl6t1
=001
=004
=010
=020

related to parsins of whole lines
;sayed flass trol previous line
;line contained STEP CDaland
;1ioe is (functional1~) elPts
iwe have siyed eX?f for double para. coalands
;we are in a COilent, iSnore characters

007326
007327
000001
000002
000004
000010

CURCOH -lASCOH ;;::;
F.HHEH
F.VIIlU
F.UNDF
F.USRD

lASLIN+1
CURCOHtI
=001
=002
=004
=010

;current Calland flass
;sayed flB.!!S trol previous cOllland
;was an instruction In910nic
ian undefined sVlbol or directive
;expression doesn't contain undllfined
iwas a user defined sVlbol or label

007330
007331
000002
004000
000100

TItPHOD -PERHOD -f •AIlS
F.VT
F.INST

lASCOHII
THPHOD!!
=002
=(400.010>
=100

F.BYTH =200

icurrent output lode flass
;perlanent output lode fla~s
;ibsolute values, not s~lboIic Qutput
;yt .ode on or off
'instruction output
;if neither ASCII nor instruction, then nUleric
ib!:lte .ode

000200

;fla~s

007332

EXPflG

--

PERHODtI

icurrent expression flass

007333

lEVEl

;:

EXPFlGtI

;parenthesis level in expression

lS
39

pairs~-lUst

A-4

s~lbols

T-II Evaluation Hodul. Honitor HACRO V05.00 Sunda. 13-Har-83 04:10 Pa;. 4
Scratch,ad location, in hi;h RAH
1

2
3
4

'Dther variables:
007334

ADVAIIR ;;

LEVEL+!

idue to the varied uses of this location, a

5
;coIPlete list is in order:
iDOCR: When dlJll",in!l locations in response to a , the next address

6

7

atter that which has been dUIPed is saved in case the next

B
9

cOUiind line reQuests another dUll"',

10
11
12

I?IIIPt!::l COllland

lines.

il.BYTE. I.WORD. GETIHS. ,ubroutin., of GETINS:
Thlsf routines use ADVADR as a rurlflin9 COf!::l of the clJrrent
address. The current address! as stored in UlADDI\, lust not
be changed as successivE' values are deposited into RAM b:l a
si~le instruction or directive, because this would alter th~
yalUf ot the dot (.) s~bol (current location refer'eoC'e).
HWJSYftI:uses A[lVADR to sa . . e R2, which points to the naif to bi:' defined,
while the value to be eouated is parsed. The vallJ~ saved irl
1':2 is an index to the nalW on the left of the eOIJals sisn. if
the nail is one of the predefined s~.bols or a user s~lbol that

13

14

15
16
17
18
19

20
21
22
23

;

hiS

ilread~

bePn defined.

HYPREG:USfS ADWtDR as a pointer to ii'll;' list of retisters to be t:lped.
;EFND: uses ADVADR to save the upper search ranSe li~it before pijrsinS
the value and task paraleters.

24

25
26
27
28

The Iy'alue of ADVADR need

onl'::l be kept intact between two successive

007336

SAVOP --

ADVAl*t2

;saved expr value for double paraleter cOllands

007340
007341

COUNTI -COUHT2 --

SAVEXP+2
COUHT1fI

icounter for upper level routines
;counter for lower level routines

007342
007343

HODE
!FERAT

CooNT2+!
HODEl!

;addressing lode scratch--Iusi be even address
;save OPerator here irl ey.pressions

007344

CHTLC

OPERATt!

iCNTLC set to 1 when console t!:!!pes "'c arTd
iF.APPL is set, leanin~ that the
jcurrentl~ running prosral has a nc handler

007345

DElIH

CHTle!1

;the ,ASCII directive stores the deliliter here

41
42
43

007346

!lOTTO!! --

DELIm

inow at 7346, botio. at console lonitor stack
;(,00501£1 lonitor has 38 word slack
iHOTE: intenupts need UF' to 11 slad. locations

H

007400
007462

SCRPAD -STACK

BOnOHt32
SCRPADW

inow at 7400, boltoli of Ke'ol?ad lonitor scratch
;2S word staCK for ke'olpad (torli tor

007462
007464
007466
007470
007630
007631
007632
007672
007673
000200
000100

TBlBOT
HF8251
REPEAT
BUFFER
BP
FP
HOSTBF
HFP
HSTFlG

29
30
31
32
33
34
35
36
37
38
39
40

45
46
47
48

49

50
51
52
53
54
55
56
57

STACK
STACK ! 2
STAt! + 4
REPEAH2
::::
BUFFERt140
BP+1
FPtl
-HOSTIlft40
-HFPI1
F.lOAD ;200
F.LDST ;100
--;;
--

A-5

tP'ointer to bot tOt ot s'oIlbol table space Hi use
i6251 lode f1a;,
;console lonitor cOllland line repeat counter
;96 character console line input buffH
ibuffer back pointer, lust be even address
;butter torward pointer, lust follow Br
;32 character host input buffer
;buf'fer forward pointer
ihost

f1a~5

H :: takiM input fro. host
i1 :: lookiml for .START to besirl loading

1-11 Evaluation Module "onitor ItACRO 005.00 Sund •• 13-H.,-83 04:10 Pa1e 4-1
Srratrhpad locations in high RAH

5B
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73

74
75
76
77
78
79
BO
B1
B2
83
84
85
86
87
BB
B9
90

000001

r.ms -001

i1 ;: : igr.orin9 lIessaSe fro. host ib'::lie

---

buc~.etl

007674
007676
007700
007702
007704
007706
000001
000002
000004
000010
000020
000040
000100
000200
000400
001000
002000
004000
010000
020000
040000
100000

PWRFVS
KEYPIV
KEYPVS
USERVS
DEINCE
FLAGS1

HSTFLGtl
PWRFVSl2
KHPIVI2
KEYPVSI2
USERVSI2
-DESNCH,
-F.DATA -000001
F.CHAN -000002
F.ADM -000004
F.REG -000010
F•BIlKS -000020
F.FUNC -000040
F.USER -000100
F.SST -000200
F•BIlKA -000400
F. BRKG -001000
r.KEYP -002000
F.I/OST -004000
F.APPL -010000
F. TBAS ;020000
FoPl/OT -040000
F.PAS1 -100000

isave user's power fail vector here
;ke'::lpress service vector
;save use~Js ke~~ress vector here
isave user's interrupt. vector here
jKe~pad debounce resister
,flaS bits, defined as follows
i1 ; data entr'::l lode
11 ;: : nUDe-ric ~.e~ pressed a:ft.er opeflin5 locatiorl
11 ; address entr~ !lode
it = resistH selecliorl Mdt'
;1 ; breaKPoint selection Mde
; 1 ; special function sel",d:c'~1 lIIode
; 1 ; executirlS user code
i1 ; sinsle stepping
it :; breakpoints active' irlstalled)
it ;: : clJrrentl,:, steppiM over a breakF"oirlt
;1 ;: : running console lanitor
11 ;: : accE!ftiA§ console tO~iands fro~ Doth ports
;t ;: runnins F'rOSr.31 ~ith "C handler
i1 ;: : print address break point is at
;1 = lonitor scratch protection disabled
;1 = console larlitor f'ASSl lTIode actiYe

007710
000002
000010
000020
000040
000200

CONFlG

--

;coflsole line flags, lust be even addrf's;
icorltrol S pressed, executiorl slJsFenderJ
;prosrallable baud rate stored herl?

007711

AUXFLG

007712

F.STOP
F.CPBO
F.CPSI
F.CPB2
F.A6IX

FLAGS1I2
-002
-010
=020

-040
-200

;aux port lode word bit, selects lbX or b4X

CONFLGIl

iCDP'=' of what has been writtfm to A$CREG

SmUF

AUXFLGIl

007726

SPCLBF
TlHE
--

SEG8UFIl4
SPCLBF+2

00m2
007734
00m6
007740
007742

IRO
IR1
IR2
IR3
--IR4
1R5
ISP
-IPC
-IPS
IWATCH -IADDR
BRKFIL

;6 word se91ent data buffer for LED dis~la~s
B11SO o':lte for IJPH!r di~pla';s:' l,}w tor lower
;1 word butter for special 2 character dlspla~
;upper 6 bits COlJot bO seconds, lower 10 (OIJfl1.
;eishthundredths of seconds
;save user context here

:;:;

91

92
jJ

94
95
96
97
98
99
100
101
102
103
104
105
106
107
108

oomo

007744

007746
007750
007752
007754
007756
007760

TlMEt2

IROl2
iill2
IR21l
IR312
$R4+2

IR512
tSP+2
IPCll
IPStl
IWATCH"
IADORt2

A-6

iwatchpoint address
;clJrrent ~ddress
ifile of tour brea;.point addr-esstcontents pairs

T-11 Evaluation Module Honitor "~CRO \105.00 Sunda, ll-"'r-Sl 04:10 Page :)
Scrltchpad locations in hi~h RAH
2
3
4
5
6
7
B
9
10
11
12
13133000
14 133002
15 133004
16 133010
17 133012
18 133016
19 133020
20 133024
21 133030
22
23 m032
24 133036
25 133040
26 m044
27 133046
28 133052
29 133054
30 m062
31 133064
32 133070
33 mon
34 133100
35
36 133102
37 133106
38 133110
39 133116
40 133122
41
42 133124
43 133130
44 133132
45 133140
46
47 133142
48 133146
49 133152
50 133156
51 133160
52 133164
53
54 ml70
S5 133172
56 133174
57

.SBTTl Cor.sole Se-rial Lirle SUN'ort Routines

•

133000

133000

H+
UHEIN answers console input interrupts and buffers the inco.ins char.cters.
The characters '1, "C, "'0, "0, "9, and "Y and trapped in this routine.
j--

010046
010146
113700
100375
013700
100005
012700
004767
000457
042700
001454
120027
001454
120027
001461
132737
001407

LIHEIN: :/tOV
ItOV

177560

u:

177562

ItOVB
BI'l
ItOV

BI'l

000007
000510
177600

5f:

2':

000003

"OV
JSR
SR
SIC
BEn
C"PB

sm

000031

C"PB
BEG
Bm
BEG
C"PS
SHE
BICB
BR

000002 007710

120027 000021
001345
142737 000002 007710
000433
120027 000023
31:
001006
152737 000002 007710
106427 000200
000730

C~B

SHE
BISB
"TPS

DR

120027 000017
4t:
001004
152737 000001 007673
000413

CMPB

8$:

HOV8
SIC
CHPB
BHIS
MOVB
INCB

113701
042701
120127
103320
110061
105237
012601
012600
000002

007631
177400
000140
007470
007631

9$:

aHE

BISB
8R

MDV
MDV
RT!

ROdSP)
Rlo-ISP)
ItcIRCSR.RO
11
IICIRlUf .RO
21
1007.RO
PC.ClIROl
~

;preserve sOle resisters tor scratch
iread console receiver slalus resister
fin polled lOde, wait tor a character
,read console receiver
;00 error bits set
;ar. error. Qutf'ut 
HSl\Ofeo

Chiricter r contimle

;clear all but 7 bits
1177600.RO
;ignore ASCII nulls
91
tis it "C?
RO.1003
61
i':fes
;is it "Y?
RO.1031
;~es
71
If.STOP,@ICOHfL6;ar. w' .aitin. for "0'
ina
31
;Is it ... O?
RO,1021
ina, wait for one

If

IF.STOP.@ICOHFl6;cl •• r "S fla.
;ignore character, continue
91

iis it "S1
ina
tF.STOP,gtCOHflGist!t "S flag to susper.d execlJtioo
,accept other interrupts while suspended
1200
fwait for "Q
11

RO.1023
41

iis it "O?
RO,IOll
ino
81
IF .nTIo!IHSTfLG;turn on host lin, b,t. buck.t
91
@IFP,Rl
1177400,RI
Rhll40

SI
RO,SUffERIRIl
@IFP
ISPlt,RI
ISPlt.RO

;set buffer input pointer
;prevent sign extend
iis bufter full? (96 characters)
;~es, send  until a SE"lIIiCDlor; is fOIJnd Off the line.
Control characters to the riSht of a sellicolorl {i,e. within a 'colil",erlt ' ) Jre
£lrhoed invisibly so that the user ran echo control seOIJencE"S to tht:, (onsol>~

9

10
11

12
13

14
15
16
17
lB
19
20
21
22
23
24
25
26
27
2B
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

l@rlinal.
Uses:

BP Index to BUFFER location just beyond last fetched character
(which is the location that contains the fi rs.t charocler iL
the new Ii ne )

Returns:

DP

Cleared

R3

Cleared

BUfFER locations indexed bs entry value of Br throu~h the end 01 the
buffet re~lace contents of locations at the be~inning of the
buffer

Adjusted to index the new next available location in the butte I

FP
j--

133240 105037 007324
133244 00471>7 000200

GETLINllCLRB
JSR

@!lllnG

133250
133254
133260
133264
133270

u:

PC,CRlF
1400*040t076,RO
PC,CHROUI
@tFP,R3
2t
PC,[CHO

llJ272

133276
133304
133306
133312
133314

004767
012700
OM767
123703
001775
004767
126327
001367
105037
005003
000207

000250
020076
000244
007631
000644
007467 000015
007324

JSR
It6\I

JSR

2t:

em
BEQ
JSR
CMPB
BNE
CLR!
CLR
RTS

PC,PURGE

; reset line parsing flags for flew line
;purse botto. of butter! clear rtJnniM pointer

;start a new line
it ... > 

isee if a character has been t~pe~
wait for one
;echo character to console
BUFFER-1(R3ht01S
lis last character a '01
2t
,no, wait for on~
@tlINFlG
;reset line fla~s frol ECHO
;set rfJrmin9 ?ointer to be~irlniM of line
R3
PC
'return to caller

A-8

;f'tCtJ

1-11 Evaluation

"o~JI.

"ani tor "ACRO

vos.ao Sunda, 13-Har-83 04:10 ra., ,

Console Serial line Support Routines
2

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 133316
20 133322
21 133324
22 133330
23 133332
24 133336
25 133340
26 133344
27 133346
28 133350
29 133352
30
31 133354
32 133360
33 133362
34 133366
3S 133370
36 133374
37 133376
38 133400
39 133402
40 133404
41

itt

GETCH rebielJes C'hara('t~f's fro. t~e input buffer usiM RJ as a(l index.
The character is placed in the lower 7 bits of ROt Lower c~se chQi'aC'ters
afe folded to upper case. The N flag is set if the characler is a separator
(space, horizontal tab, verticill tab, line feed, or foftl teed) arid the C flag
is set it the character has been folded, U?Ofl entr~, R3 lust inde~: a b':lte
within the console input buffer (F:3 < 140 octal or 'n. decil31l.
Usest

R3

Index to I'le>:t character in console i,lfllt byffe-r (PUFFER)

Returns:

RO

Contains character fetched fro. BUFFER in

R3

upper bits cleared
Set to PfPvjQijS value t 1
S£ae cODenls above

N,C

lO!ole~

7 biL,

j--

116300 007470
005203
120027 000011
103423
120017 000040
001403
120027 000014
101003
000270
000241
000207
120017 000141
103407
120027 000172
101004
162700 000040
000261
000401
000211
000250
000207

GEICH:: KIWB

INC
C"PB
8LO
CHP8
BEG
CHPB
8HI
2~:

81.HERIR3hRO
R3
RO,tOll

;~S,

set a character--bit 7 should be clear

;15 it less than  or lower?

;r!()1 check for lower case

SEN

iflas a separator

ClC
~$:

RIS

PC

CMPB
BlO

RO,1141
31
RO,II72

CMPi

3$:
S~:

BHI

3~

SUB
SEC

1040,RO

8R
ClC
ClN

S~

RTS

PC

it lower case 'a"?
ina, don't fold
ii5 It lower case I Z'?
;'''lOr don't folf.!
;fold to up~er case
;15

iflaS folded character
itlag a norial character

A-9

T-ll Evaluation Hodul. Monitor MACRO V05.00 Sunday 13-Har-83 04110 Pa •• 8
Consol~

Serial Line Support Roulines

2
3
4
5
6
7

.ENA9l lS9
iff

GETlCH recovers the lost

R3

Uses:

recentl~

set ten character.

Index to location in BUFFER Just

be~ond

character to be

returned

B

9
10

Returns:

11

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

R3
RO

Elmal to previolJs value

H,C

(S•• h.ad.r of GETCH rout in.)

COntains fetched character in lower 7 bitsr upper bits cleared

j.-

133406 005303
133410 000742
133412
133416
133420
133424

004767 177700
103002
062700 000040
000207

GETlCH: :DEC

BR

R3
G£TCH

;6ETCHC is like GETCH except it doesn't fold lower case.
PC , GEICH
Bet:
a
2':
t040,RO
ADD
a:
RTS
PC
GETCHC: :JSR

itt

GETNXT is like BElCH except it doesn't return separators.
(See

usa~e

intor.alion of SETCH)

j--

133426 004767 177664
133432 100775
133434 000207

GETHXr:: JSR
BKI
RTS
.DSABl
iff

GET8P places the back pointer in R3 and prevents sisn extension. This is
useful to refelch characters fro. a line (providing BP still indexes the
be~innin9 of the line),
Uses:

BP

Index to be transferred to R3

R3

Contains value in BP

Returns!

44

45
46
47
48 133436 113703 007630
49 133442 042703 177400
SO 133446 000207
51

PC,GETCH
GETNXT
PC
lS9

;--

GETBP:: ttOVB
BIC
RTS

@IBP,R3
t177400,R3
PC

A-JO

!-11 Evaluation ""dule Monitor MACRO V05.00 Sunda. 13-Mar-83 04:10 PaSe 9
Console Stria1 Line Support Routines

1
;H

2

PURGE shifts the input butfer to eliainatf spare b~low BPf the back pointer.
Console in~ut interrupts are blocked while the shift is occurring, R3, the
running pointer, is cleared.

3

•

5

6

7

Uses!

Index of first localion to be kept in console
flocatiorls below BUFFERHBP] are overwritten)
Index of ti r5t urtused locatiorl in BUFFER

BP

8

9

FP

in~ut

buffer

10
11

Returns:

12

BP

!3

R3
Ff

14

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

Cleared
Cleared
Indexes new flrst unused location in BUFFER

;--

133450
133452
133456
133462
133464
133470
133472
133500
133502
133504

1067.6
106427
004767
005000
120337
103006
116360
005200
005203
000767

133506
133512
133516
133520
133522

110037 007631
105037 007630
005003
106426

PURGE:: MFPS

0003.0
177754

007631

"T1'5

2.:

007470 007470

u:

000207

JSR
CLR
ClIPS
BHIS
ItOVS
INC
INC

isne priorih

-(SP)

.340
pt.GETBf
RO

;disable interrlWts telPorarih

R3,@tfP

iset back pointer
iaab a pointer to the botlo. of the buffer
ihas en\ire buffer been transferred?

11

;~es

BUFFER{R3),BUFfER(~O)

BR

RO
RJ
21

HOV~

RO.~tFP

CLRB
CLR
KTPS
RTS

~'BP

Itrinsfer a character

ifix forward pointer,
Iback pointer,
tand runniM pointer
;r@~tore priorits

R3

(SPlt
PC

3.
35

Ht
CRLF sends a carriOl!le return and liOt' feed to the console (and printerl.

36

37
38
39
40
41
42 133524 012700 005015
43

Returns!

RO

Contains sarbase (400 t 15 + 12)

j--

CRtF:: KOV

t'OO'OI2+015.RO .. 

A-II

I-II Evoluotion Hoaul. Honitor HACRO V05.00 Soodo, 13-Hor-83 04:10 POi. 10

Console Serial line Support Routines

2
3
4
5
6
7
8
9
10
11
12
13 133530
H 133534
15 133536
16
17 133540
18 133544
19 133546
20 133552
21 133554
22 133562
23 133564
24 133570
25 133572
26mm
27 133600
28 133606
29 133612
30 133620
31 133622
32 133624
33

iH

CHROUT outputs the lower b~tt of RO to the console, and to the iJU>: port
it toe printer port bit is set. If the upper b~te of RO is non-zero,
it is also sent to th@ ~Drt(5). CHRDl outputs onl~ the lower b~te ot RO,
and CHR02 CMI be used to Oyu-ut a character to the am:. part onI':I.
Uses:

Lower b':lte contains first ASCII character to be output

RO

Upper bYte contains zerlJ or secontj character to be output
j--

004767 000004
105700
001431
105737 177564
100375
110037 177566

000423
1327J7
001774
105737
000240
106746
106427
112737
110037
113737
106426
000300
000207

.EHA8l LS8
CHROUI: :JSR
PC , CllROI
RO
ISIB

JEO
CHR01!: 1518

BPL
HOVB
BR
000004 177552 CHR02:: Bm
BEQ
177552
ISTi

11

1004,@IA$SR£6
CIIR02
~IA.SREG

iis DSR active?

1$

ichfc~

;~laceholder for above line
;save priotit!:;l
1340
jblock interrupts while we
1047,@IMCREG ienable aux port trans~itter
;output a character
!lOve RO, !IA.XBUF
@tAUXFLG,@IAS-CREG ;restore pre-yiolJs aux port cOlllland word
HOVB
(SP)I
;restore p!·iorit~
HIPS
SWAB RO
PC
RIS
.DSABL LSD

HFPS
"IPS
HOVB

u:

.1\0

console translitter stalus register
;wait until trans,itter read~ bit is set
;lhen output a character
ina, done
its aux port traos.itter e8pt~?
;00, wait until it is

@IC$XCSR
CHROI
RO, !IC$XBUF

NOP

000340
000047 177452
177450
007711 177452

ioutput lower half of RO
;i5 there a second character?

-(Sf)

A-12

T-ll E'il.i\ion Module Monitor MACRO V05.00 Suod., 13-H,r-S3 04:10
C~ole

Serial

lin~ SU?~ort

r,ge

11

Routines

I
2
3
4
5
6
1

.S8TTL General 1/0 SUPPort

Routin~s

itt

ASCOUT outputs the character in RO to the porUs) if it is not a control
chararhr. If so, t.he special seauences ' . . A' thrOIJ!lh ,,,_. ifE! sent with
exceptions , aM <[lEL>.

8

9
10

Uses:

11

Returns:

12
13
14
15
16
17
IS
19
20
21
22
23

RO

Lower 7 bits conlair! character to be printed

RO

Contains !larbage

j--

133626
133632
133636
133640
133644
133646
133650
13365-4
133656

042700 177600
120021 000177
001413
120027 000040
101331
001416

120027 000033
001422
000300
24 133660 062700 040136
25 m6M 000721
26
27 133666 012700 042074
28 133672 004767 177632
29 133676 012700 046105
30 133702 ooom
31
32 133704 012700 051474
33 133710 004767 177614
34 133714 012700 037120
35 133720 000703
36
37 133722 012700 042474
38 133726 004767 177576
39 133732 012700 041523
40 133736 004767 177566
41 133742 012700 000076
42 133740 000670
43

Ra.I!77

;.ake RO a 7-bit character
;is it delete?

BfD

II

;!:ffSr t!:Wf

CllPB
8HI

RO.'040
CIIROOT
5l
RO.I03l

ASCOUr: mc
ClIP!

8£0

cm

u:

ItOV
JSR
MOV

1400*104+074.RO ;\,.e (D
PC.CHROUT
1400*114tl05.RO ;\,.e EL

MOV
JSR
HOV
HOV

JSR

u:

j~ke spaces visible
;i5 it escape?
;'Jes., t':4pe 
ino, t'Jpe . . (letter)

CHROU!

DR

3S:


H 5 it control1
;00' t'JP't' it nor.al1~

BEO
SWAB
ADD
8R

DR

Sf:

t177600.RO

*OV
JSR
MOV

DR

3l

RO

t400tl00t136,RO ;.ake it second character after ......
iand hpE! it

..

1400*123t074.RO ;\"e 
CHROUT
1400*I05+074.RO ;\,.e  R1.

4
5

blarl~. b~te.

6

Uses:

The string lIust end '.n th

Rl

Paints to strins of

Rl

f'oiflts to bste just be':lond first

o~tes

<3

to be printed

7

Returns:

B
9

10

b~te

j--

11

12
13
14
15
16
17
18

133750
133754
133756
1J3760

004767 177564
112100
001374
000207

•(NA9l
JSR
P1UH1A: :lIOVi
iHE
R1S
.OSABL

u:

LS9
PC.CIIROI
(Rll+.RO
If

PC
lSi

A-14

a character frol string
;print it

;~et

in s.trins containing zero

T-ll Evaluation Kedul. "onitor KAtRO V05.00 Sunda. 13-"ar-83

0~:10

Page 13

General 110 Support Routines

H+

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

PRINT outputs

radix-SO strins pointed to

b~

R2. The string lust end wi til

PRINTl outputs a sinsle radix-SO triplet in Rl.
PRINT2 outputs a pair of ra~i~-~O triplets pointed to by R2. No teninalor
is needttd.
PRINTJ outPuts the lost significant radix-50 character in Rl and lultiplies
il bo; 40. (PRIHT3 is ,all.~ 3 til" b. PRINT!.!
Uses:

12

Points to RAD50 string to b. printed (PRINT)

Rl

Contain~

Points to RADSO Fair of words to be Pt'into?G (PRIIH2i

Contains

RAD50 triplet to be printed (PRI~Tl)
~AD50 character to be ?rinted (f'RINT3)

ReturM!

R2

Points to next word after blank word in RAD50 slrin3 iPRI~T)
Points to word atter the pair of yards printed (PRINT2)

Rl

Contains z.r. (PRINT, PRINT1, PRINT2)
Conuins (previous valut of Rl> ttOI! 1600 .• 40. (PRINT3)

j--

133762 00~767 000016
133766 012201
133770 001374
133772 000207

.ENABl
JilA
PRINt:: "OV
BHE
RTS
.DSABL

133m 012201

PRIHT211"OV

2J

24
25
26
27
28
29
30
31
32
33

~

a blank word.

a:

00~767 000004
35 13~010 oom7 000000
36
37 13~OH 005000
38 13~016 005200
39 13~020 162701 003100
40 13~2~ 103374
41 13~026 005300
42 134030 062701 003100
43 13403~ 004767 000062
44 134040 005700
45 1340~2 001413
46 13~0~4 020027 000033
47 13~50 103413
48 114052 001415
49 134054 020027 000035
50 134060 001415
51 134062 062700 000022
52 13~066 000167 177436
53
54 134072 012700 OOOO~O
55 134076 000773
56
57 lWOO 062700 000100

jt~Pe th@ triplet
i ... t • triplet

1$

inot the end 'lilt

PC
LS8

"OIl

(R2)t.Rl
PC,PRINT!
(R2)j,Rl

;!klt a triplet
a~pe it
;!iet another

PRIHTt:lJSR
PRIHl4: JSR

PC,PRINT3
PC,PRHIl3

;t~e

PRIMm :CLR
1$:
INC
SUB
BCe
DEC

RO
10
150*50,Rl

jljlyide by successive subtractiorl

JSR

133776 004767 000002
134002 012201

3~ moo~

LSB
PC,PRINT!
(R2)t.Rl

ADD

6$:

JSR
TST
BEQ
C"F'
BlO
BEG
C"P
BEO
ADD
J"P

2$:

HDV

3$:

1$

RO
150*SO,Rl
PC,RIX40
RO
21
RO,1033
3$
41
RO,1035
51
1022,RO
CHROUT

the first character
;and the second

to subtract 1600.
;worked, no borrow
ifix RO
iand R1
ilultip," RI •• 40

;tr~

;0 .eans space
;032 leans Z

iA throu~h Z
;033 leans $
;035 is undefinedl but type
;0

throu~h

9 and ","

1040,RO
61

,t':ipe

BR

ADD

1100,RO

jA throlJ!ih Z

A-15

SP.J(:E!

*

HI [yolu.han HoduJe lIoni!or HACRO VOS.OO Sund" 1)-Har-B] 04:10 P.;. 13-1
General 1/0 Support Routi~es
58 134104 000770

59
60 134106
61 13m2
62
63 13m4
64 134120
65
66 134122
67 134124
68 134126
69 134130
70 134132
71 134134
72 134136
73 134140
74

BR

61

HOV

10H,RO
61

it'Jr-e J

HOV

t052,RQ

,l'::lr-e

BR

61

012700 000044
000765

4t:

012700 000052
000762

5.:

006301
006301
006301
010146
006301
006301
062601
000207

RIX40:: ASl

8R

Ann

Rl
Rl
Rl
Rl,-ISP)
Rl
Rl
ISP)t,Rl

RTS

PC

ASL
ASL
HOV
ASL
AS!.

A-16

*

;.ultipl~

,save
;32

Rl b'::l S

ax

x

;~1U5

S Xaakes 40 X

T-11 Evaluation Module MonItor MACRO V05.00 Sundo. 13-Hor-B3 04:10 Po;, 14
General 110 Support Routines
2
3
4
5
6
7
B
9
10
11
12
13
14
15
16
17
lB
19 134m
20 134146
21 134152
22 134154
23 134160
24 \34162
25 134160
26 134172
27 \34174
2B 134200
29 !l4202
30 134206
31 134210
32 134214
33 !l4216
34 134224
35 134232
36 134234
37 134240
3B 134242
39 134246
40
41 134250
42 134252
43 134256
44 134262
45 134264
46
47 134266
4B 134270
49
50 13.4272
51 134276
52 134302
53 134306
54 134312
55
56 134314
57 134320

iff

ECHO reads the line blJtter as characters are t!:!ped in arid echoes thel
to the corlsole (and printer, if s~lected). Control characters are echoed
as ~(letter) exce~t within COllents. LINFlG is used to record co..ent status.
If ECHO enCOlJnters "R, "u, ~Xr or  is found.

Uses:

Index to first character in ~UFrER to be echoed
Io(lI.'x to er.d of data in buffer

R3

rp
Returns:

Index to location in IIUFFER losicall':! just be~ond last echoed
b.t, (This leans RJ returns zera if ~U or "X wa~ the lost
character in the buffer! etc.)

R3

j--

116300
120027
001447
120027
001002
012700
120m
001450
120027
001432
120027
001453
120027
001003
152737
132737
001006
004/;\7
100404
004767
000403

007470

ECHO:: ItO'IB

000022

CHP~

;type

7$:
6$:

INC
JSR
CHPB
BlO
RTS

R3
PC.CHROUT
R3.@lfP
ECHO
PC

;advance runnins pointer
it'::IPl! non-printable characters as
; have we echoed e>'efythiM?
ino, do so~e ~ore
;~s, continue

171:

INC
RTS

R3
PC

;step past 
rand return

a:

JSR
JSR
JSR
HTPS

PC.l01
PCd51
PC.GETBP
tOOO

8R

a,

;SOlf COIlon code
;reaove "R frOB line
'sO back to the besinniM
,take characters again
f arid echo line

JSR
JSR

PC. 101
PC.GETBP

;SOlf

000177
000073
000020 007324
000020 007324 5':
177152

005203
004767 177252
120337 007631
103727
000207
005203
000207
004767
004767
004767
106427
000761

f'C.GElCHe
6.
PC. ASCOUT
B'

3.:

000015

177360

000172
000210
177130
000000

004767 000150
004767 177m

;:Hot character
hs it ~R?
;~St r.t!:lpe line
iis it ~X?
;110
;Iap . . X to ~U
;is It "U?
j~e~, carlcel line
jis it ?
;~es! stap echoins characters

BED
CHPB
BHE
HOV
C"PB
BED
CHPB
BED
CHPB
BED
C"PB
BNE
BISB
Bm
SNE
JSR
BHI
JSR
DR

000030
000025
000025

BUFFERlR3hRO
RO.tOn
11
RO.1030
31
1025.RO

14$ :

at:

2$:

RO,t02S

2.
RO.1015
171
RO.I177
41
RO.t07J
5.

;is it (DELETE>'
;~s, delete last chara('~r
jis it a s@lic-olon
ina

tF,COHM,@tlINFlGi!:lesr show we afe in a ('olient
tF.Cmtl'l,~tLlNFlG;are we in a cOllent'?
;~eSj echo char~cters literall!:!
7'

A-17

non~~rintable

characters

Yisibl~

the~

COlton code

,gO back to the bottol of the buffer

are

T-ll EVilualion Module Honilor HACRO V05.00 Sunda, 13-Mar-83 04:10 Pa •• lH
General 110 Support Routines
58 134324
59 m330
60 134334
61
62 134336
63 134342
64Um6
65 134352
66 134354
67 13\356
68 134364
69 134366
70 13m2
71 134370
72 13H02
73 134406
74 m412
IS 134416
76 134420
77 134424
78 134430
79 134434
80 134440
81 134444
82 134450
83 134452
84 134456
85 134462
86 134466
87
BB 134470
89 134474
90 134500
91 134504
92 134510
93
94134m
95 134514
96 134522
97 134524
9B 134530
99 134532
100 134536

HOVe
MTPS
RTS

R3,@tFP
1000
PC

;lndicate butfer eapts
aa~,e characters a!iain
j~ait for ne~ characters

HTPS
JSR
CHPS

Bn

1200
PC,151
R3,@UP
91
R3
tF •VT, THPIIlD

BEQ

200.

HOV
JSR
HOV
JSR
HOV
JSR
BR
HOV
JSR
HOVB
JSR
Hova
CHPB
BNE
CLRB
JSR
HTPS
BR

tlO,RO
PC,CHROU!
140,RO
PC,CHROU!
110,RO
PC,CHROUT
2101
1134,RO
PC,CHROU!
BUFFER(R3loRO
PC,ASCOUT
BUFFER(R3loRO
RO,t073
131
mJIIFLG
PC,151
tOOo
BI

;don't take chuacters while buffer is fi;.;ed
ireaove  frol line, decrellient FP
;is there an!:lthiM to delete?
ino, continue
;back UP to character to be deleted
;see if video lode
;branch if not
isend bad.space

10$!

HTPS
JSR
JSR
CLRB
RTS

1200
PC,ASCQUT
PC,CRLr
itLINFLG
PC

110300
15.:
11.060 007471 007470 16$:
005200
120037 007631
103771
105337 007631
000207

Hova
HOVB
INC

jset 2 scratch copy of runnins pointer
R3,RO
BUFFERtl(RO),BUFFER(RO) ;r..ov~ I ,h.ract.r fro. ,uffer
RO
RO,@lFP
Hs that ever~thiM?
;nOt do lore
16$
,fi}: Ff'
UFf'
PC

110337 007631
106·427 000000
000207
106m
004767
120337
001443
005303
032767
001415
012700
004767
012700
004767
012700
004767
000410
012700
004767
116300
004767
116300
120027
001002
105037
004767
106427
000673
106427
004767
004767
105037
000207

000200
000H4
007630

4$:

BED
DEC

004000 052744 100$:
000010
177132
000040
177122
000010
177112
000134
177100
007470
177166
007470
000073
007324
000030
000000

000200
177126
177020
007324

200.:

2101:

13$:

9.:

cm

BLO
I!£CD
RTS

A-IS

;send space
;send backspace
;S~,lP

prir.ter '\

itspe "\"

.

jget deleted charaeter
itspe it
;check if we deleted a "i"
i~es, so we arE-n't irl a COlllDent an':cIlllore
; relove deleted charad~r fro .. buffer;ta~.e character-s agairl
jecho rest of line

idor,'t take characters for a while
iecho the special character
;start a new line
iinitialize fla9s

T-l1 Eyaluation Kodule Monitor HACRO VOS. 00 Sunda. 13-Ha,-93 04:10 Page 15
110 Support RoutInes

Ger~ral

.S8TTL Host line SUPPort Routines

2
3
4

itT

HOSTIN answers aux. f'ort receiver interrupts and butters the inco.ins
characters in HOSTBF (up to 32 characters). "p, "C. "'5, arid "'Y are ignored
cOlinS frol this port. When the buffer becolles half-flJll (16 characters},
a "'s is sent to the ho~t,

S

6
7
9
;~-

9

10
11 m540
12 134542
13 134544
H 134550
15 m556
16 134560
17 134564
19 134566
19 134572
20 134574
21 134600
22 134602
23 13460.
24 134610
25 134614
26 134620
27 134624
28 134626
29134632
30 13463.
31 134642
32 134644
33 134652
34 134654
35 134660
36 134664
37 134670
38 134676
39
40 134700

010046
010146
113700
132737
001050
042700
001464
120027
001453
120027
001450
120027
001445
113701
042701
120127
103036
H0061
105m
120127
103435
132737
001031
IOM66
·012700
004767
152737
000417

HDSTlH: :HDV
IiOV
HOVI
177550
BITB
000060 177552
BHE
177600
BIC
BED
CltPB
000003
BEO
CHPI
000031
BEO
CHPB
000023
BED
HOVB
0071>72
177400
BIC
CHPB
000940
BHIS
HOVa
007632
INCB
007672
cm
000020
BlO
IIlB
000002 007673
BNE
HTPS
000006
HDV
000023
JSR
176664
BISB
000002 007673
BR

113701 007711

3$:

41 134704 052701 000020
42
43
44
45
46
47
49
49
50

134710
13UI4
134722
134726
134732
134736
134740
134742

HOm
113737
012700
106466
004767
012601
012600
000002

177452
007711 177452
2$;
000007
000006
176602

u:

HOVa
DIS
HOVa
HOVa
HDV
HTPS
JSR
HOV
HOV

RO,-ISP)
RJ,-ISP)
@tAIRBUF,RO
t060,@tAISREG
31
tl77600,RO
It

RO,tOO3
21
RO,t031
21
RO,I023
21
UHFP,RI
1177400,RI
RI,I40
2f
RO,HOSTBF IRI)
@IHFP
Rl,120
II

;F-reserve soae resistf'rs for scratch
the character, reset interruFt
;friliM or overrun error?
;~es, beep coosole, and ignore character
;clear all but 7 bits
;isnore ASCII nulls
; isnore "C
;~et

;ane! "Y

;and "5 so that host line traps the sale chars
ias console line, e.en though ignored
;get the host buffer input pointer
;prevent sign extend
iis bufter full?
;~es, beep the co~solel ignore erl"or
;no, store character
,advance the pointer
ii, buffe, half full'

;00, retlJtrl
tF.STOr,@tHSTFlG;have we alread~ sent ...s to O(l:.t?
;~s., return
II
;restore priorit~ in case another chat coaes in
6ISP)
;send ~s tu host
t023,RO
PC,CHR02
tF.STOP,~tHSTFLGi5how

we have done so

II

,get saved COP~ of ASCREG
@IAUXFl6,RI
;add the error reset bit
t20,Rl
ireset errors
Rt.UAfCREG
irestore to norlal
@IAUXFlG,@IAfCRE6
,beep t~,e console on err-or
lOOI,RO
irestore priorit~ in cas.e ulother char
6ISP)
PC,CHROI
(SP)t,RI
; restore reSistei':'
ISP)hRO

RTI

A-19

COlles

in

T-l1 Evaluation Module Monitor HAtRO VOS.OO Sonda. 13-H.t-a3 04:10
Host Line Support Routines

16

H+

2
3
4

HGETCH !:lets a character frol the host input buffer and shifts the buffer down
one character . If the buft~r is reduced frol 16 or lore characters to jU5t
four, a ~a is sent to the host • Do not call this routine if no characters
are available in HOSTBF (i.e. HFP = 0),

••

6
7
a
9
10

Uses!

11

Returns!

HFP
Index to next available location in HOSTBF
F.STOP Status (las =1 if a ~S has been sent to the host

Lower b~te contains the first character in HOSTEr, upper byte
contains si~n exlensiorl of bit 7
Decteaented to index new next available location in HOSTFF
HFP
F.STOP Cleared if ~O was sent
RO
Cor,hins !Urba!le
RI

12

13
H
15
16
17
IS
19
20
21
22
23
24
25
2.
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
4a
49

P.~e

i--

HGETCH: :ClR
/IOVB
11:
INC

134744
134746
134752
134754
134760
134762
134170

005001

134772
134774
135000
m004
135006
135014
m016

10674.
3';
106427 000340
-4$!
120137 007672
103005
116161 007632 007631
005201
000770

135020
135024
135026
135034
135036
135044
135046
135052
llSOS4
135056
135060
m062
135066

5S:
105m 007672
005000
123727 007672 000004
101006
132737 000002 OOn7l
001402
012700 000021
2$!
106426
112601
005700
001405
004767 176466
142737 000002 007673

113746 007632

005201
120137 007672
103004
116161 007632 007631

cm

OOO77Q

135074 000207

6$:

RI
@tHOST9F,-(SP) ;save the first character in buffer

Rl
Rh@IHFP

iare we too close for cOifart?
;yes, disable interrupts before doiM this orle
HOSTBF(Rl),HOST8F-l(Rl) jshift down one character
1$
jdo entire buffer UP to one less than HFP

BHIS
HOVB
BR

3$

HFPS

-(SP)
;save Priority
;disable interrupts to prevent sc:reW'JPS
t340
Rl,@IHFP
;are we really done?
,YeS, all characters transferred
5.
HDSTBF (Rll ,HDSTBH (Rl) ishift down one character

ms

CKPB

BHIS
HOV!
INC
9R

om
CLR
CKP!
BHI
BIT)
BED
HDV
HTPS

RI
U

!IHFP
RO
@lHFP,14

;adjust buffer

i~ut

pointer

BICB

ihave we reduced to just four
;1\0
tF.STDP,~IHSTFLG;.nd ••5 -S sent'
;00
2.
;put ~Q in RO
t021,RO
(SP)t
;restore priorit~
(SPlt.Rl
;recover character
;did we decide to send ~a?
RO
ina
6'
PC , CHR02
;~s, send ~a to host
tF.STDP.itHSTFLGisho• • e have don' so

RTS

PC

HWI
TST

BED
JSR

2.

A-20

characters~

I-II E"aluation "oduJ. "onito,

~RO

VOS.OO Sund., 13-"a,-83 04:10 Pa" 17

Most line Suf.F1lrl Routines
2
3
4
5
6
7
8

.SBTTL 110 lni halization ind LED Driver
it!

IOIMIT asserts the RESET L line on the board,
corlti!:luration of the peripheral chips.

a 16X clock, so that its baud rate will be eQual to that I)f the console port.
The RS-232 control output sisf)als are left deassertE'd, anI;! the aux. F"orl
receiver and lranslitler are left disablea. SETtlXl is lilE' SETAX2, e}~cert

10
11
12

that the clock divisor of the aux, port is set to 16 if RO :; 0 upon entrsl
or 64 if RO ; 1. A 64X clod, leans that the am:. port balJd 'I'ilte will be
one fourth 01 the consol~ ~rt b~ud rat~t

13
j--

135076
135100
135106
135114
135120
135124
135126

000005
112737
112737
105037
105037
005000
112737

135134
135142
135150
135154
135160
135166

112737
152737
063700
110037
112737
000207

IOINIT: :RESET

000212 177446
000010 177444
177560
177564

cm

t212.HPICREG
tOIMtplPORC
mfRCSR
"CIXCSR

SHAW CLR
000200 177452 SHAn: "ova

t200.~'AICRE6

IUlVB

"OW
ClRB

000100 177452
000002 007464
007464
177452
000020 177452

RO
1I00.@tAICREG

"OV~

12.~IHFa251

IISi
AOD
IUlVB
"ova
RTS

@1"F825hRO
RO.@lAICREG
t020.@lAICREG
PC

;disable interrtups
jcon1i~ure 8255 with port II: a<:: input
idisable LED displas
;disibl~ DLART re<:eiller
jdisable DLART translitter
hndicate lbX clock for aux port
isend a harlless lode word to aak~ sure next
;word is interprete-d a·; a centrol woro 50 that
ahis control word puts us bad. to lode load
ila~,e sure baude ratl!S will aatch
iadd in lod~ b':lte incase user has chaMed arl!::lthins
;MIoI initialize lodes
ireset error flass, disable 8251

iff

SETAUX reconfisures thf aux. port to o~erate with a 16X clock if bit 7 of
COHFLG O. 0' with' 64X c1,,~ 'f bll 7 of CONFlG "(. Th, au;;. po,l
receiver and transliller are left disabled, but the RS-232 control slsnals
r'Guest-to-send ind data-terlinal-read':! are asserted. tI COP\:I of the co.'Olna
b~te sent to thf au:{. port is saved in AUXFL6 for futur@ tE'ferenc@I sinc@
A$CREG is a write-onl~ location.

33

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

clearing the

chips to an idle state. SETAX2 confisures the aux. port to operate with

9

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

thereb~

It then initializes the peripheral

0

;--

135170 005000
135172 105737 007710
135176 100001

SHAUl: : ClR

lSI!
BPl

RO

@tcONFLG
H

135200 005200

INC

I«)

135202
135206
135214
135222

JSR

PC,SETAXl

~VB

t042,@tASCRE6
t042,@tAUXFLG

004767 177720
11:
112737 000042 177452
112737 000042 007711
000207

"OVB
RIS

PC

A-21

iis 64X clock
;001

currentl~

selected?

lbX clock

;set .lUX port baud rater disable
;C'olland 8251 to assert RTS, DTR, and disable
Isave a cop':! since A.CREG is write onl~

T-ll Evaluation Modul. Monitor MACRO V05.00 Sunda, 13-"0,-63
110 Initialization and LED Driver

ras.

18

;H

2
3

IOVECT initiali~es the Interrupt vectors at locations 60, 64, 70, 741 .,.,
130, and 134 to point to an RTI instruction with priorit~ 7. It then attache~

4
5
6
7
8
9
10
II 135224
12 135224
13 135230
H135m
15 135240
16 13524~
17 135246
18 135252
19 135256
20 135262
21 135266
22 135272
23 135276
24 135302
25 135310
26
27 13S31~
28 1J5322
29 135330
30135336
31 135342
32

0~:10

inlerru,.,t service routines for console b.reak, invalid instruction, breakpoint,
and LED displa~ refresh, The power fail vector is also attached to ar1 IHI
inslructiol'H with priorit':l 6. The LED dis!>}a!:! hardware and DDth ~erial ports
are disablPd.

;-IOVECT::
012700
012701
O12nO
012720
Om05
012720
012720
012700
012720
012720
012720
012720
012737
005037

000060
000014
135676
0003~0

137114
000340
000010
137334
000340
137174
000340
135344 000104
007676

"0'
1
MOV
it:

t060,RO
tl2. ,Rl
ttNLUI.lROlt
UIO.lROlt
Rldi
tBREAK,(ROlt

hnitialize 110 vectors and disable irrterruFts
;15 coded priorit!:l vectors (2 not usedJ
;set address elnent to null SetVlce rOIJiinE

ftOV
!tOV
509
HOV
KOV
KOV
MOV
KOV
ItOV
KOV

tOl0,RO
I!TRAP, (ROlt
t340.lRO It
19RKPT, (ROH
t340.lROH

HOV

tDISPlA,@tLEDIV ;conn&et LED

t3~O.lROH

ClR
UKEYf'IV
rnow disable inti'rY'upi hardware
ItOVB
IOI0,ptPIPORC
112737 000010 177444
BICB
tlOO,@tCfRCSR
142737 000100 177560
SICIf
tl00,@tC1XCSR
142737 000100 177564
CLRF
@tASCREG
105037 177452
000207
RTS
PC

A-22

iset

priorit~

level to 7

;connect console break roy tine
;priotits 7 fot console break
icor.ned invalid instructiOfl tral>
;connect breakpoint
displa~

tra~

routine

idisconnect ke':!Press service vector
fol' ports
idisapl. LtD ,lisP!"
~disable corlsole receiver
:disable console translitter
idisable olJxiliars recei ver and t r3rl'~lI\i t ter

[-11 Eyaluation Hodul. Honilor MACRO
1/0 Initialization and LED Driver

~5.00

Sunday 13-Har-83 04:10

P.~.

19

1

.ENABl LSB

2
3

;u

DISPlA is the LED refresh interru~t service routine. It .ultiplex~s the
contents ot SEGBUf to the LEVs through parallel port At and checks if a

4

5
6

ke~pad ke~

has been pressed. It a ke~ has been pressed and the value in
location KEYPIV is not zero, then control will be transferred to the routine
at [KEYPIVl for interrupt driven kespad input. The ke~press routine at
[KEYPIVl lust restore R2, Rl, and RO fraa the stack (in that order) before
eXK'Utirui an RH. NotE! that if the corltents of SPCLSF afE' nonzero, a fl3Shir.~
di!ipla~ of I xx
will appear irl the LEOs instead of the corltents of SEGBUF,
Error'

7
8
9

10
11

12
13

DISP'lA illso C'OlIf'Its Ule nulber of tiles it hilS been called (which is deterlined
the hardware to bt BOO Utes per second, when disph~ refresh is er,3bledl
in th@ location TI~. the lower 10 bits of TInE count 0 through 799., and the

~

14

15
16
17
18
19 135344
20 135350
21 135352
22 135354
23 135356
24 135362
25 1353.4
26 135370
27 135372
28 135400
29 135406
30 135412
31 135414
32 135420
33 135422
34
35 135426
36 135432
37 135436
38 135HO
39 135444
40 135450
41 135452
42 135454
43 135462
44 135464
45 135470
46 135474
47 135476
48 135502
49 135506
50 135510
51 135512
52135514
53 135516
54 135524
55 135526
56 135532
57 135534

upper six bits tount 0 through 59. seconds.
;--

005237
010046
01014.
010246
013700
005100
032700
001016
042737
062737
013700
005100
032700
001002
005037
013700
042700
006300
016001
005737
001422
005001
032737
001015
016001
132700
001410
013702
132700
001001
000302
105002
060201
112737
000301
110137
000301
112737

007730

DISPlA:: INC
ttOv

Koo
HOV
IIOU

007730

COK
001440

BIT

BNE
BIC

"TIHE
RO.-(SP)
RI.-(SP)
R2.-(SP)
@ITIIE.RO
RO
1001440.RO

IIOU

COK

RO

170000

BII

1170000.RO

BN[

007730

ClR

11
mIllE

007730
177770

II:

HDV
BIC

ASL
HDV

007712
007726

TS1
BED
ClR

BIT

001000 007730

BNE
135756
000004

/IOV
BlTB

007726
000002

Koo

BED
BITB

@tTIHE.RO
tI77770.RO
RO
stGBIJF(RO)'RI
@tSPClBf
31
RI
tOOl000.@tTIIE
31
ERRSEG(RO)'RI
t004.RO
31
@ISPClBF.R2
1002.RO
41
R2
R2

41:

BNE
S1IAB
CLRB
ADD

R2,Rl

000010 177444 31:

HOVB

177440

HOVB

000007 177444

SWAB
HOVB

1010.PlPIPORC
RI
Rt.@tPIPORA
RI
t007.@IPIPORC

SWAB

;prePilre to check for overflow of BOOths

ino overflow
11
I00177MITIHE ;oYertlow, so clear BOOths
l002000.@1TI1tE ian~ add 1 second
icheck if overflow past 60 seconds
ilTIHE.RO

001777 007730
002000 007730
007730

ADD

count of BOOths of seconds in TIME
;preserve resisters

;kee~ iI

A-23

;no overflow of seconds
so clear the whole thin!

;~es,

istrip RO to lake it a luI tip lex address
;aake it a word index
;get se~lent data for this digit pair
;is there a s,ecial ~rtor displa~?
;no

itrue for approx. 1/3 of each second
iflashinS error ~essa~1 no less
i~et

Sedlent data for ' Error'

iis this diSit 2 ar 31
ino, so no overla~ on u~~r displa~
;get oyer16~ chilracters
iis this digit 31
idi!ht 3 character- is in Uf'F'er b~te
;swoP for digit 2
;save only upper display character
ic-oabine upper and lower displ~~ characters
Hurn Drf displa~f enable upper displa'3 latch
jget upper displa~ dat~ in lower byte
ioutput upper displa'3 data
iback to lower displa~ data
;displa~ still off, but upper latch closed

T-11 Evaluation 110001. "ooito, "ACRO V05, 00 Sunda, 13-Ma,-B3 04:10

Pa~.

19-1

lID Initialization and LED Driver
5B 1~542
59135546
60135550
61 135552
62 135556
63 135560
64 135564
65 135570
66 135572
67 135576
6B 135600
69 135602
70 135604
71 135610
72 135612
73 135616
74 135620
7S 135624
76
77 135626
78 135632
79 135634
BO 135636
Bl 1~42
82
B3 135644
84 135652
as 135656
B6 135660
B7 135664
88
B9 135670
90 135672
91 135674
92 135676
93
94 135700
95 135702
96 135704
97 135710
9B 135714
99 135716
100 135720
101 135722
102 135724
103 135726
104 135730
105 135m
106 135736
107 135740
lOB 135744
109
110 135746
111 135750
112 135754
113
114

110137
010001
006201
110137
000240
113702
042702
060002
013701
001413
074201
001420
032701
001027
032701
001424
005037
000421

177440

"OV9
IIOV
ASR

177444

"OIIB

177544
177417

"OV9

NOP

ADD
IIOV
BEQ
XOR
BED
BIT
BNE
BIT
8ED
CLR
BR

!IPIPORD,R2
1177417,R2
RO,R2
!lDE9HCE,Rl
51
R2,Rl
61
1000016,Rl
21
tOOO360,Rl
21
mEBHCE
21

SS:

JSR
TST
8"1
IIOV
BR

PC,71
Rl
21
R2,UDEBNCE
2.

6.:

BIS
TST
BED
JSR
J"P

'tKEYPIV
2.
PC,7.
mYPIV

m

007704

000016
000360
007704

004767 000046
005701
100415
010237 007704
000412
052737
005737
001404
004767
000177

Rt.!tPIPORA
RO,Rl
Rl
Rl,!tPlPORC

100000 007704
007676
000014
052006

;output lower displaY data
;Iultiplex di~it address (byte ind~x)
Hurn on display
;now do keypad input .••
;~.eypad ret'Jrn 1in!?s in bi ts 4 to 7
;clean UP keypad data
;colbine index and return data
;set a scratch COpy of debouflct' st;,te resister
;not debouncins a ke':!, take 2 riel,,: onEitohl latch, take it as iI keYPress
;co.pare lultip}ex address field
;not the sale, so ignore it
ica.pare return line field
;sil~e ke~ held, so ignore it
;no lonser salE' ke~ pressed, so reset stale

;convert positional bit to ~u~ber
iis this a valid ~.E.'!::l depression?
;~o, so isnore it
;yeSI lake it and wait for contirl2tion

t100000,~.DE!'INC£jIak.e

sure we set onl!::l one keypress per key
;da we hav~ an activ~ v~ctor?
;no, discard k.e~fess
;!iet a useful key nu~ber in Rl
ipass it to attach~d SE!rvice routine

012602
012601
012600
000002

2.:

"OV
"OV
"OV
.NUll! : : RTI

(SP)I,R2
(SP)t,Rl
(SPlhRO

;s~rvic~

010200
000300
042700
012701
006300
103013
001013
005301
006302
060201
042701
006202
010200
042700
000207

7.:

R2,RO
RO
tOO7777,RO
t4,Rl
RO
9.
101
Rl
R2
R2,Rl
t177740,Rl
R2
R2,RO
tI77761,RO
PC

ilske a scratch COPY
ilove k.~!::l data to upp~r byte
ikeep onl!::l return line data
;shift out 4 bits la::
ishift out a bit, look for a one
ididn't find it
;Iore than on~ true bit--invalid data
iRl is now 3, 2, 1, or 0
ileast two bits are 0
icolbine Dultiplei: address and positional count
iclean UP key code
i restore R2

007777
000004

at:

177740

11S:
177761

077116
012701 177777
000770

9S:
lOS:

IIOV
SWAB
BIC
"OV
ASL
8CC
BHE
DEC
ASL
ADD
81C
ASR
"OV
BIC
RTS
SOB
"OV

RbBI
t177777,Rl
DR
111
,DSA8l LSB

A-24

routine at @KEYPIV should also restore
;the rUisters in this lanner

; restore RO

ik.ee? searchiM
iindicate invalid data
;restore and exit

1-11 E,alualion Module !onilor MACRO V05.00 Sooda, 13-Kar-83 04:10 Pase 19-2
1/0 Initialization and LED Driv~r
115 135756 000120 00013~ 000120 [RRSEG: .WORD
116 135764 000120 000171 000000
.WORD

120,134,120
120,171,000

1-11 [,alualion Module Monitor MACRO VOS.OO Sunda, 13-Mar-B3
1/0 Initialization and LED Driver

.S8Tll LED

2
3
~

Dis~la~

jr,

r
E, <;ipace

0,

PaSe 20

Support Routines

iff

DSPIIIG ta;,es a hex nUlber in the lower 4 bits of RO and disf'lass the
corresporldiM seglent f'attern on the LED digit. inde);:ed o'J Rt. Rl:; 0
to index the right.cst lower LED digit, = 1 to inde)( the righttost !JI"f't>r
LED disit, ... 1 = 13 to indi!~{ the 1efhost iJF?N LEI! digit. Re+,IJrrl's R1

5
6
7
B
9

10
11
12
13
14
15
16
17
IB
19
20 135772
21 135776
22 136002
23 13600~
24 136012
25 1360H
26
27 136016
136021
2B 136022
136025
29 136026
136031
30 136032
136035
31
32

0~:10

; r,

inc:reaented b'!J 2 to index the next di1it to the left en the sallie disp}!:'::!
row,
Uses:

RO
Rl

Hex value to be displa~Pd
Index to LED digit on which to disf'las it

RO
RI

Prrvious value with bits 15. throygh 4 cleared
Previous value f 2

Returns:
j--

042700 177760
DSPDIG::m
CltP
020127 000013
BHI
101004
"OVa
116061 136016 007712
TST
005721
000207
It:
RTS

Rl,to0001J
;laxil'tM value for digit index
1$
;out-ot-r~ge, so isnore call
HEXSEG(RO)'SEGBUF(Rll ;displ .. digit
(Ri)+
;index next digit of saae displa~ level
PC

006

133 HEXSEG: : •BYTE

07),006,133,117 ;0, h 2, 3

146
007

155

175

.8YTE

146,155,175,007 ;4, 5, 6, 7

177

157

167

•BYTE

177,157,167,174 ;8, 9, Ar b

136

171

•BYTE

0711136,171,161 ;C, d, E, F

077
117

174
071
1&1

.EVEN

A-25

T-II EYaluation Hodule Honitor HACRO VOS.OO Sund .. 13-Har-BJ 04110 Pase 21
LED Displa~ Support Routines
I
2
3
4
5
6
7

itt
DSPUNH and DSPLHH tal!.e full words in R2 and write octal nuabers to the upper

and lower LED
Uses:

20

21
22
23
24
25
26
27
28
29
30
31
32
33
34

R2

Octal value to be

RO
RI

Contains Sarba!!:e

displa~ed

Returns:

B

9
10
11
12
13
14
15
16
17
IB
19

di5pla~s, respectivel~.

Contains !larbage

;--

136036 012701 000001
1J6042 000402

DSPlIHH: :ttOV
BR

II.RI
DSPNUH

iindex upper

displa~

136044 012701 000000

DSPL""::~

10.RI

iindex lower

displa~

136050 010246
136052 010346
136054 012703 000006
136060 010200
13<1062 042700 177770
1J6066 004767 177700
13<1072 000241
1J6074 006002
136076 006202
136100 006202
136102 077312
1J0104 012603
136106 012602
136110 000207

DSPNUltI HDV
HDV
HDV
1$:
HOV
BIC

R2.-(SPl
R3.-!SPl
16.R3
R2.RO
1177770.RO
PC.DSPDIG

iPreserve R2
;set a scratch re~i5ter
icount 6 di.!lits

JSR
CLC
ROR
ASR
ASR
SDB
HDV
MDV
RTS

R2
R2
R2
R3.1$
(SPlj.R3
(SPlt.R2
PC

A-26

i.ave octal disit to RO
;Iike sure it's octal
idispli':l digit
ilove to ne}:t octal disit

ida five diSits

1 Evaluation Kodule Monitor ItACRO
Diy.la!l Support Routines

VO~.OO

Sunda, 13-Ka,-B3 04:10 Pase 22

J

I
2
3
4
5
6
7
8
9
10
II
12
13
H 136112
15 136116
16 136120
17 136122
18 136m
19 136126
20 136130
21 136134
136142
23 136H4
24 136146
25 136150
26 136152
27
28 136154
136157
29 136162
136165
30 136170
136173
31 136176
136201
32 136204
136207
33 136212

n

136m
34 136220
136223
35 136226
136231
36 136234
136237
37 136242
38 136145
39 136250
40 136253
41 136256
42 136261
43 136264
44 136267
45 136272
46 136275
47 136300
48 136303

itt

DSPHAH is a routine to di5Pla~ nates of resisters, etc, on u~per displa~.
R2 points to the aessase to be dis~la~ed. The lessage sl'loul,j be a striM
of b b!:ltes corre5~ondins to the sesaerlt Patterns for each LEtl disit, starting
with the rightaost digit.
Uses:

R2

Pointer to string at sestent f'atterrlS

RI
RO

Contains sarbase
Contains garbase

Returns:
;.012701 000001
DSPNA!: :!1l1J
010246
HOV
ASl
006302
HIl1J
010200
ASl
006302
ADO
060002
HOV
012700 000006
HOVa
116261 136154 007712 1$:
TST
00~721
INC
00~202
SOB
077006
HOV
012602
RTS
000207
000
120
000
120
000
120
000
120
000
120
000
120
000
155
000
1.3
000
163
120
170
000
136
000
120
006
163
133
163
117
163

000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
136
124
120
167
075
000
170
110
170
120
170
120

077 NAHTBl: : •BYTE
000
006
.BYTE
000
•BYTE
133
000
117
•BYTE
000
146
• BYTE
000
155
•BYTE
000
163
•BYTE
000
071
•BYTE
000
155
•BYTE
000
•BYTE
167
163
•BYTE
136
•BYTE
.BYTE
000
171
.BYTE
.BYTE
000
124
•BYTE
•BYTE
174
.BYTE
124
174
.BYTE
124
.mE
174
.BYTE

It.RI
R2.-ISP)
R2
R2.RO
R2

iindex upper displa~
;preserve lessag, index
itultipl!:l it b~ 6

RO.R2

16.RO
;character count
NAHTBlIR2).SEGBUfIRl) i.ave sesaent data to LED bufter
iindex ne~t LED digit
IRllt
;ind~y. next character
R2
ROolS
ida six characters
(SPlhR2
irestore R2
PC

0,0,077,120,0,0 ;.

rO

0,0,006,120,0,0 i'

rl

0,0,133,120,0,0 ;.

r2

0,0,117,120,0,0 p'

r3

0,0,1401120,0,0

j'

r4

0,0,155,120,0,0

j'

rS

0,01163,155,0,0

j'

Sf'

0,0,071.163,0,0

j'

PC

0,0,155,163,0,0

j'

PS

120.136,167
1700124.163
000,120013 •
136,167.000
000.075.171
120.000,000
0060170.124
163.110.1'4
133.170.124
163,120,174
1171170,124
1630120·174

A-27

j 'PntMr'

j'

Addr •

;. rEG'
; 'b-rPnU'

; 'brPnt2'
; 'brPnt3'

T-l1 Evaluation ~odule Monitor HllCRO 1J05. 00 Su"d ••
LED Displa':l' SuPport Routines
49
SO
51
52
S3
54
55
56
57

136306
136311
1363H
136m
136322
136325
136330
136m

H6
163
000
034
060
124
170
163

170
120
130
161
134
134
120
200

124
174
124
000
155
071
134
167

.BYTE
•BYTE
•BYTE

.BYTE
•BYTE
•BYTE

•BYTE
•BYTE
,EVEN

13-~a'-B3

04:10 Pa!Je 22-1

H6.170.124
1630120.174
000,130,124
034.161.000
060.134.155
124.134.071
170.120.134
163,2001167

A-28

;'brF'nt4'
i' Func '

j'ConSol·
; 'A,Po1't'

T-II Ev.luation Modul. Monitor ftACRO V05.00 Sunda, 13-Har-S]
LED nispla~ Support Routines

0~:10

P,•• 23

Hf

BLNKlO and BlHkHI are routines to erase the sesaent data ir. the lower and
upper LED butters, respectiyel~. Returns sarbase in RO and R1.

2
3
~

5
• 136336
7 1363~2
B
9 1363~~
10
11 136350
12 136354
13 136360
H 136362
15 13636~
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 136366
36 136372
37 136m
38 136376
39 136402
40 11640~
41 136406
42 136~12
43 136416
44 136420
45 136422
46 136426
47 136430
48 136432
49 136~34
50

j--

012701 000000

BLNKLO::ftDV
8R

10.Rl
BLNKDS

iindex lower

displa~

000~02

012701 000001

BlNKHI : : "OU

I!.RI

;index uPper

displa~

012700 000006
105061 007712
005721
077004
000207

BLNKDS: ftOV
a:
CLRB
TST

16.RO
SEOBUF(RIJ

;count 6 disits
iblank a disit
;index next disit of sale
;do six disits

SOB
RTS

(Rut

RO.lI
PC

displa~

level

Hf
DSPDEC takes i nUlber in Rl and an index to either second-fro.-lhe-left lED
disH in R2 and displi~s the nUlb@r as a decilal value or! the correspor,dins
LEO digits. R2 = 10 to index the lower row of LEDs! = 11 far the uP?fr row.
The lettlOst LED digits afe not ~rfected. To dis?lay a two's COIlf"!ei€nt
decilal 'w'ah.. , call this routine frol another routine, which places a linus
siYi in tile hfllost LEO digit and passes the absQlute value of the n1jlber
to be displa~d to this routirle.
Uses:

RI
R2

!\eei.al value to be displayed
Index to lED row on which to display it

Returns:
RO, Rl, Contain sarbaSe
R2. R3
;--

OOm7 015662
010146
010201
00~767

DSPDEC: :JSR

177370

005742
012601
012703 000004
004767 015576
010146
010201
004767 177344
005742
012601
077311
000207

tt:

PC.81NASI

~DV

Rh-(SP)

MDV
JSR
TST
HOV
ftOV
JSR
HDV
HDV
JSR
TST
MDV
SOB
RTS

R2.Rl
PC.DSpnlG
-(R2;
(SP)bRl
1~.R3

PC.BlHASC
R!.-(SP)
R2.RI
PC.DSPDIG
-(R2)
(SP)t.Rl
R3.!1
PC

A-29

10000's di~it
;save reaainder
iindex left LEII disH
;displa~ d@rilal disit
iindex next digit
i~et

ilake a coonter
;strip a di~it frOI Rl
;s~itch resisters
,display decilal digit
iindex next digit to the right
;set back decilal nu~ber
;do six digits

T-ll Evaluation Hodul. Honitor HACRO V05.OO Sunda, 13-Har-83

0~:10

PaS, 24

LED Display Support Routines

H+

2

KEYGET torns on the LEDs and waits for a keypress. The keg nutbit of the
k~ that was pressed is retlJrned in Rl. The ke~s are nUloered as follows:
00 -- [ClR]
12 -- [ 6 ]
01 -- ( 1 ]
13 -- [ 9 ]
02 -- [ 4 ]
14 -- [A['V]

3
4
5
6
7

03
04
OS
06
07
10
11

8
9

10
11
12
13
14

15
16
17
18
19
20
21
22

--------

[ 7]
[ 0]
[ 2]
[ 5]
[ 8]
[EXA]
[ 3]

15
16
17
20
21
22
23

--------

(BAC]
[REG]
[AOR]
[SST]
[GO ]
[BPI]
[FNC]

Uses!
Returns:

Rl

Contiins nuaber of key that was pressed

KEYPIV Cleared
SPClBf Cleared
PS

Priorit~

reduced to 5

;--

23
2~

25
26
27
28
29
30
31
32
33
3~

35
36
37
38
39
40
41

136436
136444
13M52
136454
136460
136462
136466

012737 136~70 007676 KEYGEI nHOV
IIOV8
112737 000007 177~44

tKEY6El,@tKEYPIUilink input routine to keypress vector
t007, PtP$PORC ;lurn on LED displays

106701
120127 000277
101402
106427 000240
000777

Rl
RJ.1277

13M70
136m
136500
136502
136504
136506
136510
136512

005037 007676
005037 OOm6
012602
005726
012600
005726
106~26

000207

1$:

"FPS
CMPS
SlOS
HIPS
DR

KEYGf1: ClR
ClR
HOV
lSI
HDV
lSI
HIPS
RTS

;priority 5 is laxilu. for LEDs to operate

1$

1240

;set priority 5

1$

;wait for

mEYPIV

jdisconnect keypress veclor
autn off flashiml error, if an'::!

~ISPClBf

(SPIt.R2
(SPit
(SP)t,RO
(SPit
(SPit
PC

A-30

ke~reS5

hestore R2
idiscard old Rl
;restore RO

idiscard return address
ibut replace PS b~te
;return to caller of KEYGET

T-ll Ev.lu.tion "odule """itor KACRO VOS.OO Sund., 13-".r-83
LED Di5pla~ Support Routines

0~:10

P'So 25

iH

2

3
4
5
6
7
8
9
10
11
12 136514 116101 136522
13 136520 000107

KEYBCD translates the ke~ nuaber in Rl into a BCD value far the
12 lor the CLR k." 013 lor the EXA ke" .nd -I for .11 other
Uses:

Rl

Ke~

RI

Translated value

nueber to be translated

Returns:

;--

KEYBCD ::ttOVB
RTS

BCDTBI. IRI IoRI
PC

;translate Rl into BCD cod@

BCDTBL: .BYTE
•BYTE
•BYTE
•BYTE
.BYTE
•BYTE
.BYTE
.BYTE
.BYTE
•BYTE

012
001

llCLRJ
;( I J
l[ 4 I
;( 7 I
HOI

14

IS
16
17
18
19
20
21
22
23
2~

25
26
27
28
29
30
31
32
33
34
35
36

136522
136523
136524
13.\525
136526
136527
136530
136531
136532
136533
13653~

13.\535
136536
13.\537
136540
13.\541
136~2

136543
136544
1365~5

012

001
004
007
000

OO~

•BYTE

007
000
002
005
010
013
003
006
011

J77
377

•BYTE

377

•BYTE

377

•BYTE
•BYTE
•BYTE

377
377

l [ADV]
;[sACl
mEG]

377

;[ADD]

002

005
010
013
003
006
011

377

377
377
377
J77

ke~s

'"s.

•BYTE

•BYTE
.BITE
.BYTE

H 2 )

H 5I
H8]
mXA]
l[ 3 J
n6]
H 9]

377

assn

J77

HGO J
HBPTl

377
J77

l(FHCl

.EVEN

A-31

0 tu 9,

T-Il E•• lu.tion Module "-nitor MICRO VOS.OO Sunday 1)-M.r-8) 04:10 p.se
LEO 8isplas Support Routines

2.

1

H+

2
3
~

NUMGET disP'l~s the current . . alut ot R2 in the lower row of LEDs, leaviM the
upper row intact. The ke~ad is enabled to allow the USft to aodifY the value

5

ir. R2 with thE' 0 - 7 '!rId ClR lc.eYs.

•

altered or not, when the user

7
8
9

The value in R2 is returned, whether

?~sses

EXA •

R2

Ini hal vahle

11

R2

New value (if chansed)

12
13
14
15
16
17 136546
18136554
19 136560
20 136564
21 136570
22 136572
23 136574
24 136600
25 136602
2. 136604
27 136610
28 136612
29 136620
30 1U622
31 13.624
32 136632
33 136634
34 13663.
35 136640
3. 136.42
37
38 136644
39 136646
40 136654
41
42 136656

f .CHAN nil!! in FlAGSl is set if R2 was
Contains ~arbage
RI
Contains !iarbage
RO

Uses:

10

Returns:
Lhat!~edt

deared otherwise

;--

042737
004767
004767
004767
005701
100770
020127
10102.
001420
020127
103361
032737
001004
005002

000002 00770. Nl.ItIGET: :~IC
u:
JSR
17m4

177m

JSR

177724

JSR
TST
8"1

CHF'
BIU
BEQ

000012
000010

CHP

BHIS

m

000002 00770.

SHE

ClR

052737 000002 00770.

006302
006302
006302
060102
000744

~$:

005002
052737 000002 007706
000737

3.:

000207

25:

BIS
ASL
ASL
ASL

'f.CHAN.~'FlASSI'show

PC.DSPLHH
rc.KEYGET
rC.KEY8CD

R2 h.sn't ch.nsed ,et

;displa!:l value in R2 on lower lEDs
iwait for a keYpress
;ranYert ke~ nulber into BCD

it a legal ~e~?
get another
it nuaeric?
it was EXA/EHT, ;0 return valui! in R2
,no, it was char
iwas it 8 or 9 (not valid octal digits)?
;SfS! sa i~nore it
tF.CHAN,@tFlAGSHhas R2 been chan~ed ~et?
;~es, just scroll in ke~
U
ielse clear old value first
R2
IF. CHAH,@tF1AGS1;indicate it has been chan.!:led
;.ake space fnr new digit
R2

RI
1.
RloI012
2.
31
RI.'OIO
II

;was
ina,
;was
iool

R2

R2
Rl.R2

,scroll irl new di!!i t

11

;accept additional digits

CLR

R2

;clear nu.ber for ClR

m

'f.CHAH.@JfLAGSI'show R2 chansed

BR

11

RTS

PC

ADD
IR

;return value

A-32

ke~

I-II Evaluation Modul. Monitor MACRO V05.00 Sund" 13-Har-83 04:10
LED Di5pla~ Support Routines

P.~e

27

.SBTTl Error Condition and Startup

2
3
4
5
6
7

Entr~

Code

Hf

'START is the powerup inilialzalion routine. which is executed after toe
diagnostics are cotPleted.
;--

B

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

136660 005000
136662 012701 014000
136666 005020
136670 077102
136672 010537 007726
136676 012737 007400
136704 112737 000050
136712 112767 000116
136720 012737 135676
136726 012737 135676
136734 012737 000340
136742 012737 007320
136750 000402

SSTART: :ClR
IIOV
ll:
CLR

SOB
MOV
MOV
MOVB
MOVB
MOV
MOV
MOV
MOV
BR

007746
007710
050544
007702
000024
000026
007462

;clear RAM frol 0 to 27777
RO
t14000,RI
(ROlt
R1,1$
RS,@tSPCLBf
jput PDwer-up error code on LEDs
tSCRPAD,PUSP iset IJP user slack pointer
tOSO,UCOHfL6 ;set default baud rales
t116,1F8251
iset d,rault value for 8251 lode byte
tSNULLI,@tUSERVSiinilialize user's interrupt vector
IINULLI,@t24
ipf point~ at null
t340,Pt26
tTBlTOP,@tTBLBOTiinitialize e.pt~ syabol table
idon't clear error display
IHALTH

Ht
SHAlT is the routine invoked b'=l the HALT button, the HALT L line on the
board, and the HALT instruction. It saves the processor re!listHs imd the
contents of USERIV and KEYPIV if a user PfO!!ral was r·unnin~, It also

Perforls a bus reset and reinitialization of peripheral chips before
invokins the ke~pad lonitor.

;-136752
136756
136762
136766

005037
004767
004767
042737

SHAlT:: CLR
007726
JSR
000022
176110
JSR
177377 007706
BIC

136774 004767 176224
137000 000167 000564

JSR
JltP

@tSPCLBf
;C'lear error code on LEDs, if ans
;save context and fix user SP
PC,UCSAVE
;assert RESET line and reinitialize ports
PCdOINIT
tI77377,@lfLAGSI;reset oede, set " •••d ' ....nd .ntr.
Heave F".BRKA so breakpoints will be relaved
;Iilte sure interrupt vectors aren't dalaged
PC , JOVECI
IKONIT
;enter IGnitor

A-33

T-l1 Evaluation Module Monitor !\ACRO V05, 00 Sunday 13-Har-S3 04:10 Pa!ie 28
Error Condition and Startup Entr~ Code
2
3
4
5
6
7 137004
S 137010
9 137016
10 137020
II 137024
12 137030
13 137036
14 137042
15 137046
16 137052
17 137056
IS 137062
19 137066
20 137072
21 137100
22 137106
23 137112
24

Hi

UCSAVE saves the processor resisters and the contents of USERIV and KEYPIV
if a user ?ro~raa was running. It also initializes the lonitor stack.
j--

012637
032737
001433
012637
112637
042737
010637
010037
010137
010237
010337
010437
010537
013737
042737
012706
000207

007460
UCSAVE: : HOV
000100 007706
BIT
BED
007750
ItO\I
007752
HO\'B
177400 007752
BIC
007746
HOV
007732
HOV
HOV
007734
007736
HOV
007740
HOV
007742
HOV
007744
HOV
007676 007700
HOV
000100 007706
SIC
007460
u:
HOV
RTS

(SP}+,~tSTACK-2

;Iove return address to lonitor stack

If .USER,@tFLAGSlirunniM user code?

If
(SPltr@tlPC
(SPII,@I$PS

;no
;~es, save user context, startiM with PC
iPS next
jprevent sisn extension
ifh: and save stack pointer
isa"e RO,
iRl,
jR2,

t17740MtlPS
SP.@tlSP
Ro,@tIRO
RIo@tlRI
R2,!lIR2
jR3,
R3.@lIR3
R4,@tlR4
iR4, and
;R5
R5,@tIR5
@IKEYPIV,@IKEYPVS
iSive user

~e~?ress vector
tF .USER,@tFLAGSUshow that user context has been saved
tSTACK-2,SP
;so to lonitor stac~
iand return to call ins routine in lonitor
PC

25

26
27
2B
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

H+
BREAK is the console break interrupt service routine. It is sililar to HALT
except that it does not invoke the ke!:IPad looitor if the console lonitor lola::·
runniOS preYiousl~. The host .ode is terlinated b~ BREAK.
;-137114
137120
137124
137130
137136
137144
137152
137156
137162
137166
137172

005737
004767
004767
042737
012737
142737
113700
052700
010037
012700
000466

177562
BREAK:: TST
177660
JSR
175746
JSR
035377 00770b
BIC
133000 OOOObO
HDV
000007 007710
BICB
007710
HOVB
BIS
000002
HDV
177564
000001
HOV
BR

iacknowledse interrupt
;save user contexl
iassert RESET line and reinilialize ports
t035377,@tFLAGS1;initialize .onilor ~odes
tLlNEIN,@tCOHIN ihook UP console input service routine
t007,nCONFLG iclear console line fla~s (but not speed)
@tCDNFLG,RO
;!:let current baud rate
;enable pro.!!. baud rate, disable x_it interrupt
tOOOOOZoRO
itransfer control word to console port
RO,UCIXCSR
; indicate cor.sole break service
tloRO
;!iO to fatal error harldler t.o reenter lonitor
FERROO

@tCIRBUF
PC , UCSAVE
PC,IDINlT

A-34

T-IJ Evaluation Hodule Honitor HACRD VOS.OO Sundo, 13-Har-83 04:10 Page 29
Error Condition and Startup Entr~ Code
2
3
4
5
6
7
8
9
10 137174
11 137200
12 137204
13
14 137212
15 137214
16 137222
17
18 137226
19 137234
20 137236
21 137244
2213m6
23 137252
24 137254
25 137260
26 137264
27 137266
28 137270
29 137272
30 137274
31
32 13727.\
33 137304
34 137310
35 137316
36 137324
37 137326
3B 137332
39
40
41
42
43
44
45
46 137334
47 137340
4B 137344
49

iH

BRkPT is the break?oint service routine. If invoked ftol a user proSra., the
processor context is 5av~d. It invoked in response to a lanitor breakpoint
rather than a sin~le step or user breakpoint, the PC value saved frol the
previous context is adjusted to point to the location which contained the
.ani tar breakpoint.
j--

106427 000340
BRKPT:: ttTf'S
004767 177600
JSR
032737 001000 007706
9IT
001405
042737 001000 007706
000167 002466
032737
001155
032737
001430
013701
00S741
012700
012702
022001
001403
OOS720
077204
000414

000200 00770.

052737
010137
052737
032737
001521
012700
000406

020000 007706
007750
001000 00770.
002000 007706

BEQ

DIe
JHP

2.:

000400 007706
007750

BIT
BHE
BIT
SEQ
lffiV

lSI
007760
000004

HOV

IIOV

4.:

cHI'
BEQ

lSI

m

'F.TBAS,@'FlAGS1;snow we need to print break point lessaSe

I10V
SIS

BIT

5':

;are we single steppins~
;':Ies, so not a brea~.point--entet lonitor
'F.BRKA,@'FlAGSl;arf breakpoints installed?
ino--user prosra, contairls BRK, so si!:lnal error
SI
UIPC,RI
;!iet user PC
-(RIl
;back. UP to BRK instruction
tBRKFIl,RO
jindex breakpoint file
'4,R2
ifour entries in file
(!ffiH,RI
idid we in fact encounter a br~akpaint?
3$
;yes, so adjust PC, flO error 1E!5Soint
;00, so cnec~, if siM:le ster> or new breakpoint
21
.f .BRkG,PtFlAGS1;reset condition
$60
iif6tall breakpoints and reSUle execution
t340
PC , UCSAVE

I10V

BR

Rl,U$PC

,r,a lalch--prosralt contains BRK".sisnal error
;fix PC

tF.ItRKG,@tFlAGS1;show ~e need to siMle step
tF,K£YP,~.FlAGSl;no lessaSe if in ke~pad lode
IlIONlT
;so just enter .ani tor
42,RO
hndicate breah-oint serlJice
FERROR
;90 to fatal error handler to reerlter "'Dnitor

itt

ITRAP is the ille9al instruction trap routine. If a user prosral was runniMr
the ~I'ocessor conte>:t is saved ~fore invokiM tht' lonitor.
i-106427 000340
004767 177440
012700 000003

!TRAP:: "IPS
JSR

"0'1

t340
PC,UCSAVE
t3,RO

A-35

idisable interrupts in case vector is oalased
;save user context
;indicate invalid instruction t~aP

T-11 Ev.lu. 
PC.CRLF
;print radix-50 .essaS!
PC.PRINT
@liP
;Iake sure nothing lett in btjtfer
IHONIT

016037 137542 007726 1$:
000462

HOV
DR

FERCHR(RO),@tSPCL8F
IHONIT

01004.
00~767

17S646

012600
006300
032737 002000 007706
001411
016002 137422
00~767
00~767

m

BED

17~122

174360
005037 007630
000466

FHESAG: : •WORD
.WORD
.WORD
•WORD

137434
137450
137472
137522
012446
070511
000000
007525
055240
076732
000000
035206

FERROR: :HOV
JSR
HOV
ASl

m

163
124
163
006

;~ointers

to error lessases

074444 017502 FHE5GI: .RADSO !CONSOLE BREAK/
0~2300

•WORD 0
003770 0631~1 FNESG2: •RAD50 IBREAK POINT ENCOUHTERED/
020563 060426
0177~0

•WORD
004051 01~411 FHESG3: •RA050
05521~ 071713 077167
053605 054007 102604
021025 014400
000000
•WORD
035206 004051 014423 FNESG4: .RAD50
076453 042320 057466
076732
.WORD
000000
120

FHESGI
FHESG2
FHESG3
FHESG4

;?ut two character error code on LEDs

076
071
174
006
155
174

FERCHR: : •BYTE
•BYTE
•BYTE

.BYTE
•BYTE
•BYTE
.EVEN

0
!INVALIO INSTRUCTION ENCOUNTERED!

0
!INVALID STACK POINTER/
0
120.076
174.071
163>174
124.006
163.155
0(16,174

~4

A-36

;r,U
jb,C
jp,b
;n,I
;P,S
;l,b

(Ur
(Cb
(bP
(In
(SP
(hI

Error)
Error)
Error)
Error)
Error)
Error)

T-ll Ev.lu.tion Hodul. Honitor HACRO V05.00 5ond •• 13-M.r-83
Errol' CMditior. and Startup

1
2 /
3
4
5
6
7
8
9
10 137556
11 137560
12 117564
13 137570
14 137576
15 m600
16 137604
17 137610
18 137612
lY 137614
20 137620
21 137622
22137m
23 137626
2~ 137630
25 137634
26 1376~2
27 1376~4
28 137650
29 13765~
30
31 137662
32 137670
33 137672

Entr~

0~:10

if+
HOHITl is the looitor enlrv point to be used for nOflal eXIt frol user
prO!lrals. The PTOCI?t;;SOr context is saved, except for the PC, which retair,s
its previous value so that the ('rosral can be rlJn asain. .HOHlT is th,

entr':j point used blJ lanitor routines after the processor

contei~t

has

~eerJ

saved.

;-HOHlT! : : HFPS
007750
IIOV
004767 177214
JSR
032737 000400 007706 IHONIT: :m
BEQ
001~26
012700 000014
HOV
016001 007760
3$:
IIOV
00H04
BEO
005720
TST
016011 007760
HOV
0057~0
TST
024040
4$:
ClU'
005700
1ST
BPL
100366
01370~ 007750
HOV
032737 020000 007706
BIT
001404
BEO
004767 015400
JSR
004767 015314
JSR
042737 030400 007706 2S!
BIC

-(SP)
jpush PS, PC like frol a traf
PUf'C.-ISP)
;but k.eep P1'£IviOU5 USEr PC value
;save user conte~t
PC.UCSAVE
tF .BRt;A,@tFlAGS1;breakpoints current!':j installed?
;no
21
j index last breakpoint address
.014.RO
BRKFILlRO) .Rl ;set breakpoint address
ithis breakpoint is not defined
41
;point to previous contents
IROlt
BRKFILIRO) dRll i r~stor~ contents at bf@ab'oint
-(RO)
;90 bac~ to address
-IRO)'-(RO)
;bad,!J" to next address
RO
31
ido four entries
;~Dint to next location
UIPC.R4
IF •TS~S"tFL~GS1isee if we should print leSSese
ibranch it not
21
it'::Jpe address
PC.TYPADR
PC. TYPLOI
idisasselbb next ir!struction
.F •BRM!F •APPL +F •TeAS. PftLAGSI j indicate breahoints reloved

032737 002000 007706
001402
000167 003026

tF.KElP.~.FtAGS1;k.".d

106746

0137~6

;and enable break on

BIT
BED
JHP

11
CHONlT

JHP

KHONIT

.REPT
•BYTE
.ENDR

<140000-.>
0

3~

35 137676 000167 000276

1$:

J6
37
38
39

P••• 31

Code

000076

A-37

~c

lod,?

i!les, 90 to ~,e!lpad lonitor
;and So to console lonitor

T-11 [yaluation "odol. ~onitor HACRO Va5.00 Sunday 13-Kar-83 04:10 Pa!. 32
Error Condition and Startup Entry Code
I

.StTTl Entry POInts

2
3
4

MONITOR ENTRY POINTS:

5
I>
7

;--

8 140000 00011>7 015330

START:: J"F'

CIA.NO

,do

RSTART::JKP

$HAlT

;HALT Instructions and halt line vector
;save context arid restart lorlitor

ItONITR: :JHP

ItONITI

;standard lorlitor entry (no error condition)

9

10 140004 000167 171>742
11
12
13 140010 000167 177542

ifrol user

14
IS

then initialize lonitor

pro~raltJ

save conte::! anlj rellGve

;breakpoints

11>
17

Ht

IS
19

;--

KEYPAD/lED UTILITY ENTRY POINTS:

20
21 140014 000167 175752
22
23
24
2S
21>
27 140020 00011>7 176012

DGDISP: :JHP

DSPDlG

nUib@r in R2 as i 6 di~it vetal valti@
iin the uPP@r row of LEDs. Returns 15 in R1
;and 9arbag~ in ROt

29
30
31 140024 00011>7 176014
32

oUiber io R2 as a 6 digit octal value
;in the lower row ot LEOs. Returns 14 in Rl
iand gatbage in RO.

;Displa~

33

140030 00011>7 176332

nu.ber in RO oits 3 to 0 as a h~x
;di9it at LED position indexed b~ RI.
jRl=12,lO,06,04,02,OO -. lower displa~ di~its
IRl=13,11,07,05,03,Ol -- u?per display dl~it5
iR& bits 15 to 4 ar~ clear~d, 2 is add~d to Rl
;nispla~

;Displa~

UPDISP:: JtlP

28

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

dia~nostics,

OECDSP: :.lKP

140034 00011>7 171>304

DSPlJEC

;Displi~ nUiber in R1 as a 5 digit deci.al
;value an the row of tEVs indexed b~ R2.
iR2 = 010 for the lower row, 011 for the upper
iReturns zero io Rt an1 R3, and sarbage in RO
;aod R2.

BlNKHI

jBla~

the upper row at lEDs. Returns zero in
iRO and garbase in Rl.

140040 000167 176272

lOBlNK:: JKP

BlNKlO

;Blank the lower row of LEDs, ReliJtr1s zero in
jRO and sarbase in Ri.

140044 000167 176366

GETKEY: :JI'IP

KHGtT

;Turn on lEDs and wait for a keypress, Return

,key nu.ber in R1. Modifies KEYPIV.
140050 000167 176440

BCDKEY: : J"F'

mBCD

iTranslate ke~ nu.ber in R1 to a FCD value for
,keys 0 to 9, 012 for the ~lR k~, 013 for the
iEX/ENTR ley, and -1 for all other ke~s.

NU!!GET

nu.bet in R2 as an octal value on the
ilower row at lED~, Activate keypad and allow
iuser to .odif~ the value in R2 with the keys
;0 through 7 and CLR. Return the value in R2,

52

53
54 140054 000167 176466
55

56
57

A-38

jDispla~

T-II Ev.luation Kodol. Monito, NACRO V05.00 Sundi. IJ-K.,-BJ 04:10 P.s. 32-1
EntMl Points

58

;changed or not, when user presses EXA. Uses
iR2, Rl, and RO.

59

A-39

T-ll Evaluation Hodule Honitor

~O

VOS.OO Sundas 13-Hor-83

0~:10

Pa~

33

Entr':! Points
1

2
3

iff

4
5
6 140060 000167
7
B

;--

CONSOLE LINE UTILITY ENTRY POINTS:
OOOIO~

Jill'

mBP

,f'rolPl ror a line frol the console. Rl!turn
jt~e line in BUFFER with Rl cleared.

9 I~0064 000167 173346
10
11 140070 000167 173222
12
13

JHP

GHBP

;Transfer the back pointer (BP) to R3.

JHP

ilETCH

,RetrIeve character indexed b':l R3 fro. BUFfER.
;Returns character in RO, R3 incfe.ented b~ 1.
;Returns H set if character is a separator,
,e set it it is lower case.

JHP

GmCH

;RetrIeve character indexed b':l , wi th exc(lptiorrs 
KlOOPI

032737
001420
020427
101006
006304
010564
006204
000167

BIT

tF.REG,@tFlAGSI
41
R4,tOOO010
51
R4

032737
001007
010537
042737
000167

000001 007706
007756
000001 007756
000362

000010 007706 3$:

BEQ
CHP
BKI
ASl
MV
ASR
JKP

000010
007732
000302

013700 007754
004707 001260
010510

~$:

KDV
JSR
HOV

R4
KLOOPI

icham!ins re:fislers or watchpoint cOfltents?
iflo
idoes R4 ir,dex a resister (O loru 7 and F'S)?
;no (R4 should b. 0000111
il:ake it a word lnde}:
;and place data in user re-~ister
j f@store R4
;lake another ~e!:l

@IIIHHCH,RO
PC,KAMCH
R5,@RO

iassulf R4 indexes watchpoint contents
icheck that it is not in protected RAM
idef'osil data into watchpoint location

R5,IRO(R~1

A-43

T-11 Evaluation Hodul. ""nito, HACRO V05.00 Sood,y 13-Har-B3 04110
COliand Routi~

Pa~.

35-1

Ke~

58 140700
59
60 140704
61 140712
62 140714
63 140720
64 140722
65140m
66 140730
67 140732
6B 140734
69 140740
70 140746
71 140750
72 140752
73 140756
74 140762
75 140770
76
77 140774
7B 141002
79 141004
BO 141006
81 141012
82 141016
83
84 141022
as 141030
B6 141032
B7 141034
sa 141040
89 141042
90 141044
91 141050
92 141052
93 141056
94 1~1060
95 141062
96 141066
97
9S 141072
99 141076
100 141102
101 141106
102
103
104 141110
105 141112
106 141120
107
lOB
109
110 141122
111 141130
112 141132
113 141136
114 141142

000167 000264
032737
001526
020427
103416
020427
101013
006304
006304
010564
042764
006204
006204
000167
010537
042737
000167
032737
001407
010100
012701
004767
000167
032737
001457
010504
020427
001414
010402
004767
006304
016405
006204
010502
004767
000167

000020 007706 4$:
000014
000017

KlOOPI

BIT
8£0
CHP
BlO
CHP

tF.BRKS,@tFLAGSl;chanSins breakpoint or watchpoint address?
;no, isnore (stranSe! that was a satet~ check)
KlOOf>I
;R4 indexinS a breakpoint?
R4,IOOOO14

BIll

1001:
007700
000001 007700

000212
6$:
007754
000001 007754
000174
000040 007706

1$:

000004
174754
OOOHb
000010 007706 7S ~

175042
007732
9S:

174756
000076

013702 007754
004767 174734
017705 046646
000764

ASL
ASl
HOV
BIC
ASR
ASR
JHP
HOV
BIC
JHP

as:

ke~

;no, it's not
61
R4,IOOOOI7
;1\0, it's not
61
i.ike an index for word pairs
R4
R4
;p}ace data in breakpoint address file
RS,IRKFIl-060IR4)
juk.e breakpoint address ellen
t1,BRKFIL-060IR4)
R4
R4
;tak.e another ke~
KlOOPI
R5,@IIWATCH
;assule R4 indexes watc~oint address
t1,@t\WATCH
;Iake watchpoint address even
ilake another ke~
KlOOPI

BIT
8£0
HOV
HOV
JSR
JHP

IF,FUNC,ftFlAGS1;are we enterinS a function code?

BIT
BEO
HOV
BEQ
HOV
JSR
ASl
HOV
ASR
HOV
JSR
JHP

tF.RES,@tFLAGSl
KLOOP1
R5,R4
R4,tOOOOIl
BI
R4,R2
PC,DSPHAH
R4
IROIR4lrR5
R4
R5,R2
PC , DSPlNH
KlOOPI

HOV
JSR
HOV
BR

@IIWATCH,R2
PC,DSPUNH
!IWATCH,R5
91

CHP

000011

;lake another

JHP

SCLR:: ClR
005005
BIC
042737 000002 007706
000610
DR

7\
RIrRO
t4,R1
PC,DSPDIG
KUJOP1

ino, lust be enteriM a resister nUlber
; set new digit
iindex a lower displa~ digit
idisplas nev disit
,tak@ another key
ibe sure we are selectins a reiister

;else isnore ke~
;save selected resister nUlber
;are watchpoint contents selected?
;Yes, do special displa~
;disf'la:l register's nale on upper LEDs
;.ake a word index
;set resister's contents
;displa~

on lower LEDs

,take another

ke~

,set watchPoint address
;show it on upper displa~
;set watchpoint contents

;clear disit accuaulator
R5
tF tCHAN,@tFLAGSHin case of sinsle disi t lode
DIGEXE

.[NAil LSB
032737
001421
013702
004767
017705

000004 007706 IEXAH:: BIT
BEO
HOV
007756
JSR
174674
HOV
046610

tF.ADDR,!tFlAGS1;exa.inin~

RAH?

11

;no

~IIADDR,R2

;set current address
;show it on upper displas
;!let contents

PC, DSPIiIlt
IfADIIR,RS

A-44

I-II Evaluation Modulo "onitor ItACRO 1105, 00 SundalI 1J-",r-B3 04:10 Pase 35-2
Kew Co..and Routine§
115
116
117
liB
119
120
121
122
123

GNEXAH: atov
010S02
14lISO 004767 17~670
JSR
1~1IS4 OS27J7 000001 007706
BIS
BIC
141162 0~2737 000002 007706
KLOOPJ: JHP
1~1I70 000167 177112

WI%

141174 032737 000010 007706 u:
141202 001.03
HI20~ 00S70!
12~ 141206 100357
125 141210 100767
126
127 141212 032737 0000-10 007706 21:
128 141220 001763
129 141m 005705
130 141224 100761
111 141226 000167 000774
132
133

BIT
BED
1ST

BPl
l1li1

;general eXiline ent~ point
R5,R2
;shov it on lower displa~
PC, DSPlNM
Ir,DAIA.@lrLAGSI;so to data ent .. lode
IF,CHAN,@IFLAGSI;indic.to no chanS •••t
;take another ke~
KLOOP

tF.REG,@tFlAGSl ;exalinin9 a retister?
R~

;no
,R4 initialized to -1 bw SREG

Gl£XAH
KLOOf'I

;Contents F!Jt in RS b'J D:tGE.XE
jisnore EXA", lake user push a

2$

di~it

first

If,FUHC.@IFLAGSI; ••ecutions sPeCial fUnction'
lisnor, all other occur~nces ot EXAM
KLIO'I
R5
;RS initializ.d t. -1 b. tFUNC
Hinore EXAM, late user push a ~igit first
KLIXPI
Bltl
;execute special function
OOfUHC
JItP
,DSABl LSB

BIT

BED
lSI

13~

135
136
137
138
119
140
141
142
143
144
145
146
147
148
149
ISO
151
152
153
154
ISS
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

,ENABI.
141232 032737 000004 007706 tADV:: BIT
BEQ
141240 001405
141242 005237 007756
INC
1412~6 005237 007756
INC
141252 000723
BR
141254
141262
141264
141266
141272
141274
141300
141304
141310
141314
141316
141320
141324
141326
141332
141334

032737 000010 007706
001425

a:

OOS20~

020427
103·411
012704
013702
004767
017705
000714

000011

IIlV

000011
007754
174526
0%440

010402
004767 174566

BIT
SEQ
INC
ClIP
BLO

"O'J

oo63~

016405 007732
00620~

000704

141J36 032737 000020 007706 21:
141344 001711
1413~6 005204
141350 020427 000012
141354 001001
14135o! 005724
4$:
141360 020427 000017
141364 101440
141366 005304
141370 000436

l$

;no

mADDR
mADDR
.EXAM

;.0 to next word

IF,REG,@IFlAGSI
2.
R4
R4ot000011

;ste•• inS thrOUih r.Sist.rs?
;na
; r.~ister index

1000011,R4
,.tIMICH,R2
PC,DSP~"

ItO\I

@.IMTCH,RS
GNEXAH

ItOV

JSR
AS!.
ItOV

ASR
BR

BIT
BEQ
INC
CHI'
SHE

TSI
CM

BLOS
DEC
DR

idon't step past watchpoint contents

3$

JSR
BR

31:

LSB
IF,ADDR,@IfLAGSI;stoPpins thrOUih addr.ss.s'

R4.R2
PC.DSPNM
R4
SRO(R4IoRS
R4
GHEXAH

;select watohPoint oontonts

watchPoint address
ishow it on opfer displa~
; set uatclwoint contents'
;~et

;displil~ re!lister/~

;Iilke

;set

iI

word

re~ister

tF.BRKS,ltFlAGSlist.ppiRS

KLOOPI
R4
R4,tOOoo12
4.

nate or. upper LEDs

ind.~

contents

thro~h br.akpoints~

ina, i~nore advance
iincrelent breakpoint index
ida SPtCial inCf@lent

P3tt~tn

(R4H
R4.tOOOO17
BRKPI
R4
BRKPI

A-45

i'ilke breakpoint

displa~

T-II Evaluation Kodul. "-nitor HACRO V05.OO Sood•• 13-Har-83 04:10 Pa •• 35-3
Key CaMand Routines

In
173
174
175
176

141372
141400
141402
141406
141412

tr.ADDR,@tFlA6S1isteppin~

throuSh addresses?

032737 000004 007706 tBACK:: 8IT
lIED
001405
DEC
005337 007756
DEC
005337 007756
000643
DR

6t
mADDR
mADDR
tEXAH

032737 000010 007706 6$:
001404
005304
100333
005004
000731

8IT
lIED
DEC
BPL
CLR
8R

tF .R£6"tFLAGSI
7t
R4
3t
R4
3t

BIT
BED
DEC
CHP
DHIS
ItOV
DR
.DSAIL

tr.BRKS,@tFlAGSlisteppioS through brea~points?
ino, ignore backup
KLOOPI
idecreeent breakpoint index
R4
ido special decre.ent pattern
RMOOOOI4
;.ake breakpoint display
8RKPI
;index watchpoint
tOooolJ.R4
BRKPI
LSB

,no
;~o

to next word

177

178 141414
1~ 141422
180 141424
181 141426
182 141430
183 141432
184
185 141434
186 141442
lS7 141444
188 141446
189 141452
190 141454
191 141460
192
193
194
195 141462
196 141466
197 141470
198 141474
199 141500
200 141502
201 141504
202 141506
203 141512
204 141514
205 141516
206 141520
207 141524
208 H\532
209 141540
210
211 141542
212 141546
213
214
215 141550
216 141554
217 141560
218 141564
219 141566
220 141572
221 141600
222 141606
223
224
225 141610
226 141614
227 141620
22B 141624

032737 000020 007706
001652
005304
020427 000014
103005
012704 000011
000402

012704
010402
004767
020427
103420
006304
006304
016405
006204
006204
010502
004767
042737
052737
000441

000014

7S:

HOV
8R

@ttWATCH,R5
2t

JSR

2.:

ClIP
BLD
ASL
ASL
HIlV
ASR
ASR
ItOV
JSR

174320
000077 007706
000021 007706

013705 007754
000763

a:

012702
004767
013705
010502
004767
042737
052737
000416

icADDRK: :HOV

012702
004767
012704
004767

000012
174332
007756
174252
000077 00770.
000004 007706

;continue in lADV

BIC
BIS
8R

BRKPl! HIlV

007700

;prevent underflow

tOOOOI4,R4
;index breaKPoint 0
,show nale of breakpoint on upper displa!::l
R4,R2
Pc.oSPNAH
;indexing watchpoint or a breakpoint?
R4,tOOOOI4
;the watchpoint
It
;Iake an index tor word pairs
R4
R4
BRKFIL-060(R4),RS
;set breakPoint address
R4
R4
;displa~ it on lower LEDs
RS,R2
PC , DSPLNH
tOO0077,PtFLAGSlicl •• r p..vio", ODd.
tF.BRKStF.DATA"tFLAGSI i ••t br,,~point and data ODd.
KLOOP2

SBRKP:: KOV

174416
000014

isteppins throuSh reSisters?
;no

JSR
HIlV
ItOV
JSR
BIC
BIS
8R

000013
174272

fREG:: ItOV

177777

IlO\l

174506

JSR

JSR

;~tt

watchPoint address

;PfOIPt with I Addr • on upper displa~
t012,R2
PC,DSPNAH
@UADDR,R5
;get pre~ious address
;show it on lower display
R5,R2
pe,DSPLNN
tOOOO77,@tFLAGSliclear previous lOde
tF.ADDR,@tFlAGS1;set current address entry lode
KLDOP2

t013,R2
PC , DSl'NAK
t-hR4
PC , BLJI(LO

A-46

;prolPt with'

rEG

I

on uPper display

iinitialize re~ister index to illegal value
fand blank lower display

T-ll Evaluation Kodul. "-nito. MCRO Y05.OO S.nda. IJ-Ki.-83 04:10
Ke. C....nd Routin..
22'1 141630
230 H1636
231 141644
232
233
234 141650
235 141654
236 141660
237141664
238 141670

042731 000077 007706
BIC
052737 000010 007706
BIS
000167 176436
KLOOP2: J"P
012702 000020
004767 J74232
omos 177777
004767 174m
041737 000077 007706
052737 000040 007706
000757

tFUNC:: "OV

JSR
HOV
JSR
BIC
8IS
SR

239 141676
240 141704
241
242
243 141706 052737 000200 007706 $SST: : BIS

m

245 141714
246 141722
247 141724
248 141732
249 141734
250 141742
251 141746
252
253 141752
254 141756
25S 141762
256 141766
2571mn
258 142000
259 142004
260 142010
261 142014
262 142022
263 142024
264 142030
265 142036
266 142044
267 142050
26B 1420S4
269 142060
270 142066
271
272 142070
273 142070
274 142076
275
276 142100
277 142104
278 142110
279 142112
280 142114
281 142120
282 142124
28J 142126
284 142130

P.~

35-4

'OO0017,@tFlAGS1;clear preyious lode
tF.REG,@tFLAGSI ;.nd set resi.t•••• I.2

lOde

'f.SST,@tfL~G51

;show we are sinsle stepping
Hs user SP in his RAH'?
;no, show error lessag!
;and is th@re roo. for 2 pushes?
;wes. SP is acceptable
iol.o .bort
;SP Error
isla to fatal error handler to reenter .anitar

023727
101004
023727
103007
042737
012700
000167

007746 007400 $GO:: eN'
tG01: : BHI
007746 000004
CHP
BHIS
BIC
000200 007706 u:
000004
"0'1
175376
J"P

msp,tSCRPIID
It
@lISP,1l
21
tF.SST,@tFLAGSI
Il,RO
FERROR

013702
013703
013704
013705
013737
013706
013746
042716
032737
001422
OS2m
012737
012737
013700
013701
013746
052737
000006

2$;
007736
007740
007742
007744
007700 007676
007746
007752
000020
000200 007706

@t\R2,R2
;restore user context,
I!tlR3,R3
@IIR4,R4
@tlf/5,R5
iand user kp~press vector
mmVS,ftKEYPIY
ive're on user's stack now
I!tISP,SP
@tlPS'-(SP)
;push PS, PC like frol a traP
to20dSP)
it'lear T-bit
tF.SST,@tFLAGSI i.r. w•• inslo .toppi~?
31
ioo
;!:Ies, set T-bit
t020dSP)
;.ake sure BPT trap is still connected
tBRKPT,@toI4
134O,@l016
;finish restoring context
@"RO,RO
@tlRhRI
@tIl'C,-ISP)
;push PC

4$:
000020
137174 000014 9$:
000340 000016
007732
007734
007750
000100 007706

"DY
I\0Il
~V

~V
~V

ItOV
HOY
eIC
BIT
BEQ
SIS
/tOy
I\0Il
HOIJ
ItOV
/tOV
SIS
RTT

tF.USER,@tFlAGS1;show we are runnin~ user code
iand silulate return frat trap

9IT
BNE

tF.8RKG,@tFlAGS1;sinSle steppins oypr a break point
,if YeS then don't install
41

"0'1

tBRKFlL,RO
t4,Rl
@(RO)t.IROlt
Rhlool
tBRl(F1L.RO
f4,Rl
IRO)
300'
13,@(ROlt
(RO)t

3$:
032737 001000 007706 SS:
001352

012700
012701
013020
077102
012700
012701
005710
001405
012730
2B5 142134 005720

0017£0
000004
100$;

ItOV
HO'I

SOB
007760
000004
200$:
000003

/tOV
ItOV
lSI
BEQ
HDV
TST

A-47

;start of break point table
,foot entr'J5
;suck UP data frOi break paint locations
i

;start of break point table
;sale as last tile
;first see if there was reall!:l one set
;branch if not
;set break point
;skip to neli:t

T-Il [y.lu.tion !Odule !onit., KACRO V05.00 Suod•• 13-K.,-83 04:10 p.Se 35-5

K•• Coooood Routines
286 142136 077106
~OOS:
287 142140 ~02
288 142142 032020
300.:
m 142144 000774
290 142146 052737 000400 007706 500$:
291 142m 000725
292
293

SOB
BR

BR

Rl.200$
i1'our entf'~S
500$
(RO)+' (ROll
iskip this entr~
400$
;~o back for next
IF .BRKA,HFLAGS1; irldicate breakpoints installed
91
;and So

295 142156 032737 040000 007706 KAIlRCH:
296 142164 001017
297 14216.\ 020027 020000
298 1421n 103014
299 142174 020027 007400
300 142200 103411
301 142202 020027 010000
302 142206 103403
303 142210 020027 017400
304 142214 103403
305 142216 OOSOOO
2$:
306 142220 000167 175124

BIT

tF.PROT,@.FLAGSlike~pad

BHE

1$

CIII'
BHIS
CKp
BLO
CKP
BLO
CHP
BLO
ctR
Jill'

RO.t20000

1$
RO
F[RROR

;indtx user RA" error .essa~e
;!iO to tatal error handler to reenter lorli tor

RTS

PC

,address is acceptable

BIT
BR

BIS

m

307
308 142224 000207
309

u:

RO.tSCRPAD

scratch protection on?
;no, deposit an~where
ii5 address above UP~er instance of scratchpad? '.
;Yes, detinitel~ doesn't address protected RAI1
iis it below lower instance of scratchpad?

1$

;'::Ies

1$

iis it within lower instance 01 scratcopad?
;~e5' address is il1e~al
RO,tSCRPAD+I0000iis it between instances 01' scratcMpad RAM?

RO.tl0000
2$

A-48

;'SI!St

not withir. thea, so address is OK

1-11 Ev.IUltion Kodul.
K.. C....nd R""ti'"

~it.'

IlACRO V05.00 Sund.., 13-lIir-S3 04:10 P'!Ie 36

1

2
3
4 W226
5 142230
6
7 142234
8 142236
9 142240
10 142242
11 142244
12
13 142246
14 142252
15 1422~
16 142260
17 142264
18
19 142270
20 142276
21
22 142302
23 142304
24 142306
25 142310
26 142312
27 142314
2S 142316
29
30 142320
31 H2324
32 142330
33 142334
34 142340
35 142342
36 142].14
37 142350
JB 142354
39 142360
40 142364
41 142370
42 142372
43 142376
44 142400
45 142404
46 142406
47 142412
48
49 142414
50 142416
51 142420
52 142422
53 142424
54
55 142426
~ 142430
57 142434

.SBlll Specl.I K.,..d Konit.r Functions
006305
000175 142234

DOFUHC::ASl
Jltp

RS
PFNC1'I!LI R5)

iRS was 0, 1, 2, 3, or 4
idispatch to selected function

142246
142270
142572
142320
142562

fNCTBl: : •WORD
.WORD
•WORD
.WORD
•WORD

CANCEL
GOllED
CKONI
SPEEDS
NPROI

;0 leans cancel breakpoints
i1 .eans turn on LEDs and ~o at user PC
i2 leans cold start console aonitor
;3 leans select baud rates and console t~pe
,4 aeans disable ke~pad lanilor scratch protec,

CANCEL: :HOV
it:
CLRB
SOB
CLR
FNCDON: JIt>

t020.RO
BRKFIL-I(RO)
RO.lI
mWmH
KIIOItI1

,8 words in breaKPoint file
iclear address/contents pairs
;~o

tOO 7.@tPIPIJRC
IGO

,turn on LED displass
;ilnd go

012700
105060
077003
005037
000167

000020
007757
007754
175710

112737 000007 177444 GOllED::MOVB
JHP
000167 177412

SPDTBl:: tWORD
•WORD
•WORD
•WORD

000454
001130
002260
004540
011300
022600
045400
012702
004767
11J70S
042705
006205
006205
016501
012702
004767
004767
020127
001436
020127
103067
020127
001410
020127
001362

•WORD
.!IORD
•WORD
000021

SPEEDS::HOV

173~2

JSR

007710
177707

HOVB
BIC
ASR
ASR
HDV

142302
000010
174006
174052
000010

5.:

HOV
JSR
3S:

JSR

CHI'
BED
ClIP
BIllS
ClIP

000016
000014

005305
005305
100007
005005
000405
005725
020527 000016
103401

2.:

300.
600 •
1200 •
2400 •
4800 •
9600.
19200 •
t021oR2
PC.DSPNAH
!tCDiFlG.RS
tl77707.R5
R5
RS
SPD18L!R5)'RI
t010.R2
PC.DSPDEC
PC.KUGEl
RI,IOIO

; index 'CooSol'
;show pro.pt on upper displa~
;set baud rate bits
;.ask out other flass
;shift to word index position

11

;~esJ ~o to aYX port speed
iWils is a function ke':!?
;'::'25, exit
;w~ it advance?
;':les, aodi f!:j: baud rate
;was it backup,?

corresPOndins baud fate
;index lower di5pla~
idisplay decilal nuaber
;wait ror a kelJ
;was it 'Enter'?
;~et

CHI'
BKE

RI.tOI6
101
RI.tOI4
21
Rl.t015
31

DEC
DEC
BPl
CLR
BR

R5
R5
41
RS
41

;decrease baud rate

1ST
ClIP
BlO

(R5)t

,increase baud fate

RS.to16

ioverflow?

4t

;,..,

BED
000015

icancel watc~oint also
to re~ister select lode

;no, wait for another ke':!

; show new rate

;prevent underflow

A-49

T·11 Evaluation Module ~itor MACRO V05.00 Sunda. 13-Ka.-83
SPe~ial Ke~Pid Monitor Functions
58 142~36
59 142440
60 142«2
61 142444
62 1~2«6
63 142452
64 142456
65 142462
66 142~64
67
68 142466
69 142472
70142416
71 142502
72 142506
73 142510
74 1~2512
75 14251~
76 142520
77 14252~
78 142530
79 142534
80 142536
81 142542
82 1~254~
83 142550
8~ 142554
85
86 142556

0057~5

006305
006305
006305
106137 007710
110537 007710
106037 007710
00>205
000725

4$:

012702
004767
016501
105737
100002
006201
006201
012702
004767
004767
020127
001653
020127
103005
012700
mOl7
000750

1St

000022
173414
142302
007110

TST
ASL
ASL
ASL
ROLB
HOVB
RORB
ASR
DR
IIOV
JSR

8$:

HOV
ISIB

BPL
ASR

000010
173642
173706
000010

9J:

em

CHI'
BHIS
HOV
XDR

000016
000200
007710

000167 175562

ASR
MO'J
JSR
JSR
CItP

lOt:;

O~:IO

-(RS)
R5
R5
RS
@ICOHFLG
R5.nCOHFLG
@ICOHFLG

Pase 36-1

;store index in baud rate bits
ipf"@serve hi§l order bit (F .A64X)

RS

5'
1022.R2
PC.DSPHAII
SPDTBUR5) .Rl
!!tCOHFlG
91
RI
RI

Hndex -A.Port·
ishou proIPt
iset console baud rate
jis 64 Xset tor auy. port?
;00, sale speeds
;else console rate / 4

~IO.R2

;index lower disp1a~
;displa~ baud rate
;wait for a ke':l
;is it 'Enter'?
;!:Ies, finished
;was it a function button?

PC.DSPDEC
PC.KEYG£!
RloI010
FNCOON
Rl.1016
101

;+:Ie5, exi t

DR

RO.@ICIINFLG
81

;no, tog~le aux port baud rate
iCONFlG is an even b':lle
iwait for enter ke':l

JHP

KEYCHI

;execute function ke':l

IF.A6~X.RO

97
88 142562 052717
89 1~2570 000635

0~0000

007706 NPROT:: SIS

DR

IF ,PROT .@IFLAGSHt"", olf protection
,go to reSister select
FNCDOH

A-50

~de

T-ll Evaluation Kodul. Konito, ItACRO \105. 00 Sunda, 13-Ka,-83 04:10 Pa•• 37
Sp@cial Ke~pad ~onitot Function;

.SBTTL Console Monitor

2
3
4
5
6
7
8
9
10
11
12
13

iff

REGISTER USAGE:
R5
R4
R3
R2
Rl
RO

Cold

coIPutational scratch
passiM to botto. level routines and scratch

point:

j--

H

15
161425n
17 142600
18 14260.
19 H2.14
20 142620
21 142624
22 142632
23 14263.
24 142.44
25 142650
26 142.54
27 142660
28 142664
29 142672
30 142676
31 142704
32 142710
33 142714
34 142720
35
36
37
38
39 142724
40 142732
41 142736
42 142744
43 142752
44 142754
45 142762
46 142770
47 142776
48
49 143000
50 143004
51 143012
52 143014
53 143022
54 143026
55 143032
56 143036
57 143042

entr~

last 1!)(P'ression value.
current ten value and scratch currtlOt address
running; poir.ter for input buffer
pointer and ~eneral passing to routines

012737
012737
012737
005037
105037
142737
105037
012767
113700
052700
010037
004767
052737
106427
012737
004767
004767
012702
004767

006500
040100
000004
007630
007672
000007
007673
133000
007710
000002
177564
172304
002000
000000
000100
170614
170610
143052
171042

oom6 CHOM 1:: KOIJ
007330
KOV
007325
IlO\l
CLR
CLRB
007710
BICB

cm

KO'I
KOVB
BIS
KOV
JSR
PIS
KTPS
KOV
JSIl
JSR
NOV
JSR

035214

00770.
177560

nlJh,nSp

jinitialize user SP for console lonitor
iset default aodes
tF.IlULL,~IlASllN;;nihali'. last lin. no;s
t400.lootl00,~tTKPKOD

mp

hnitialize console bufter P'ointirs

;clear host buffer pointer also
'tHFP
tOOMtCONFLG iclear console line flags (but not speed)
ftHSTFLG
;clear host flags
tllNElH,COHIK ;hook UP console input service routine
PtCOIfFLG,RO
;s@t current baud fate
too0002,RO
ienable PfOS, baud rate, disable xlit interrupt
;lransfer control word to console port
RO,PtCIXCSR
pe,SETAUX
iset .lUX port balJd fate ano:! disable
tF.KEfP,@tFlAGS1;disable ke~pad IOnitor
ienable interrupts
tOOO

('(Insole fE'ceiver interrupt
istart a new line

tOO0100,~tC'RCSR;enable

PC,CRLF
PC,CRlf
tGRET ,R2
PC,PRINT

;point to sreeting

.e5sa~e

illlPe lE!ssa!le

;ff
;M_

Warl

entr~

point:

012767
106427
012737
032737
001412
012737
112737
112737
000402

133000 035126 CKOHIT: :KOV
KTPS
000000
000100 177560
NOV
004000 007706
BIT
BED
134540 000120
NOV
000046 007711
IIOVlI
KOVB
000046 177m
8R

tlIHEIN,COHIN ;hook. UP cOl'YSole input service routine
;ehable interrupts
tooo
tOOOlOOt,tcSRCSRienable console receiver interrupt
tF.HOST,UFLAGSHis host lode enabled?
;00, clear host flass to lerlinate functions
11
tHOSTIH,~tAUXIN ;hook UP host input service interrupt
t046,mUXFLG ;saye a COP~ or new AieRES value
t046,flAICREG ireen.lble .lUX port receiver interrupt

105037
032737
001501
042737
004767
013704
004767
004767
005737

007673
11:
000200 007706 2$!

~IHSTFlG

000200 007706
006702
007750
012212
012126
007466

CLRB
BIT
BEQ
BIC
JSR
IIOV
JSR
JSR
TST

21
IF .SST ,@tFLAGSl
CKOH3
.r.SST,@tFlAGSl
pc , TYPREG
Ptlf'C,R4
PC, TYPItDR
PC,TYPLOI
'tREPEAT

A-51

;stop host actiyit~
;",ere we 5irl~:ne steppin9?
;no . scrap line
ic}ear flas frol IG01 rouhr.e
j~es, displas resisters
;point to next location
; hpe address
idisilsselble next irlstruclion
tWfre we repeating?

I-II Evaluation Kodule "onito,

~O YO~.OO

Sund•• 13-"-,-83

O~:IO

Paj< 37-1

ConsolE' tklnitor

58 14304&
59 Im50

OOI~&3
OOO~76

BEQ
BI!

CltON3

;no

CKOH4

;~es,

A-52

keep cOMand line

T-II Evaluation ",""I. Honito. ItACRO V05. 00 Sunda. 13-Ki.-83 04:10 Pa •• 38
Consoli! Monitor

2 143052
143060
143066
3 143074
4 143076
5 143102
6 143104
143112
7 143116

.RAD50 ITEH CONSOLE HONITOR VI.O I

076725
045710
070226
000000
001640
000000
007716
021026
000000

004540

.WORD
.RAD50
.WORD
023132 001156 OVERFU .RADSO
046557
•WORD

0

004767
012700
004767
004767
004767
012700
004767
004767
000167

170400
056007
170374
170276
170776
000134
170354
170344
170602

PC,CRlF
;t~pe   \
PC,CHROUT
PC,GETBP
iset rurlnins pointer to back pointer
PC,ECHO
iecho blJffer to corlsale to indicate error
tl34,RO
it'S?£! \ 
PC,CHROUT
PC,CRLF
PRINT
;print error .eSSige

000207 055207 GRET:
051646 035557
143076 000000
WHAT:

0
I WHAT I

0
IBUFFER OVERFLOI/I

8

9
10
II
12
13
14
IS
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

143120
143124
143130
143134
143140
143144
143150
143154
143160

PRNERR:: JSR
HOV
JSR
JSR
JSR
HOV
JSR
JSR
.JItP

a".

Hf

COliand error

entr~

point:

j--

143164
143170
143174
143200
143204
143210

012706
012702
004767
012700
004767
000402

007462
143076
177720
DODO))
170320

CHON2:: MOO

HOV
JSR
HOV
JSR
BR

tSTACK,SP
tllHAT ,R2
PC,PRNERR
to)),RO
PC,CNROUT
CHON3

Ht
General error

entr~j

;we Colle here frol unspecififd depth
;point to error lE!ssase
;print erroneous cOlaand line and error .eSSiSe
it':!?!! ? (CR)

scrap rest of coaaand line, terlinate host input:

j--

143212
143216
143224
143230
143234
143240

004767
142737
012706
005037
005037
152737

177702
ERROR:: JSR
PC.PRNERR
;print error IE!S5aSe
000200 007673 00f3:: Bleil
tF.lOAD.~tHSTFLG;stop loading fro. host
007462
CHON3!: HOV
tSTACK.SP
;we don't know at which level error occurred
007630
@tBP
idear both bad. pointer and forward pointer
ClR
@tREPEAT
idon1t keep repeatin~ bad cOlland line
007466
CLR
000004 007324
tF.NULL"tLINFlGiact like line was not eapty
BISB
Ht
Fresh calland line ind repeat entr~ point:
j--

143246
143252
143256
143262
143266
143270
143274

000337
105037
004767
005737
001403
005337
000543

007324
007324
170166
007466

C"otf4:: SWAB

cm

143276 113737 007331 007330
143304 004767 170214
143310 012701 076725

1$:

;save old line parsin~ fla~s
i~set line parsins flass tor new line
;pur~e bottol at buffer, clear ruonins pointer
;ttpeat line or PfOIPt tor a new one?
jPtOlPt for i new one
ie-aunt repetitions
;ar,d fe-execute line

BED

@tllNFl6
PC.Pl.IIGE
I!tREPEAT
II

DEC
BR

CHON5

HOVB
JSR
HOV

i restare p"enar,ent lOdes
;start a rI@W line
PC.CRLF
t<24.SOt05>.50tI5.RI
;RAD50 triplet 'TEH'

JSR
TST

007466

~lllHFL6

~tREPEAT

~IPERHOD.~tTHPHOD

A-53

1-11 Evaluation Kodule "ooitor I1/\CRO V05.00 SUnd" 13-Ko,-83 0.:10 Pas. 38-1
t10ni tor

Cor~ole

55 H3314
56 143320
57 1.3324
58 143330
59143m
60 143336
61 143m
62 143350
63 143352
64 143356
65 143360
66 143366
67
69 143370
69 14337.
70 143376
71 143402
72 143404
73 143412
74 143414
75 143420
76
77 143422
7B 143426
79 H3432
SO 14343.1
81 143442
82 143446
83 143452
84 143454
B5 143460
96 143466
87 143470
as 143472
89143m
90 143502
91 143504
92 143506
93 143512
94
95 143514
96 143520
97 143524
98 143530
99 143534
100 143536
101 143542
102 143544
103 143550
104 143552
105 143556
106 143562
107 143566

004767
012700
004767
123703
001415
004767
126327
0013.17
105037
005003

170464
020076
170200
007631

2.:

BED
8$:
170600
007467 000015

0<17324

142737 000001 007673

000506
105737
001755
105737
100444
132737
001403
004767

ooom

004767
012701
004767
012700
004767
105737
001411
004767
132737
001003
010100
004767
123703
001761
005003
105037
000671
004767
106427
113702
042702
001003
120127
001407
120227
103007
110162
105237
106427
000660

JSR
I«l\I
JSR
CMPS

007672

3$:

JSR
CKPB
BHE
ClRB
ClR
BICB
BR
T518

BEG
000001 007673

TSTB
BKI
mB

171124

JSR

007673

BEG
BR

170076
032153
170346
037m
170062
007672

9$:

S$!

JSR

171264
000001 007673

170032
007631

7.:

007324

171224
000340
007631
177400

4$!

000012

000140
007470
007631
000000

101:

11$:

lOB
109 143570 106427 000000
110 143574 012702 14J104
HI 143600 000167 177406

JSR
I10V
J5R
ftOV
JSR
TSTB
BEO

6$:

mB
81/!:
MOV
JSl!
C"P8
BfO
elR
ClRB
BR

;t~e a sinsle RAP~O triplet
PC,PRIHTl
t400*0401076,RO 1\... ) (SPAC£>
PC,CHROUT
;s@e if a character has been t~~ed
UFP,R3
;00, So check host buffer
3\
.echo character to console
PC,ECHO
;is last character a ~
BUFFER-1IR31,tOI5
ino, wait for 00£1
21
;reset line tla35 froe ECHO
ULlNflG
;set NJnniM pointer to be9inrriM of line
R3
IF ,ElYTEh@tHSTFlGielear host line ~yte bucket ("0) flas
; (lKecute 1ine
CI1ON5

;see if we have a character trol the host
;no, So back and chec~ console
;are we 10adinS or just listening?
iloadiM
4f
tF,BYTB,~tHSIFlG;are WI i~Dri~ host lessages?
91
tRO
;~es, set character frOI host
PC,HGETCH
;and throw it awa~
2'
~tHFP

2'
UHSTFlG

;start a new line to show lessaSe fro. host
PC,CRlF
;RAD50 t,i,lel 'HOS'
1<10.50tI7>.sOI23,R1
It~pe a sinsle RAD50 triplet
PC,PRIHTl
t400'0761124,RO ;'T)'
;cOlflete the header
PC,CHROUT
;~ee if we hav€ ~ character
ttHFP
;00, check console for ke~press
7'
;get character frol host buffer
PC,HGETCH
tF,BYTB,@IHSTFlG;are we ignoring h05t aessases?
;~esl throw character awa~
7f
R!.RO

pC , CHROUI
@lfP,R3
5t
R3
ttLINFlG
If

;else echo it to console
;see if console t~ped a character
HI !lOt, continue nnst aessos€
;PtePare to re-ecno console input

J5R
"TPS
ItOVII
SIC
BHE
CKPB
BEO
CKPB
BHI5
KOVB
IHeB
KIPS
DR

PC,HGETCH

;get character frca host buffer
iblock console interrupt tor a while
;set console buffer input pointer
;prevent sisn extend
;we aren't at be~innin~ of line
;throw aw~ line feeds at beginning of line

1000
21

iis buffer full~
abort load process
ltranster character to console input buffer
jad~ance butfer input ~ointer
;restore interrupts
;echo buffer to corlsole

KTPS
I«l\I
JKP

1000
IOVERFl,R2
ERROR

;rfstore interrupts
;point to error lessa~e
iand f'rint it

mo

tlfP,R2
t17740Q,R2
101
R1,1012

;redispla!l prolPt and echo buffer asair,

11$

R2,1140

6'

;~esf

R1,BUFf'ERIR21

UFP

A-54

I-II Ev.lu.tion Kodule Honitor MCRO VOS.OO Sunda. 13-K,,-83 04:10 Pase 38-2
Console "onitor
112
113
114
1lS
116
117
118

H+

,-H360~

004767 167616

1~3610

000~02

CItONS:: JSR

DR

m

120
121
122
123
124
125
126
127
128
129

PC.GETNXI
CHONi>

;~et

first

leanin~rul

character

143612 004767 167570

COlITlN: :JSR

PC.GETLCR

;recovpr list aCQuired charact!r

14361.
143622
143624
H3630

CftON6:: 1ST

e'REPEAT

;are we repeatinS?

005737
001004
110337
105337
H363~ 000337
143640 105037
H3644 000~02

007466
007630
007630
007326
007326

a:

BHE
KOV8
DECB
SIIA8
ClR8
8R

a

R3.@t8P
@m
PlctJ!COK
PlCURCOH
CHON7

;':J£'S, so keep last ~olland
;else throw it awa~

;save old cOlland floss
;and initialize thea for next cOiland

itt

Pars£' top ltvel:

130

131
132
133
134
m
136
137
138
139
140
141
142
143
lH
H5

Next cOlland entry point:

;--

143646 00~767 167554
H3652 120027 000015
lU6S6 001S4~

.EHABl
COlILUl': JSR
CHON7: CHPB
BEQ

143660
143666
143674
143676
lU702

152737 000004 007324 is:
132737 000020 007324

1~3712

000~02

00136~

120027 000054
001761
1~3704 120027 000033
143710 001005

BIS8
8m
8NE
CltP8
BEQ
CHP8
BHE
BR

LSB
PC.G£TNXT
RO ••015
DOCR

;S!t next aeanin9tul character
;is it 
COitlUF
Hs it cDaaa'l'
RO.'OS4
;i~nore cOI.as at top level
COHlLf
iis it  .ESC K •
The old value ot EXPfLG is also saved, for the sale reason.

8
9

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
2'
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

Routin~s

iH

;--

144274
144300
lW04
I4HOb
141312
144314
144320
144322
144326
14mO
144332
144336

004767
120027
001453
120027
001450
106437
102010
106437
100063
102003
005737
100031

144340 010405
144142 120027
14m. 001432
14mO 120027
W354 001427
144356 120027
144362 001424
144364 120027
144370 001421
144372 106437
144376 100m
14HOO 004767
144404 105737
144410 100406
144412 010514
144414 005237
144420 000403

000212
000072

.ENABl LS8
PC.GENEXP
CNPi
RO.I072
BEG
14\
CNPi
RO.I075
14\
BEG
NTPS
@ICURCON
iVC
2\
@IEXPfLG
NTPS
BPL
8\
BVC
It
@lFLAGSI
1ST
SPL
3\

DOEXPR: :JSR

000075

007326
007332
007706

oooon

91:
21:

NOV
CNPi

R~,R5

BE~

NOY
INC
BR

14\
RO.t134
14\
RO.t137
14\
RO.t033
14\
I!ILlNFLG
6\
PC.ADRCHI
mNPNOD
4\
R5.@R4
mADOR
51

CItPB
BEQ
WB
BED
CNPB
BED
NTPS
BMI
JSR
TSTB

000134
000137
000033
007324
010120
007330

BIll

007756

RO.IOn

;set an expression
,is next character :1
j~s, isnore expression
iis next character ;1
i':lfs, isnore expression
ihas RS been set1
j~es! not Just a nale
,what is nallle'?
;predefined s~,bQl
;detined user sSlbol, proceed
;~lse see if we are in PASSl ~ode
iUiier defined nale has no value irl
nale's value
iis next character '?"?
;~s, do nothin~
;is it \1
;~es, do nothing
;is it _?
;~es,

do

nothin~

lis it (ESC>'

do nothin!i
ihas under line been eXlK'uted?
;~esl duap RAH locations
;chec~ if odd address or not in user RAH
jare we in b~te .ode?
hilfs
;de~osit data word
;~es,

31:

JItP

C"ON2

144426 110514
144430 005237 007756
144434 000167 177152

41:

NOVB
INC
JNP

RS.@R4
mADDR
CONTIN

BlCB
NOV
JSR
BNE

IF.SAVX,I!ILIHFLG
;~et startin~ address
@ISAVEXPoR4
idulP a lin@ of locations
PC. TYPLIN
14\

BITB

tF.IHST,@tTHPHODiavoid

BED

7\

144440
14m6
144452
144456
IH460
144466

142737
013704
004767
001366
132737
001771

141:

000010 007324 61:
007336
71:
010524
11S:
000100 007330 lOS:

A-58

error

;~et

144422 000167 176536

51:

P~SS2,

;dePosit bste of data
;recover last character, parse next cOlland

t~in~

duplicate addresses

11 EVlluation ttodule Monitor MACRO VOS.OO Suod.. 13-K.,-83 04:10
rsimJ Routines

58 1444)0 004)6) 010512
59144414 000770
60
61 144476 102403
62 144500 10331)
63 144502 00016) 005500

JS11
DR

8':

P.~.

39-1

PC. TYPlINt4
111

BVS

m

Bee

91

JKP

G!:T1NS

a directive or verb
iis RO, ., Bt, etc.
ielse is an iostruction
~is

64

65 144506 00016) 002460
66
67

12$:

JIiP
DOVER8
.DSAil LSB

A-59

;handle directives and verbs

T-U Evaluation Hodull! Konitor KACRD V05.00 Sunda. 13-Kar-83 04:10 Pas, 40
ParsiM Routines

H+
G£TEXP f'ar5@~ a whole ('xPte5sion ano returns its '101ue in RS.
GEHEXP parses an eXHession or rE"cognizes an instruction or ;':IaboL

2
3
4
5
6

7 144512
8 144520
9
10 144522
!! 144526
12 144532
13 144540
14 144542
IS 144546
16 144550
17 144554
18 !44556
19 144562
20 144564
21 144570
22 144574
23 144600
24 144602
25 144606
26 1H610
27 144614
28 144616
29 144622
30 144624
31 144630
32 144632
33 144636
34 144640
35 1441>44
36 144M6
37 144652
38 144656
39 144662
40 144664
41 144666
42 144670
43 144674
44 144676
45
46 144700
47 144702
48 144710
49 144714
50 144716
51
52 144720
53 144724
54 144730
55 144734

;-.EHABl lSB
tF.VALU,'.CURCOHiset fla~ to allow non-valued objects
152737 000002 007326 GENEXP: :BISB
7_
iSYCh as undefined s':Ilbols, directives, etc.
BR
000402
004767
005037
152737
005004
120027
001464
120027
001461
120027
001004
004767
004767
120027
001522
120027
001517
120027
001003
004767
001)436
004767
100403
004767
000430
01)4767
100476
004767
106737
106437
100406
102446
103016
10.437
102442
000412

GErm: :JSR
000452
007332
7.:
ClR
000004 007326
BISB
GETm: ClR
000053
CHPB
BED
000055
CKPB
BEQ
oooon
GETER": : CIIPB
BNE
000402
JSR
16U32
JSR
CKPB
000074
a:
BEO
000133
CIIPB
BED
000047
C"PB
BNE
001236
JSR
007526

3$:

000450
007436

2.:

000576
007332
007332

007326

102011
St:
142737 000004 007326
005737 007706
100032
000402

004767
004767
120027
001506
56 H-4736 120027
57 144742 001507

000246
166456
000076
000135

;initialize and set valued expression
;clear level counter and lert flass
.F.UHDF,~tCURCOH;clear undefined expression flas
iinitialize tel'l re~ister
R4
RO,tOS3
;is it +?
GEropv
;~S, accept operator
RO,t055
Hs it -?
GETIW'II
RO,t043
its it t?
PC,EXIH!!
mXPFlG

U

PC,EXINIT
PC,GETNXT
RO,t074
lPAREN
RO,t133
lPAREN
RO,t047
3.
PC,GETUT
GETOPV
PC,III)"CH
2.
PC,GETNKB
GETDPV
PC,RADCH

;set valued expression
;set next character
iis it <'?
;':IeSr do lett parenthesis
lis it [?
; ':Ies , do left parenthesis
; is it''?
;Jl{)
jparse literal tel'l
ifort'e VillJ@d e:t.F'ression 1
;~es, do ri~ht parenthesis
hs it J?
;~s,

do risht parenthesis fetch

OPt

t-11 Evaluation ~odul~ Monitor MACRO \lOS. 00 Sund., 13-M",-83
~int Routines

~59144150
"""'''''
601W'52
61 lm56

62 IH760
63 14~76~
64 1~4770
65 144m

66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
110
87
8Il

103412
120027
103007
116001
042701
020127
103053

'\.,'\\\'\
BLO
C"PS
BHIS
HOVll
BIC
CKP
BHIS

~""
000060
1'5'5774
177770
000006

JHP
JKP

CIIOH2

5$:

145042 000167 176116

13\:

145046 020627 007410

lPAREH: CKP

145072
145076
145102
145106
145110
145114
145116
145122
145124
145130
145134
145140
145144
145150

004767
004767
004767
110037
004767
000602

007343
007333
000102
166324
177432
007343
166304
000042
000064
1662..6
007343
166256

j~es,

jare we at top level?
ina, error
ii5 expression supposed to be valued?
;not necessaril'S
iwas tera valued?
;00, but it was user defined

EHDEXP: lSlB
SHE
HTPS
BVS
HTPS
!HI
BVS
91 :
BIIC
TST

000112

\1t.\."S\ ,~.
not an operator
RO.t060
Hs it above /?
;~~S, not an operator
61
;~~t parsins: code
PARAKS-040IRO).RI
ilask out the s:arba~e
1177770.Rl
jis it an operator?
Rl.t6
;~S, do operator
OOOPER
\\.~ .....~'"\.y~\~,

@tlEVEl
131
"CURCO"
51
@tEXPFlG
91
131
'51
@!fLAGSI
121
GETLCH

1~'5002 10'5737 007333
145006 001015
145010 106437 007326
14'50I~ 102410
14'5016 106437 007332
145022 100~01
145024 102406
14'5026 102003
145030 005737 007706
14'5034 100101
145036 000167 166344

103773
004767
010546
113746
105237
004767
004767
004767
010504
112637
012605
004767
000700

~O-I

ina lore operators, but de previous one

6$:

m052
145054
145060
145062

""""",,,,,
61

Pas.

PC.EXDOOP

144776 004767 000216

89 14'5066

90
91
91
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114

""1'1'>"£\

Q~:10

JSR

1ft

;00, error

iwas valued, no

probl~1

iare we in PASS1?

ino, undefined s~lbol is not allowed
iget last character back in RO
ishow error

SP.IBOTTOKtI0.t22.t2. jis there rool to recurse?
j(that was S words tor future JSRs, 11 for interupts, and 1 safet~)
;no, parenthesis too deep
131
910
;torce upper expression to be valued
JSR
PC.EXINIT
R5,-(SP)
KOV
;save accululator
@tOPER!T'-(SP) iand previous operator
MOV9
;show we are ~oin9 deeper
IHCB
mEVEl
hnitialize accu•• and operator for neKt level
JSR
PC.EXIHll
;set first character of nested eXpression
JSR
PC.GETHXT
;g;et value of nested e):pression
JSR
PC.GEIEXI
R5.R4
h.ested value beCOteS operand
KOV
ISP)t.@WP£RAl ;r~over operator
ItOVB
KOV
ISPlt.RS
;and accuaulator
;~et character after right paren
PC.GErNXT
JSR
;and look for next operator
8R
GErOPR

MOPER: JSR
JSR
JSR
HOVB
JSR
BR

PC.EXIHlT
PC.EXDOOr
PC.GETLCH
RO.@lOPERAT
PC.GETHXT
GETERH

iforce valued expression
iexecute previous operator
iget new operator
istore it
;~et next character
Hook for a hr.

145152 105337 007333
145156 100731
145160 000417

RPAREH: OECB
BKI
BR

mEVEL
131
EXDOOP

iare we at top level?
;~s, too .an~ ri~ht parenthesis
ido last operator inside parenthesis

145162 004767 177764
145166 011505
145170 000207

,PAREH: JSR
KOV
RTS

PC.RPAREH
@R5.R5
PC

ido a fetch

145172 106437 007326

EXIH1T: HTPS

mURCOil

ih.Js expression

A-61

alread~

~nd

beer. initialized?

return

T-ll Evaluation Module "onitor ItACRO \105.00 SUnd•• 13-N.r-83 04110 P••• 40-2
P.rsins Routines
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
\31
132
133
134
135
136
137
138
139
140
141
142
143

145176
145200
145206
145210
145216

102007
112737 000053 007343 EXINll I
005005
142737 000002 007326
4$:
000207

145220
145224
145226
145232
145234

106437 007326
102774
113701 007343
006301
000171 145146

evc
Nove
CLR

aIea
RTS

EXDOOPI HTPS
BVS
HOVe
ASL
JNP

145240 012702 151372
145244 000167 175742

12.:

145250
145252
145254
145256

OPRTBL: .WOItD

145260

145262
145264
145266
145270
145272
145274
145276
145300
144 145302
145 145304

152130
143164
143164
143164
143164
152m
143164
143164
143164
152142
152154
14J164
152160
143164
152164

41
t053,@tOPERAT

;set + as default operator
iclear ex?ression ~rcu.ulatDr
tF,VALU,@tCURCOHishow expression is valued

R5
PC

ii1 expression is valued, do operator
jnot valued
;set operator
~tOPERAT,R1
;aake a word index
R1
@OPRTBl-102(R11 iexecute operator

@tCURCON
41

NOV
tUHDEFX,R2
JIIP
ERROR
.DSABL LSB

.WORD
•WORD
.WORD
•WORD
.WORD
.WORD
.WORD
•WORD
.WORD
•WORD
•WORD

; ':IE'S

LDGOR
CHOH2
CI!OH2
CHOH2
CNOH2
LOGAHD
CHOH2
CHOH2
CHON2
NULTIP
ADOII
CHOH2

•WORD

sum

.WORD
•WORD

DIVID

CNON2

A-62

;point to undefined expressiorl aessa!le
;show error
j!

,.,
;t

a

;I
;&

,.,
;(
;)

a
it

;,
;;.
;1

1-11 Evaluation "odule "onitor MeRO V05.00 Sundo. 13-Ho,-83 04:10 Po •• 41
Routines

Parsin~

I

2
3
4
5
" 145306
7 145310
8 145312
9 145316
10 145322
11 145324
12 145326
13 145330
14 145334
15 145336
16 145342
17 145344
18
19 145350
20 145354
21 145360
22 145362
23 145364
24 145370
25 145372
26 145374
27 145376
28 145400
29
30 145402
31 145404
32 145410
33 145412
34
35 145414
36 145420
37 145424
38 145426
39 145m
40 14543-4
41 145H6
42 145440
43 145442
44 145444
45 145446

itt

GETHHB parses a nulber and returns all condition

fla~s

lowered.

i--

005303
010346
004767
004767
100373
012603
005001
120027
001427
004767
100402
000167

GETtmB::DEC

166000
007034

1$:

000056
006740
175614

4$:

004767 165742
004767 006776
100410
102770
162700 0000.0
006301
006301
006301
060001
000763

3$:

005303
004767 166016
010104
000207
0047.7 165676
004767 006732
100767
162700 000060
006301
010146
006301
006301
062601
060001
000762

ItOV
JSR
JSR
BPl
HOV
ClR
CHPB
BED
JSR
BIll
JHP

R3
R3,-ISP)
PC,G!:TCH
PC,NUHCH

;savt'

II

hIes, wait tor first r.on-nuaeric character·
;~ back to besinniM of nUlber

ISP)hR3
Rl
RO,S056
2.
PC,RADCH
31
CIIOH2

DR

PC,GElCH
PC,HUllCH
51
41
t060,RO
Rl
RI
RI
RO,RI
31

SS:
6S!

DEC
JSR
Hoo
RTS

R3
PC,6[TNXT
Rl,R4
PC

2$:

JSR
JSR
SKI
SUB
ASl
HDV
ASl
ASl
ADD
ADD
BR

PC,IlETCH
PC,HIJIfCH
61
to60,RQ
Rl
RI,-(S?)
Rl
Rl
ISPlt,Rl
RO,Rl
21

JSR
J5S
BHI
BVS
SUB
ASl
ASl
ASl
ADD

A-63

runnin~

pointer to peek. ahead

iis it 0 thtoU9'h 9?

hs first non-nuaeric chancter a period?
;~es, parse a decilal nulber
;is it alphabetic?
;00, parse an octal nulber
Hlle!!lalr libel besins with a nUlber

;is it 0 through 7 or

a through

9?

ino, end of nUlber

;8 and 9 are illeS'al in octal nUlbers
'like it BCD

,accUMlIate digits
;set next dhlit
;~et character after nolber
;store value at oulber

;trailin~

dedlal F'oirlt

iaccUiulate disits
iset next disH

T-ll Evaluation ""601. "-nitor MACRO V05.00 Sunday
PitSin~

13-~.r-S3

04:10 Paie 42

Routines

1
2
3
4
5
6
7
8
9
10
11
12
13

itt
GErM"" parses a nale and converts it into RADSO at locations TBLTOP arid
T8I.TOP!2. It the nale has a corres?oodins value, it is placed in R4.
R2 is an index to where the nail! is stored. It cao index either the RAD50
table in ROH tor predefined 5~abo15' or th@ user 5~.bol table. GETNAH
returns condition flags to indicate these options as follows:
V=1 leans the nale has no value

N=l leans the na-e is user defined (not ~redefined)
C=l leans the nail! is a Ine.onic, directive, or verb
N=O, V=O, C=O leans that the naae is RO, SP, PC, Bl, UR, etc.
H;:::O, 11=0, C=l aeans that the nile is an instruction
N=O, V=l, C=1 aeans that the nate is directive or verb
N=l, V=l aeans that the nale is an undefined 5~abol
N=l, V=O aei~S that the nale is a user s~abol

14

15
16
17
18
19 115450 112737
20 145456 005001
21 145460 004767
22 145464 004767
23 145470 004767
24 145U4 100431
25 145476 105m
26 145502 001lO6
27 145504 010137
28 145510 112737
29 145516 005001
30 145520 004767
31 145524 004767
32 145530 004767
33 145534 100421
34 1455lb 105337
35 115542 001366
36 145544 004767
37 145550 004767
38 145554 100373
39 145556 000412
40
41 145560 004767
42 145564 010m
43 145570 012737
44 145576 005001
45 145600 004767
46 145604 ~101l7
47 145610 005l03·
4ll 145612 004767
49 H5616 013700
SO
51 145622 OOS002
52 145624 020062
53 115630 001011
54 145632 020162
55 14S0l6 001414
56 145040 020127
57 145644 001003

;-.ENAB!. lSB

000003 007341 GETHAK: :KOIJB
ClR
1$:
JSR
006712
JSR
165626
JSR
006606
BM!
DECD
007341
BIlE
tIOV
007320
MOVB
000003 007341
ClR
31:
JSR
00bb72
J5R
Ib5566
JSR
006546
BM!
DECB
007341
~E

165546
006526

41:

J5R

JSR
BPl
BR

21:
000264
007320
000003 007341
000244
007322

...

6.:
S.:

165610
007320
156142
156144
006200

10.:

ll,mOUNT2
Rl
PC,ASCRAD
PC,GETCH
PC,RADCH
21
@tCOUlIT2

iconvert ASC!! in RO to RAD50 in Rl

;get ~ext character
iis it a le~al RAD50 character?
;no, end of na.e

If

Rl,@tTBlTOP
t3,ftCOUHT2
Rl
PC,ASCRAD
PC,GETCH
PC,RADCH
61
mOUNT2
31
PC,GETCH
PC,RADCH
41
51

jdiscafo all characters after 6
;i~ character still part of nale?
;':Ies
,pad Rt with spaces
istore first word of naae

ClR
JSR
MOV
DEC
JSR
MOV

PC,PADRAD
RJ,ftTBlTOP
t3,@tC0UHT2
Rl
PC,PADRAD
RJ,@tT8LTOP!2
R3
PC,GETNXT
@lUlTDP,RO

ClR
CMP

R2
RO,D5YHS(R21

;colPare naae to predefined ones

JSR
ItOV
~OV

;set next leaninsful character
jRO, Rl contain converted

~a.e

BNE

m

CMP

RIoDSYHS!2(R21
iget value of predefined 5~abol
PDSVAl
iaight this be a bste aode anelonic?
R1ot50150102
lif
inc

BED

ClIP
ONE

A-64

T-11 Eyaluation "odul~ Monitor ItACRO V05.00 Synd.l. 13-Kar-B3
Routines

0~:10

Pas,

~2-1

Parsin~

5B 145646 005762

59
.0
61
62
63
64
65
66
67
68
69
70
71
72
73

1S614~

145652 00140.
14565~ 022222
1~5656 020227 000770
145662 103760
14566~ 000167 003070
145670
145674
145676
145700
145702
145706
145710

020227 000054
103401
002005
006202
016204 007732
006302

la:

21$:

13$:

14$:

7~

15t:
7$:

17$:

20$:
19.:

;and is nale the saae without triiling 'B'?
;~es, handle b~te lode case
iadY;
R2
IROIR2hR4
;RO thrOtJSh ,
R2
lSI

CHP
BHIS
KOV
CCC
RTS

R2.tDIRVRB-DSYKS
;BASIC or hiSh,r
71
BRKFll-(DSYKURt4-DSYKS)IR2).R4 m throYSh B4
iflas a predefined s~lbol
PC
iand return

CKP
SIHS

sec

R2.ICKHEKS-DSYKS
iCLC or hiSiher
171
iflas a directiYe or yerb

CLN
RTS

PC

ASR
KOV
ASL
CKP
BHIS
KOV

BR
18$:

DSYKSt2IR2)
PDSVAl
IR2ltdR2lt
RbtTOPHAK
101
GETSYK

BlO
BGE
ASR
KOV
ASl
BR

PDSVAI..: :CHP

000~05

145712 020227 000100
14S716 103004
75 145m 016204 007700
76 145724 000257
77 1~5726 000207
78
79 145730 020227 000300
80 1~5734 103003
BI 145736 000277
B2 14SHO 000250
83 1457~2 000207
B4
85 HS744 006202
B6 145746 016204 155~~
B7 1~5752 006302
as Im5~ 020227 000340
B9 145760 103003
90 145762 012702 000064
91 145766 000421
92
93 145770 020127 006200
9~ 145774 001014
95 HS776 020027 075131
96 146002 001411
97 146004 006202
98 146006 006202
99 146010 105762 1557H
100 146014 100323
101 146016 006302
102 146020 006302
103 146022 052704 100000
104 146026 162702 000340
lOS 146032 000257
106 14603~ 000261
107 146036 000207
lOB
109
110 146040 012700 OQOQ~O
III 1~6044 004767 006346
112 1~6050 105337 007341
113 146054 001371
114 146056 000207

TST
BED
CKP
CKP
BlO
JKP

CKP
BHE
CKP
BEQ
ASR
ASR
TSTI
BPL
ASL
ASl
BIS
SUB
CCC
SEC
RTS
.VSAIL

PADR1: NOV
JSR
PADRAD: DrCB
BNE
RTS

;and ntum

R2
CBASES-«CKNEKS-DSYKS>/2>IR2).R~

;~t

yalue of Inetonic

R2
R2.IKNEKS-DSYKS
HiALT or higher
IBI
tKNCCC-KNEHS.R2 ;ind" lneoonic CCC
191

;jwte lOde naae?
Rlot50lS0102
;no
201
RO.I(23150t27>ISOtOI
iSWAB anelonie?
;~e5' not b~te lode
201
R2
R2
iinstruction lesal in
PARAltS-<IR2)
;no
2a
R2
R2
;adjust opcOOe to b~te lode
t100000.R4
tKNEKS-DSYI'!S,R2 iad...iust indl!x to instruction table

b~te IO(

iflag an instrijction
PC

m
10~0,RO

PC.ASCRAV
@lCOUIfT2
PADRI
PC

A-65

iroijtine to pad RADSO triplet with spaces

T-11 Evaluation Module Monitor "ACRO V05.OO Sond•• 13-Ha,-83 04:10
Parsins Routines
1
2
3
4
5
6 146060
7 146064
B 146070
9 W072
10
11 146076
12 146100
13
14
15 146104
16 146110
17 146114
18 146116
19 146122
20 146124
21 146lJ2
22 14m.
23 146140
24 146146
25
26 146150
27 H6154
28
29
30 146156
31 146162
32 146166
33 146170
34 146174
35
36
37 H6176
3a 146202
39 H6206
40
41 146210
42 146214
43 146220
44
45 146222
46 146230
47
48 146232
49 146240
SO 146242
51 146246
52 146250
53 146252
54 146256
55 146262
56 146266
57

Pa~.

43

itt
GETlI! pa,s,s ASCII lit.r.ls.
j--

JIIf'

CItOH2

next character, don't fold case
iis it :pressior\ has been used

PC,GETNXT
pe,GETEXP
-(SP),-(SPI
R5,ISPI
21SPI
RO,1137
11
PC,GETNXT
PC,GETEXP
R5,2ISP)
2ISP)
@tSAVEXP,R4
@tTKPHOD
41
.1.R4
@R4,Rl
ISPhRO
RO,Rl
2(SP)'R1
31
PC, TYPAllR
pe,TYPlDI
61
R4
@tTMPKOD
61
R4
RMtADVADR
21
(SPIt. ISPIt
CONTIN
@R4,R1
ISP)'RO
RO,Rl
2(SPhRl
t177400,R1

A-68

;get character atter r
;get valiJe ta be searched for
;.ak!! space for two scratch locQtion on stack
;save vallJe to be 'Searched for Oft stac~;
hl"litializl? cOIiPleaent of search .as~. to zero
ii'S next character an underscore?

ina, optional task para.etet not F'resent
;~et character after underscore
iset search task
,store it on stack
;coI?le.ent task
i§et starting address at search range
,are we in byte lode
;~es, perfort bytewise search
;ror word sE'arch, lake sure address is fvefl
;get a word
j~et search value
jeo.pare values
~ isnore

bits that are .asked out
iM latch

address of latched location
itl§'e contents! but not as an instruction
iTYPLOl alread~ increaented R4
iadvance to next location
;ore we in b~te lode?
;~es, advance blJ one
ielse advarlce a whole word
;see if ef,tire raMe has been checked
;continue searchin~
idiscard stacked vallJes
irt't'over character in RO, fuse next ('cI.and
;t~pe

;'set a b!!lte
;get search value
icolPare values
jignore bits that are .asked out
iisnore discrepancies in high b~te

1-11 fViluition Kodul. Keni!o, KACRO V05.00 Sunda. 13-K.r-83
Routines

O~:10

P....

~l-l

Patsin~

172 W756 000747
173

174
175
176
177
178
179
180
181
182
183

H6700
146764
146770
H6n4
147000
147004
147010
147014
147020

185
186
187
188
189
190
191
191

H7030
147032
H7036
147036
147042
147046
147050
147054

BR

004767 164540

013704
012702
032704
004767
032704

004767
113704
012702
18-4 147024 132704

I1O'J

HOV

BIT
JSR
BIT
JSR
HOVB
KOV
BITB
BEG
JSR

001402
004767 000100

PC.CRlF
'tFLAGSloR4
tDIRVBI.R2
tF .PASloR4

pc.a

tF.HOST.R4
PC.II
itTHPKOO.R4
tOIRVSI.R2
IF .INST .R4
H

pc.a

;start a n~w line
;get a COPS of SOle lode flags
;point to PASSl cO.lland
;see if welre in PASS1 or PASS2
;print proper lode and point to NOPROT
;see if HOST or NOHOST is actiYI!
;pri~t

proper aode

;get a cOP~ of the rest of the lode flass
;point to INSTRU coe.and
;see if instruction lode is active
;brcmcn if not
jprint propel' lode

~.:

012702
132704
001002
012701
004767
193 147060 012701
194 147064 132704
195 147070 001402

156346
000002
156412
000056
156362
000200

196 won 004767 164676
197 147076 012702 156376

198
199
200
201
202

EKOD:: JSR

007706
156256
100000
000132
004000
000122
007330
156366
000100

51

147102
147106
147110
147114
147120

131704
001002
004767
012701
031767
203 W126 004767
204 147131 000167

6$:

KOV
BITB
SHE
MV
JSR
KOV
8lTB
8I:U

7':

000300
000022
156432
lOS:
004000 040203
000004
177216

JSR
KOV

Bm
BNE
JSR
KOV
8lT

JSR
JHP

tOlRIIBA.R2
tF.ABS.R4
61
tDIRIISS.R2

;point to ABSOlU

c~.. and
;see if absollJte or SYlbolic IIOdl! is active

i;H)solute .ode
;point to s~lbolic lode
pc.a
jprint ?T'oper lode
;poif)t to 8YTE conand
tDIRV8H.R2
IF.BYTK.R4
;see i1 b~te lode is active
7.
Ht isn't, print rrothins
PC.fRINT2
;else print BYTE cO'land
;point to word lode
tDIRVBN-4.R2
Ii t not b~te or inst.rurtiorl then word
If.INST·F.BYTK.R4

20.

pc.a
tDIRVBTtI4.R2
IF.VT.PERKOD
PC.I.
EeON

;point to vtlOde
;see if set
jgo show wich vt tode
jand re-turn

-(Sf)
(SP)
2.
(R211. (R11t
PC.PRIHT2
t400101It040.RO
PC.CHROUT
(SPit
31
(R211'(R2It
PC

;save- Z flas
,get back i CQP~
;print ('oatand pointed to b~ R2
;else- advance to next CQ[IIt.anlj
;print co.tand, advance R2
1(so,'.> 

205

206 147136
207 147140
208 147141
20'1147144
210 147146
211 147152
212 147156
113 147162
214 147164

106746
106416

001001
011222
004767 164622
012700 004440
004767 164346
106426
001401
215 147166 022222
216 147170 000207

ll:

2$:

HFPS
KTPS
SHE
CKP
JSR

3S!

JSR
KTPS
BED
CMP
RTS

ItO\I

A-69

; reco~er Z 11as

ii1 we advanced before, don't Ijo it asain
;~ip oyer next co ••and

T-11 Evaluation "odulp Monitor MACRO UOS.CO
Parsins Routines
1
2
3
4147172
S 147176
.147200
7 147204

18 Hmo
19 147232
20147234
21 147236

22 Hmo

23 147242
24 147244
25 147246
26 147250
27 147252
28 147254
29 147256
30147260
31 147262
32147264
33 147266
34 147270
35 147272
36 147274
37147276
38 147300
39 147302
40 147304
41 147306
42 147310
43 147312
44 147314
45 147316
46
47 147320
48 147324
49 147330
50 147336
51 147342
52147346
53 1473S0
54 147354
5514735.
56 147362
57 147366

13-M.,-83 04:10

P.~

.SSTTl Directive and Verb
162702 000100
006202
020227 000042

103403
8 147206 005303

9 147210
10 147214
11
12
13 147220
14147220
15 147222
16 147214
17 147226

Su~'.

013701 007330
000172 147220

OOIltRSllSUS
ASR
CMP
1Il0

DEC

u:

ItO\I

JMP

44

Handlin~

Routines

tDIRVRB-DSYKS,R2;retove offset frot index to verb
'I~.e ita word index
R2
Hs this verb an  sea. reF'liIceaent
R2.'URBDS1-~BDSP
;00
a
;Iake it so thit we can use pr~viaus routines
R3
;trol the escape seGuence handler
@tTMPftOD.Rl
@VRBDSPIR2)
,di5~atch to proper handlins routine

IJRBDSP: :

147320

147m

14741.
150202
150212
150222
150306
150504
150442
143164
143216
147776
W700
147466
147560
147634
147654
146150
146156
136752
146176
146210
146222
147444
146270
150012
146312
146760
146Jl2
152040
147374
147406

.WORD
.WORD
,WORD
.WORD
.WORD
.IIORD
.WORD
• WORD
.WORD
.WORD
.WORD
•WORD
.IIORD
.IIORD
.IIORD
•WORD
•WORD
URBDS1: .WORD
.WORD
.WORD
.IItlRD

.IIORD
.IIORD
.IIORD
.WORD

.WORD
.WOIID
.WORD
.WORD
•WORD
•WORD
•WORD

HELP:: MOV
012702 156242
2.:
004767 164174
JSR
112737 000010 007341
"OIIB
a:
JSR
004767 164432
020227 156442
CMP
BHIS
103010
DECS
105337 007341
001763
BEO
012700 004440
HOU
004767 164142
JSR
BR
000763

HRP
Gl)

STEP
PASS1
PASS2
HOST
HOHOST
TAlK
LOAIr
CMOH2
CMON3
$.EVEN
\.ASCI
I. BYTE
I.IIORD
I.BLKS
I.BLKW
EADS
[CAN

SHALT
EBY!
ElNS
ECLR
DELETE
BIIIM
IRPEAT
ESYI!
EMOD
EREG
TYPTBL
UTON
vroFF
IDIR~B.R2

PC.CRLF
18,,@tCOUNTZ
PC,PRINT2
R20ICHNElIS
31
@lCOIJHT2
21
1400t0111040.RO
PC,CHROUT
11

A-70

; .START

;.END

;ABSOLU point to the start of escape
;CANCEL
;EXIT

;Bm
HNSTRU

;CLEAAI
.DELETE
;WORD
; REPEAT
.SYMBOL
;SHOWHO
; S!iOl/RE
;SIIOWSY
mON
;VTOFF

the verb/dirpctive table on the console
;start i new line
;put 8 cOllands on a line
; print a cOMantj
,have we done the whole table?
;t!n"!

;~s

,have we finished a line?
;~es

;t,pe <.pace> (t.o>

T-l1 Evaluation Kodule Monitor HACRO V05.00 Sund" 13-H,r-83 04:10 P,se 41-1
Directive and Verb Handlins Routines

58
59
60
61
62
63
64
65
66
67
68
69
70

COHTIN

;recover character in RO, continue parsins line

147374 052767 004000 037726 VTON: SIS
W402 000167 174176
VTJMP: JIIP

Ir.VT,TMPHOD
CHON5

;turn vt .ode on

W406 042767 004000 037714 VTOFF: SIC
147414 000772
SR

Ir.VT,TIIPHDD
VTJMP

;turn vt off

147370 000167 174216

3t:

000200 007706 STEP: :
000001 007324
007746 006500 GO::
172256

JIIP

W416
147424
147432
147440

052737
152737
023727
000167

BIS
BISB
CHP
JNP

147444
147446
147452
147454
147462

005203
DELETWINC
004767 175040
JSR
005303
DEC
132737 000002 007326
BITS
Jltp
000167 176552

71
72

73
74
75
76
77
78
79
80
81
82
83
84
85
B6
87
B8
89

147466
147474
147500
147504
147512
147516
147522
147526
147530
147534
90 147540
91 147542
92 147546
93
94 147550
95 147556
96
97
98 147560
99 147566
100 147572
101 147576
102 147602
103 147604
104 147610
105 147614
106 147616
107 147622
108
109 147624
110 147632
111
112
113 147634
114 147640

013737
004767
113746
052737
013704
004767
112637

110514
005237
120027
001003
004767
000752

007756 007334 t.BYTE: :MOV
175022
u:
JSR
007330
IIOVB
000200 007330
BIS
007334
IIOV
005006
JSR
HOVB
007330
HOVB
INC
007334
000054
CIIPB
BNE
JSR
163660
BR

013737 007334 007756 2$:
000571
013737
004767
013704
004767
010524
010437
120027
001003
004767
000761

HOV
BR

007756 007334 t.WORD::MOV
1$:
174730
JSR
007334
HOV
JSR
004726
NOV
IIOV
007334
CIIPB
000054
BHE
JSR
163604
BR

013737 007334 007756 2t:
000543
004767 174662
106437 007326

MOV
DR

t.BUB: lJSR
NTPS

Ir .SST, PlrLMlSl ishow

WE' are sinsle stepping
tr.SST1,PILINFLG
PIISP,IIUR
jis user SP in his RAH?
;IJse ke':lpad lanito:' GO routine
1001

;counteract earlier DEC RJ in this C3se
R3
;set SYlbol nate to !;Ie deleted
PC,GENEXP
;r.ow prepare to use  seCluence routine
R3
tF.VALU,@tCURCOHireplaces test on LASCOH in EDEl
;!:Io to routine t.o delete a S':ltbol
EDELl
@ttADDR"tADVADR;!:Iet a scratch COP':I 0' current address
PC,GETEXP
;set a value to be deposited
!tTIIPHDD,-(SP) aool ADRCHK into thinldM we are in b':lte lode
Ir.BYTH,@ITMPMOD
;!:Iet runniM copy of current address
@IADVADR,R4
;check that it's not in probcle,j RAM
PC,ADRCH2
(SPH,@ITHPItOD ;restore proper lOde bits
;deposit a b",te
R5,@R4
@IADVADR
;advance runniM address
hs next. character a COllla?
RO,1054
21
ina
PC,GETHXT
;get character after COila
;deposit another b~te
11
'tADVADR"tSADDR;update current address
VCOH
@ttADDR"tADVADR,!:Iet a scratch COP':l of current address
PC,GETEXP
ifet a value to be depo5ited
;set runnins address
mDVADR,R4
,check. that it's not in protected RAI1
PC,ADRCH2
R5,(R41t
ideposit a word
;advance runniM ('01'':1 of (,lJrrent address
R4,@tADVADR
RO,1054
lis next character a cOI~a?
2$
ina
PC,GETNXT
;set character after COila
;deposit another word
If
itADVADR,UtADDRiIJPdate current address
VCON

PC,GETEXP
@ICURCOH

A-71

;set arsulent
icheck it it contained undefined s!:Ilbols

T-ll

Evaluatio~ Module Monitor MACRO V05.OO Sunda. 13-Mar-83 04:10 Pase 44-2
DirfCtive and Verb Ha~dling Routines

115 W6H 001H6
116 147646 060537 007756
117 147652 000533
118

SHE
ADD
DR

VERRI
R5,mADDtl
VCON

;it did, refuse .8LKB directive
;add it to current aodress

PC,GETEXP

i~et ar~Ulent

~tCURCOH

;check if it contained undefined syabols
Ht dieh refuse .lItKW dirto'ct-ive
;.ake a scratch cop~
idouble it
;add it to current address

119

120 147654
121 147660
122 147664
123 147666
124 147670
125 147672
126 147676
127
128
129 H7700
130 147704
131 147712
132 147716
!33m7n
134 147m
135 147730
136 147736
137 lm42
138 147746
139 147752
1<40 147754
141 147760
142
143 147762
144 147770
I4S 147774
146
147
148 147776
149 150002
150 1,0010
1,1
152
1,3 1,0012
1,4 150014
1,5 150020
156 1,0024
157 1,0026
158 150030
159 150032
160 150036
161 1,0040
162
163
164
165 150044
166 1,0046
167 1,0052
168 1,00,4
169
170 1,0060
171 1,0064

004767 174642
106m 007326
001136
010504
006304
060437 007756
000521

110037
013737
004767
120037
001417
113m
0,2737
013704
004767
112637
110014
005237
000754

t.BLK": :JSR

ms

SHE
NOV
ASl

ADD
DR

t.ASCI::HOVB
007345
007756 007334
ItO'I
163m
1$:
JSR
007345
CHPB
BEO

HOVB
DIS
HOV
JSR
HOVe

007330
000200 007330
007334
004562
007330

~OVB

007334

INC
BR

013737 007334 007756 2$:
004767 163432
000462

~IIV

JSR
BR

00,237 007756
\.EVEN: lINC
BIC
042737 000001 007756
0004,4
DR
00,203
004767
106437
001056
005705
001450
120027
001043
000167

174502
007326

IRPEAT: : I NC
JSR
~TPS

BHE
TST
BEQ
CHPB
BHE
JHP

0000,4
176232

005203
004767 000006
005303
000167 176304
004767 174436
120027 000137

VERRI
R5,R4
R4
R4,HfADDR
VCOll

;save deliaitet
a scratch cOP~ of current address
iset ne~t character, don't fold to uPper case
PC,6ETCHC
;have we reached deliliter yet?
RO,@'DELlH
iyes, done
21
@tTHPHOD,-(SPI ifool ADRCHK into thinking we are in byte lode
tF.BYTH,@'THPHOD
@IADVADR,R4
iget runniM COPY of current address
ichedk that it's not in protected RAK
PC,ADRCH2
(SPltr@tTHPHOD irestore proper lode bits
;deposit a b!:lte
RO,'R4
@lAIIVADR
;advance running address
RO,UDELIM

@ttADDRr9.ADVADR;~et

11

@tADVADR,@'IADDR;uPdat. current address
;set character after deli.iter
PC,GElHXT
VCON

@tlADOR
tI,@tlADDR
VCON
R3
PC,GETEXP
mURCOH
VEftRI
R5
RERR
RO,t054
VERR
EREP

;counteract earlier DEC R3 in this case
iget repeat count
;check if it contained undefined ssabols
lit did, refuse REPEAT cOI.and
isee if a repeat of zero was given
; refuse zero
;cher~ that a COila follows
;no COila. error, .i55in~ paraleter
;so to repeat cO.land line routine

.EHABl
1tO'IE"
" INC
JSR
DEC
JHP

LSD

E~OV

;counteract earlier DEC R3 in this case
address pair
;prepare to use fIi tor "ACRO V05.00 Sunda. 13-"a,-83 04:10 Pose 44-4
Directive and Verb Handling Routines
229

230
231 150344
150347
232 150352
233 150354
150357
150362
150365
1503)0
150m
1503)6
150401
150404
15040)
150m
150m
150420
150423

150m
15~31

150434
150m
234 150441
235
236
23) 150442
238 150442
239 150450
240 150452
241 150456
242 150460
243 150466
244 150470
245
246 150472
247 150500
248 150502
249
250 1505~
251 150512
252 150514
253 150520
251 150522
255
256 150530
25) 150534
258 150510
259 150544
260 150550
261
262 150556
263 150562
264 150566
265 1505)0
266 1505)4
26) 150576

056
101
015
105
105
124
040
050
123
105
040
050
116
102
101
054
101
123
104
101
077
000

123
122
012
040
130
051
122
122
125
051
102
123
104
122
113
040
040
105
040
051
000

124
124
050
III
054
040
105
liS
054
040
lOS
040

•. snn:

.ASCII I.STARTI

;string to latch for enablins at load lOde

;

HOV
JSR
HTPS
BNE
MOV
CHP
SHE
BR

R4,-ISP)
pe,GETEXP
@lCURCOH

present value of s~.ool
value to be set
;check if it contained undefined 5~lbo15
iit did, refuse 5~lIbol definition
jput value in R4
;see if s~.bol or label is beins chan~ed
;it is, which is not perlitted
;no chanse, 50 auietly ignore co.~and

007320
007322
173202
007326
007322
007320

022626
000754

12t:

010446
004767 173146
106437 007326
001332
010504
022604
001J2S
000742

2.:

lOt:

~tTSLTOPt2,-ISP)

PC,6[TEXP
;~et value to be set
@lCURCOH
icheck if it contained undefined 5~lbo15
iit did, iSnore s~lbol definition
121
R5,R4
;~et value to be set
ISP)t,@tTBLTOPt21,.cover n..e
ISP)t.~ITSLTOP

91

\JI

R5,R4
ISP)t.R4
31
61

saved nale
;auiet1!J il1nore

;SiYl
;~et

102564 020071 054114 UNDErx: .RADSO /UNDEFINED EXPRESSION/

A-77

s~abol

definition

I-II [valuation Hodule HDnitor HACRO VOS.OO Sunda. 13-Har-83 04:10 PM. 45-1
and label Handlin~ Routines

S~.bol

151400
151406
58 151410
59 151412
151m
60 151424
61
62 151426
63 151m
64 151436
65 151m
66 151446
67 151450
68 15H52
69
70 15HS6
71 151462
72 15H66
73 151472
74 151474
75 151500
76 151504
151512
77 151514
78
79 151516
80 151522
BI 151526
82 151532
B3 151536
84 151540
as 151544
86
87 151500
88 151552
89 151556
90

000340 0633;",; 074701
057760
•WORD 0
000000
070530 017574 001136 REPOFO: .RADSQ fREPEAI
0020;",; 071330
.WORD 0
000000

or

ZEROf

132737
001702
004767
106437
100275
102037
013704

000002 007327 DOLABL::mB
BEO
JSR
161764
HTPS
007332
BPL
BVC
HOV
001756

IF.VALU,PILASCOH
31
PC,GETNXT
;see what kirld of label we afe defifllos
mXPFLG
;r-redeflm!d s':IIIbols Limit be labels
31
;user nale all"ead'J deflflel~
81
;iet value to be set
PISADDR,R4

013702
162702
020227
101011
012702
000167
076452
045400
000000

007462
000006
006500

MOV
SUB
CMr
8HI
MOV
151504
JMP
171506
D4571 0 024324 TBLFUL: .RAD50

UTBlBOT ,R2
;set bot tot of s~.bol table
;~o down one entr~
IIuR2
R2,.tUR ;is there sPace for new entr~?
;~S
11$
IlBlFUL,R2
;point to lE'ssaSe
;prinl error ,essaSe
ERROR
flABlE FULl!

106427
010237
013722
013722
010422
IOW7
000167

0003\0
007462
007320
007322

91:

11$:

0

MTPS
MOV
MOV

'.ake s~lbol table alterations atolic
1340
jb~ blockin~ console break, etc,
R2,PITBLBOT
PIlBLTOP.!R2lt ;slore first word of nale
@ITBLTOPI2,IR211;and s.cond word
;store SYlbol's value
R4dR2lt
;restore interrupt service
tooO
; recover character in 1<:0, get nl?i:t cOlillarld
CONlIN

ItOV

NOV
MTPS

000000
172042

010446
013704 007756
000702

•WORD

JliP

BS:

R4'-(SP)
@IIADlIlhR4
101
BR
.DSABl LSB
II1JV

MOV

A-78

;save PT!Sent value of label
jget cijrrent address! wnich is value to be set

T-ll Evaluation Module Monitor ItACRO 1'05. 00 Sunda. 13-Mar-83 04:10 Pa.. 46
S!llbol and label Handlin!! Routines
iff

2
3
4
5 151560
6 151564
7 151570
8 151572
9 151574
10 151576
11
12 151600
13 151604
14 151606
15 151612
16 151614
17 151616
18 151620
19 151622
20
21 151624
22 151626
23 151630
24
25
26
27
28
29
30
31 151632
32 151640
33 151642
34 151646
35 151652
36 151654
37 151660
38 151662
39 151666
40
41 151670
42 151672
43

GETSYH

.atche~

a new nile to the SYlbol table.

j--

013702 007462
020227 007320
103403
005004
000277
000207

GETSYM!!MOV
2$:
CMP
BlO

022237 007320
001007
022237 007322
00100S
012204
000270
000242
000207

u:

005722
005722
000755

3$:

;start

11

;yes

CLR

R4

RTS

PC

sec

·n:

@ITBlBOT ,R2
R2,ITBLTOP

ClIP
BHE
CMP
BNE
l10V
SEN
CLV
RTS
TST
TST
BR

searchin~

at bolta. of table

iany lore entries!

;(la9 nale not found
(R2)h@ITBlTOP ;does fi rst word of nale latch?
ioo
(R2)t"tTBlTOPt2isecond word latch?

3~

U

;00

(R2)hR4

iset value
ishow this is a user defined s':Ilbol

iand that is has a value
PC

(R2H
(R2lt

;advance to next entry

2~

i+l

KATSYK lalches the nUiber in Rl to SYlboI valurs, starting with the lOst
recently defined. Returns a pointer in R2 if latched. Returns Nset if
no latch.
i--

132737
001013
013702
020227
103006
026201
001404
062702
000767
000270
000207

000002 007330 ItATSYM: :SITB
SHE
MOO
007462
2$:
CMP
007320
BH1S
CHP
000004
BEQ
4S!
ADD
000006
SR
1$:

3$:

SEN
RTS

tr.ABS,@tTMPMOD iabsolute 1Od.?
11

!ITBlSOT,R2
R2,tTBLTOP
11

4(R2) ,Rl
3$
t6,R2
2~

PC

A-79

h,es, indicate no latch
is.t botto. of table

;anY IOf!! entries?
ioo
ida we have a latch1
;!:Ie5

jgO to next nale

T-11 Ev.lu.tion Kodule """,to, MCRO 1105, 00 SundaY 13-H.,-83 04:10 P,ge 47
S~ol

and Label Handlin!! Routines
I

Ht

2
3
4
5 151674
6 151702
7 151706
8 151710

DELSYK deletes the

s~lbol

table

enlt~

just below R2.

;--

062737 000006 007462 DELSYH::ADD
2tt
CHP
020237 007462
101001
BHI
RTS
000207

9

10 151712 016242 177770
11 151716 016242 177770
12 mm 016242 177770
13 151726 000765

al

~OV

MV
HOV
DR

t6,@tTBL~OT

R2,HT8LBOT
1.
PC

idone ~et?
;hO, love UP all lower entries

-10IR2h-IR2)
-10IR2),-IR2)
-10IR2) ,-IR2)
2.

;IOVf three words for

eac~

entrY

14

15
16

itt

TYPREG hpes the contents of re~isters RO throo!:lh PS and the
address and contents it the address is not zero.

17

18
19
20
21
22
23
24
25
26

;--

151730
151736
151m
151750
151754
151760
151764

27 151770

28
29
30
31
32
33
34
3S
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

~at('hpoint

151774
152000
152004
152006
152012
152016
152020
152024
152026
152032
152036

112737 000011 007340 TYPREG: :NOVB
IIO\i
012737 156112 007334

004767
013702
004767
010237
162702
004767
012700
004767
010401
004767
105337
001352

161554
007334
162014
007334
156146
173674
020075
161524

a;

JSR

003064
007340

DECB
BNE
HOV

013704 007754

001404
004767 003216
000167 003056
000207

JSR
MV
JSR
MV
SUB
JSR
NOV
JSR
NOV

icount 9 registers

tDSY~,@tADVAOR

iborrow ADVADR as a poinler
j start a new line

pe,CRLF
HADVADR,R2
PC,PRINT2
R2"tADVADR
IDSYNSt4,R2
PC,PIlSVAL
1400l040t075,RO
PG,CHRDUT
R4,R1
PC,TYPN"1
mOUNT!

2.

JSR

PC, TYPADR
TYPLOI
PC

RTS

;t~P€

nile ot resister

;gO bac~
;~t

to resister nate

contents of resister

;t.pe • <,p,ce>
,get rE'9isU?r contents

itYfe

nu.ericall~

U

@"WATClhR4

lEa
JIW

2.:

t9 .. nCOOIHI

;g"t watct\f.oint address
;watchpoint not set
;ty~e Natch~oint address
;t~pe in current ~ode

iff

; TYPUtL type-!. thl' erltire user ssabol table.
j--

152040
152044
152052
152056
152002
152064
152070
152072
152076

016746
042767
013702
020227
103003
004767
000772
012667
000167

035264
TYPTBL: :MOV
000200 035256
BIC
007462
"OV
7$:
GNP
007320
BHIS
000012
JSR
DR
035232
1$:
MOV
171502
JNP

TNPNOD,-(SP)
ilake ss'bols show UP in word .ode
tF.DYTM,TNPNOD
@lT8LBOT,R2
;start at the bot tOt of the table
R2,ITBLTOP
idooe ':let?

152102
152106
152112
152116

004767
004767
012700
004767

161416
161662
020075
161406

PC,CRLF
islart a new line
; t':lP(I s'Aho 1 nale
PC,PRINT2
1400l040t075,RO a.,. • <"ace>
PC,CNROUT

TYPSYN: : JSR
JSR
MOV

JSR

U

;':Ies

PC,TYPSYH
71
ISP)hTIIPNOD
CMNS

it':lfe the nale and value of one 5Ylbol

A-80

;put back to watever lode it was in
next eoa-and

;~et

T-II Ev.lu.tion Kodule "ani tar "AeRO V05.00 Sund•• 13-".r-83 04:10 P.se 47-1
S~lbol

and label

Handlin~

Routines

58 152122 012201
59 152124 000167 002746

"OV
JKP

(R2)hRl

i!l'et value

TlPNltI

jhp!!

it

nuaericall~

T-l1 Evaluation Module Monitor KACRO V05.00 Sund •• 13-"or-83 04:10 PaSe 4S
S!:Ilboi and LiWel Handlin!! Routines

2
3
4 152130
5 152132
6
7 152134
8 152136
9 152140
10
11 152142
12 152144
13 152146
14 152150
15 152152
16
17 152154
IS 152156
19
20 152160
21 152162
22
23 152164
24 152166
25 152170
26 152172
27 152174
28 152176
29 152200
30 152202
31 152204

.S~TTL

Arithletic Routines

050405
000207

LOGOR:: BIS
RTS

R4.R5
PC

005104

R4

000207

lOGAND: :CO"
BIC
RTS

011lS00
005005
060005
077402
000207

"ULTlP::"OV
CLR
1$:
ADD
SOB
RTS

R5,RO
RO.RS
R4.11
PC

060405
000207

ADm:: ADD
RTS

R4.RS
PC

160405
000107

SUBTR:: SUB
RTS

R4.RS
PC

005000
005704
001403
005200
160405
103175
010005
00510S
000207

DIVID:: CLR
TST

RO
R4
2\
RO
R4.R5

040405

BEG
1$:

2$:

INC
SUB
BeC
HOV
MC
RTS

R4.R5
PC
;Iake a tDf'~ of first factor
;clear accululator

R:i

;aultipl~ b~

successive addition

;count down secood factor

iinitialize Quotient
;are we dividing b~ zero?
;yeSt return 177777
Hncre~nt Quotient
;tr!:! subtractin~ divisor froD dividend
tsuccessful, nC) underflow
;rep!ace accuaulator with Quotient

1$

RO.RS
R5
PC

;adjust for excessive increaent of RO

A-8!

1-11 Evaluation ttodule JIIonitor MCRO V05.00 Sund •• 13-H.r-83
Arithl@tic Routines
1
2
3

Pate

~9

.SBTTL Instruction Encode/Decode Routines

HI

GETlNS takes an index to a aneaonic in R2t and the .m~.onic' 5 base value
in R~. It parses an~ needed operands and stores the resultins code ~t the
current address.

~

5
6
7
B
9 152206
10 152210
11 152214
12 152216
13 152220
14 152224
15 152232
16 152234
17 152240
18 1522~4
19 152250
20 152252
21 152254
22 152260
23 152264
24 152272
25
26 152276
27 152300
2B 152302
29 152304
30 152306
31 152310
32 152312
33 152314
34 152316
35 152320
36
37
J8 152322
39 152326
40 152330
41 152332
42 152336
43 152342
44 152344
45 152346
46 152350
47 152354
~8 152356
49
SO 152360
51 152362
52
53
54 152364
55 152370
56 152372
57 152400

0~:10

;-010446
004767
006202
006202
010437
142737
012624
010431
105037
116201
006201
006201
042701
004771
013737
000167

GETlNS: :ttev
002310

JSR

007336
000010 007324

ASR
ASR
ItOIJ
BICB

HOV
007334
007342
156034

IIOV
ClRB
IIOVB
ASR

177741
152276
007334 007756

BIC
JSR
ItIIV
JHP

ASR

17131~

153172

INSDSP: .IIORD
.IIORD
.IIORD
.WORD
.WORD
.WORD
.WORD
.IIORD
.WCJlD
.IIORD

14316~

152770
153152
153024
152724
153016
153006
152714
153102

004767
100414
103413
004767
020227
103006
006202
006202
060237
000250
000207

R4,-(SP)
PC,ADRt:Hl
R2
R2
RMISAVEXP

;save the base OPcode value

;chec~ that it's even and in user RA~
i,ake a b~te index
;for the PAR~S table
;save OPcode address here
tF.SAUK,@tLINfLGtPrevenl interference with norlal use of SAVEXP
(SPlt'(R4l1
;store base opcode value
R4,fIADVADR
ifirst operand address
iinitialize add~5Sing lode scratch
PIHODE
PARAHS(R2) ,Rl ;~et fortat code
iaale a word index
RI

Rl
;Iask out the garbage
1177741,RI
PC,fINSDSP(RI) ;!et appropriate operand seauence

@tADVADR,@tSADDRiupdate current address
;recover next characLer, parse next cOI.and

OlHTIH

,00 leans decode condition codes

COHCOO
CItIJI2
INSDON
ElITRAP
BRDISP
REGOST
OPRAND
SRCOST
RTSR£G
S08DSP

;01 leans not an instruction
;02 leans nO ~araleters
;03 •••n, HNN for EH! and TRAP

;04 leans 8 bit branch displacelent
w

;05 ..an, RIDD tor JSR and XOR

;06 leanS SS or DD
;07 leans SS,DD
;10 leans R for RTS
;11 leans R,HH 10' S08

.EHABl lSB
jparse a SYlbohc nHe
PC,GErNAH
;user defintd nilef error
BKI
3.
iinstruction Inelonicf error
BCS
3.
PCIGETlCH
j~et next character in RO
JSR
R2,IDSYKPS-DSYHS;is it RO through PC?
CHP
ina, error
J$
BHIS
jget re~ister nUlber
ASR
R2
ASR
R2
;put it in bottoa 3 bits of addressing lOde
R2,PIHODE
ADD
ClN
RTS
PC

G£1REG: :JSR

17J122

161050
000040

007342

000270
000207

3.:

120027 000100
001005
062737 000010
004767 161022

FlIlOPR::CHPB
BHE
ADD
JSR

SEN

RTS

0073~2

PC
RO,IIOO
5.
IIO,UIIODE
PC,GETNXT

A-82

iis first character

@~

;,.,

deterred lode
;set character after •

j~es,

T-11 Eyaluation Modul@ Monitor ItACRO V05.00 Sood,. 13-H.r-83
InstNJctioo Encode/Decode Routines
58 152~0~
59 152~10
60152411

0100~6

61 152m

0103~6

62
63
64
65
66
67
68
69
70
71

00~767

15243~

it be a resister nale?
not a re~ister
;save charader
;save runnios pointer
iand tr\l to set a resister f.aae
isYccesstul, .ode 0 or t
;restore runnins pointer
irestore character in RO
iis it (1
illes, .ode 1, 2, or J
;is next character -1
;no ~finitel!l not autodecre.enL
;saye runnins pointer
;set character after iis it 

;set OPcoOeo
;Iatch to table

(R4)t.R5
PC,II
R2,-(Sf')
R2
tltHElIS,R2
pe,f'RINT2
(SPlt,R2
10IbRO
PC,CHROUT
R2
PARAIIS(R2hRI
Rl
R1
t177I41,Rl

"00

;index last base value
IPARAHS-BASES-2,R2
RS,BASES(R2)
icolPare opcode to base yalY~
41
iletch
-lft2)
ikeep lookiml
31
PC

H~

154132
153540

IIITDSP: .WORD

4$:

is!t optode

"OV
JSR
IIOV
ASL
ADD
.JSR
HOV
IIOV
JSR
ASR
"OVa
ASR
ASR
BIC
JSR
.lltP

012702 000212
020562 155620
103002
005742
000773
000207

3$:

@R4,R5
RS,RO
RO
RO
RO
tI77700,RO
RO,@IIIODE
R5
51
1100000,R5
PC,II
R2

CHP
PHIS
TST
BR
RTS

.WORD

;save index
ilak@ indE!>: to IInf!llonic
it!lpe ani!lon i c
;set irtdex b~k
a!:lpe 

;lal-.e
jfet

b~te instruction inde,:
for.at cadi

i,ask out the garbage

PC,~IHTDSP(Rll

it!:lPE'

TYPADI!

it!:lpe next address and a tab

TeOMeD
NOPCOD

A-86

of'erands

;CVIN
;16 bit value, nct an

o~ode

T-ll Eyaluation Kodule "onito, "ACRO V05.00 Sund•• 13-K.,-83 04:10 P..e 50-1

Instrijction Encode/Decode Routines
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
70
79
BO
Bl
82
83
8~

153520
153522
153m
153526
153530
153532
153534
153536

.WOIW
•WORD
•WORD
.WORD
•WORD
.WORD
.WORD
.WORD

153564
153722
153m
1535H
153554
1535~4

153566
153676

IHTDON
TEKTRP
TDRDSP
TRGllST
TIWRHD
TSRllST
TRTSf«i
TSOBDS

.EHABl lS8
-(R41
NOI'COO: :TST
BR
12*

153540 005744
153542 000553

irro operands

iEKT and TRAP
is-bit dis~lacelent
;~,DD

i5S or DD

iSS,DD
iR
HI-bit positive displaceaer.t

;bac~

UP to nuaber

itYPE!

it as data

;t~pe

an operand

000200
000026
000102
000164

TSRDST: :JSR
1lI:
JSR

TOPRHD:: JSR
JSR
IHTIIOH: RTS

PC, TFllOP
pt, TCOIIIA
PC,IlfTDST
PC, TF\IlOl'
PC

153566 004767 000070
153572 000421

TRTSRG:: JSR
DR

PC,GHDST
TREGIS

004767 000036

153600 000763

TRGDST::JSR
DR

pt,TRfGIS
13$

153602 012700 000054
153606 000167 157716

TCOHHA: HOV
!KP

1054,RO
CHROIJT

012700
004767
004767
012700
000167

TPREG:: KOV
JSR
JSR
KOV
JHP

tOSO,RO
PC,CHROIlT
PC,TRfGIS
105loRO
CHROUT

itYf'E! (

TRESlS: : HOVB
81C
Ast
ASl

iset bits 0 throush 2

IIOV

flKODE,RO
1177770,RQ
RO
RO
DSYIIS(RO)'RI

J"P

PRINH

1535~4

153550
153554
153560
153564

15357~

004767
004767
004767
004767
000207

ihpE! coala

iset bits 0 through S of optode
;t~pe

operand

it,:!pe resister nate
a!lPE! re~ister
;t~tPI~

COMa and second operand

85
86
87
88
89
90

153612
153616
153622
153626
153632

000050

157706
000010
000051
157672

itYPE!

resister nale

91
92 153636
93 153642
94153m
95 m650
96 153652
97 153656
9B
99 153662
100 153666
101 153674
102
103 153676
104 153702
105 153706
106 153710
107 153714
lOB 153716
109 153720
110
III 153722
112 153724
IlJ 153730
114 153732

113700 007342
omoo 177770
006300
006300
016001 156142
000167 160126

110537 007342
GElDST: "OVB
BICB
142737 000300 007342
111:
RTS
000207

; inde)( resister nale

is.t RADSO triplet
H':lPf it

R5,PIHOIIE
1300, 'IHODE
PC

004767 177734
004767 177674
010501
042701 177700
006301
005401
000407

TSODDS: : JSR
JSR
"OV
BIC
ASl
IlEG
DR

PC,TREGIS
PC, TCOHKA
R5,Rl
11mOO,RI
RI
RI
61

;t~pe re~ister

010501
042701
005744
000404

TE"TRP! :trov
BIC
TST
DR

RS,R1
1177400,RI
-(R41
71

iset lower 8 bits without sign extend

177~00

A-87

naif

it!:lpe COila

iset lower 6 bits
;.ake it a

b~te

displaceaent

iTYft02 .ill advance R4

T-11 EvaluatIon ~l@ Konitor MACRO V05.00 Sund•• 13-Kar-83 04:10 Pase
Instruction Encode/Decode Routines

50~2

lIS

116 151714
117 153736
118 153)40
119 153)42
120 153)44
121
122 153)50
123 153754
124 153)60
125 153762
126 153766
(2) 153772
128 153776
129 154000
130 154004
131 154006
132 154012
133 154014
134 154020
135154022
136 154026
137 154030
138 154034
139 154040
140 154044
141 154050
142 154052
143 154056
144
145 154062
146 154066
14) 154072
148

110501
006301
060401
005744
00016) 001162

IBRDSP: : NOVB
ASL
6$:
ADD
lSI
7$:
JHP

R5.RI
RI
R4.RI
-(i41
TYPL02

;~et lower 8 bits with si~n e~tpnd
i;ake it a b~te displace.ent
iadd in the 'PC'
;TYPL02 will ad. . ance R~
;t~e this value

113)02
032)02
001404
012700
004)6)
120227
103717
12022)
103034
120227
001423
120227
OOHlO
120227
103404
012)00
00476)
004767
120227
103245
012)00
000167

IFUlOPmOVB

@lNODE.R2
tlO,R2

iaddressins .ode 5cratch
;deferred?

007342
000010
000100
(5)536
000020

BIT

U!

000060
000027
000037
000040
000055

157470
177546
000040

4f~

000053
15)446

2$
R2.12)
31
R2.13)
31
R2.140
4$
lO55.RO
PC.CHROU!
PC.!PREG
R2.140
IN!DON
l053.RO
CHROOI
t013.RO
PC.CHROU!
TYPLOI

BR

Rbt67
51
R2.t77
5$
PC.!YPlOI
!PREG

HOV
ADO
IS!
JHP

(R41hRI
R4,fU
-(R4)
TYPlO2

;set next location
iadd in the 'PC'
iTYPL02 will incre.ent R41 don't do it now
it!lf'e the value

R5.Rl
RI
61
1l03.RO
PC.CHROU!
Rl
91
1l16.RO
PC.CHROU!
Rl
101

;.!iet opcoOe

012)00 000043
004767 157436
000167 001016

3f:
12f:

HOV
.lSR
JNP

149 154m 120227 000067

2$:

CNPi

150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
16)
168
169
1)0
1)1

Btu

154102
154104
154110
154112
154116

001406
120227 000077
001403
004767 000))6
000635

154120
154122
154124
154126

012401
060401
005744
000167 001000

5$:

154132
154134
154136
154140
154144
154150
154152
154154
154160
154164
15416.

010501
006201
103004
012700
004767
006201
103004
012)00
004767
006201
103004

TeONeD: :tIOV
ASR
8CC
ItOV
JSR
at:
ASR
BCC
ItOV
JSR
ASR
9f:
BCC

000103
157360

000126
157344

a

BEO
ItOV
JSR
CHPB
810
CHPB
BIllS
CHP8
BEU
CNPB
BEU
CHP8
BlO
HOV
JSR
JSR
CHPS
lUllS
HOV
JHP

CMPB
SEU
JSR

;00

IlOO.RO
PC.CHIOU!
R2.120
TREGIS

R2,t60

A-88

H~pe ~

,lode 0 or J?
Just t~pe resister nale
;Iode 6 or 7?
;~es, irldey.ed
iillediate?
;~es,

;1J'!!S

;absolute?
j~es

j autodecrelent?
;flO

H8pe ;t~pe resi5ter nale in parenthesis
iaotoincrelent?
;00, finished
it~pe

t

it':WE'

t

a~F'e

ne>:t location

; relati 'ole?
;~es

irelative deferred?
i'::lE!S
a!lPf

f"lPxi location

;type re.!!ister nale in parenthesis

iC bit set?

ino
itype C

;V bit set?

iZ bit set?

1-11 Evaluation "odule Konitor ItACRO V05.OO Sundo, 13-Hor-83 04:10 Pose 50-3
IMtruction Encode/Decode Routines
172
173
174
175
176

154170
154m
154200
154202
154204

012700 000132
004767 157330
006201

103234

012700 00011.
177 154210 000167 157314
178

lOS!

HDV
JSR
ASR
BCC
IIOV

1l32,RO
PC,CHRDUT
Rl
1l$

11l6,RO
CHROUT
• DSABL LSB

JIIP

A-89

,N bit set?

T·l1 Evaluation Module Konitor HACRO VOS.OO 5IJfld., !3-Har-83 04:10 Page 51
Instruction Encode/Decode Routines
2
3
4
S
6
7
8 154214
9 154216
10 154220
11 154m
12 154226
13 154230
14 154234
15 154236
16 154240
17 154m
18 154244
19 154246
20 154252
21

.SBTTL

Co~version

and

l~peout Routin~s

iH

BINASC strips the thousaods

fro. the value in Rl and

di~it

lultipli~s

Rl

b. 10. Us. SIMASI to get the 10000.s digit.

;-005000
005200
162701 001750
103374
005300
062701 001750
006301
010146
006301
006301
062601
062700 000060
000207

BINASC: :m
u:
INC
SUB
BCC
DEC
ADD
ASL
HOV
ASL
ASL
ADD
ADD
RTS

005000
005200
162701 023420
103374
005300
062701 023420
062700 000060
000207

BINASI::CLR
a:
INC
SUB
Bee
DEC
ADD
ADD
RTS

RO
RO
tIOOO. ,RI
1$

RO
tIOOO •• RI
RI
RI.-(SI')
RI
RI
(SP)!.RI
t060.RO
PC

idivide

b~

successive subtraction

ItrY to subtract 1000.
;worked, no borrow
;fix RO
,and R1
;tulti.l. RI b. 10

ailes B
;plus 2 lakes 10 X
iadd 060 to lake it an ASCII digit

22

23
24
25
26
27
2B
29
30
31
32

154254
154256
154260
154264
154266
154270
154274
154300

RO
RO
tIOOOO"Rl
1$

RO
tIOOOO •• RI
t060,RO
PC

;divide

b~

successive subtraction

to subtract 10000.
;worked, no borrow
j fix RO
iand Rl
i.ake an ASCII di~it
;tr~

H+

II

RADCH checks if the character in RO is a

34

H=I if not.
;--

35
36
37
38
39
40
41
42
43
44
4~

46
47
48
49
50
51
52
53

le~al

154302 120027 000133
154306 103017
154310 120027 000101
mm 103016
154316 120027 000072
154322 103011
154324 120027 000060
154330 103010
154332 120027 000056
154336 001405
154340 120027 000044
154344 001402
154346 000270
154350 000207
154352 000250
154354 000207

RADCH:: CHPB
BHIS
CHPB
BHIS
CHPB
BHIS
CHPB
BHIS
CHPB

2$:

u:

RO.t13l
2t
RO,tlOI
1$

RO,t072
2$
RO,1060

jhi~her

than Z?

iA or higher1

,!

or hiSher!

;0 6r

hi~her?

1$

RO,1056

BED

1$

CHPB

ftO,t044

BED
SEN

1$

RTS
ClN
RTS

PC
PC

A-90

;ppriod 1
,dollar si!lo?

RAD50 character. Returns

T-ll Evaluition Module Monitor PlACRD V05.00 Sunda. 13-Har-83 04:10
Conversion and T~peout Routines

Pa~e

52

iff
2
3
4
5
6
7
B 154356
9 154362
10 154364
II 154370
12 15\172
13 154376
14 154400
15 154402
16 154404
17 154406
18 154410
19 154412
20 154414
21
22
23
24
25
26 154416

NUI1CH chec~,s it the character in RO is nuaeric and returns fla!15 as tollows:
N=O, V=O character is 0 through 7
N=O, V=l chara~tfr is S or 9
N=1 an~ other character
;--

120027 000060
103413
120027 oooon
103010
120027 000070
103002
000257
000207
000257
000262

HUttCH:: CHPB

2$l

000207
000270
000207

1$:

154426
154430
154m
154436
154442
154444
154446
154452
154456
154460
154464

SO
RTS

jis it () or hillher?
;no, non-nuleric
iis it higher than 9?
;~s, non-nuleric
;is it hi~r than 71
illeS, 8 or 9
;tla~ 0 throu~h 7

RO.I060
U
RO.ton
II

RO.t070
2$
PC

jtlas 8 or 9
PC

PC

iH

ASCRAD ouitipli .. RI

~

40 and adds the RAD50 eoui,.ient ot RO.

;-004761 157500

ASCRAD: :JSR

27 154m 120027 000040
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

IllD
CHI'S
BHIS
CIII'S
SKIS
CCC
RTS
CCC
Sl:V
RTS

001416
120027
001414
120027
001412
060001
162701
120027
103002
062701
000207

000056
000044

000100
000101
000056

154466 005201
154470 062701 000033
154474 000207

U!

4':
Sf:

PC.RIX40
RO,I040
U
RO.I056

CHPB
IlEQ
CItPS
BEQ
CMPB
JlED
ADD
SUB
CHPS
SKIS
ADD
RTS

RO.to44
5$
RO,RI
1100,Rl
RO.tlOI
U
10S6,RI
PC

INC
ADD
RTS

RI
I033,RI
PC

;.ultipl~
;spa~es

Rl

b~

40

converts to 0

jperiod is 34

If

jdollar

~7

A-91

is 33

ialphabetics are 1 throuSh.32
;rlUaerics are 36 throush 47

154476 054754 000566 001533 USl:RAH: .RAD50 INOT IN USER RAMI
154504 021020 070265
.WDRD 0
46 154510 000000
48 154512 057144 000054 015725 ODDADR: .RAD50 IODD ADDRESSI
154520 074670
.IIIlRD 0
49 15~522 000000

si~

1-11 Evaluation Nodule Monitor MACRO V05.00 Sunda. 13-Nar-83 04:10 Pa .. 54
Cor.version iIDd hPfout Routines
1
2
3
4
5
6 154660
7 154664
8 154666
9 154670
10 154672
11 154676

12 154702
13 154m
14
15
16
17
lB
19

154714
154716
154722
154726
154732
154734

20 154740
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

Hf

TYPDEC hpE's t.he val~ in Rl as a signed, 5-disi t decillal nUlLber followed
b!:l a period. TYPDEl can be used t.o tspl!' unsisne-d niJMns.
j--

012700
005701
100003
005401
012700
004767
112737
004767
000402
004761
004767
105337
001371
012700

ooom

000040

000055
156626
000005 007341

TYPDEC: :NOV

tt:

JSR

177340
177272
156602
007341

151
Bl'L
NEB
NOV
JSR
K1lYB

51:
JS:

BR
JSR
JSR

11m
BHE
NOV
JltP

000056
156564

t040,RO
Rl
11
Rl
tOS5,RO
PC,~OUI

t5,@ICOUNI2
PC,BlllASl
31
PC,BlHASC
PC,C~OUI

flCooNI2
51
t056,RO
CHROUT

ihpe a period

H+

TYPOCT

t~pes

Rl as an octal ward.

j--

154744
154746
154754
154756
154764
154766
154770
154772

154m
155002
155004
155006
1S5010
155012
155014
155016
155020
155022
155026
155032
155036
155040

005000
032767
001407
112767
000301
006301
006100
000411
112767
000405
005000
006301
006100
006301
006100
006301
006100
062700
004767
105337
001362
000207

TYPOCTl : CLR
000200 032354

BIT

000003 032355

BEQ
KIMI

SWAB
ASL
ROI.

BR
000006 032337 It:

2S:

KOVB
BR
CLR

ASL
ROI.
4$:

3$:

000060
156476
007341

ASL
ROL
ASL
ROL
ADD
JSR
DECB
BHE
RTS

RO

tr .BYTK, IHPKOlI Hs it in byte lode
ibranch if ses
11
iit trYte aode ool!:l three digits
t3,COUHT2
;onl':oJ low irJ:te out
Rl
Rl
RO
31
1',CDUNT2
31
RO
Rl
RO
Rl
RO
Rl
RO
t060,RD
PC,CHROm

moum
21
PC

A-93

T-11 Evaluation Kodule "onitor HACRO V05.00 Sund •• 13-H.,-83
Conversion and T~peout Routines

0~:10

Pa!le 55

Ht

2
3
4
5 155042
6 155050
7 155052
8 155056
9 155062
10
11
12
13
14
15
16 155064
17 155070
18 155072
19 155076
20
21
22
23
24
25
26 155100
27 155104
28 155112
29 155114
30 155116
31 155122
32 155124
33 155126
34 155132
35 155116
36 155140
37 155144
38 155146
39 155152
40 15515.4
~1 155156
42 155162
43 155164
4~ 155166
45
~6 155170
47 155172
48 155176
49 155200
50

TYPSPC t':1pes a tab, except in irlstruction lode

(t~pe

nothing) •

j.-

132737 000100 007330 TYPSPC!!BlTe
BIlE
001004
012700 004440
HDV
000167 156446
2.:
JHP
000207
1$:
RTS

tr.IHSI.ttTHPHOD
\I
t~OO.011t040,RO

;space, tab

CHRoo!
PC

Ht

TYPNtm hPes thf value in Rl is it s!iabol or nuaber.
TYPNHl t~s the value in Rl as a nulber onlY,
i-00~767

174542
100402
000167 156676
000722

TYPNUIt:!JSR
BHI
JHP

TYPN"l: :8R

PC.HATSYH
TYPNHI
PRINI2
TYPOC!

to latch it s':1lbol
;unsuccessful, t':1PE' nuaericall~
;else type SYlbol's nale

;tr~

iH

TYPlOC types the location addressed b~ R4 in the current lOde. R4 is advanced
to the next location. TYPlOl ran be used within instruction t~peout.
;-004767
\32737
001026
011401
105737
100003
111401
0·42701
004767
100403
012700
000402
012700

TYPlOC:: JSR
177504
8ITi
000100 007330
BHE

TYPlOl: atoV
007330

1m

177400
174474
133774

BPl
HOVB
IIC
TYPlO2::JSR
BHI
Jt:
MOV

155076

21:

DR

004710

5.:

005204
105737 007330
100401
005204
000207

6S!

010546
004767 176110
012605
000207

HOV
JSR
INC
ISTB
IHI
INC
RIS

TYPlOJ::HOV

JSR
HOV
RIS

PC.AIIlCHK
tF .INS! .mltPllOIl
TYPlOI
;set current location as a word
tR4.Rl
rare we in ~e lode?
fmPHOD
;no
TYPlO2
;else set location as a byte
tR4.RI
IPl'event shIn extension
t177400.RI
;try to .itch a s'Slbol
PC.M1SYM
;unsuccessful
21
IPRINI2.RO
51
tTYPNHhRO
PCdRO)
R4
mHPHOD
61
R4
PC
R5.-(SPI
PC.TYPINS
(SPlt.R5
PC

A-94

;save R5 because TYPINS uses it
;t~p~ an instruction
; restore R5

T-11 Evaluation Kodul. Kanitof KACRO V05.GO SundaY 13-Kaf-B3 04:10
Conversion and T~£lout Routines
1
2
3
4
5 155202
6 155206
7 155214
8 155220
9 15522\
10 155226
11 155730
12 155232
13 155234
14 155240
15 155242
16 155244
17 155246
IB
19
20
21
22 155250
23 155254
24 155262
25 155266
26 155270
27 155276
2B 155300
29 155304
30 155306
31 155312
32
33 155314
34 155320
35 155324
36 155330

Pa~.

56

iH

TYPlIN types the next 8 locations or four locations it in binary .ode.
j--

G04767
112737
G04767
G04767
G05704
001406
020405
101003
G05337
001365
000207
000244
000207

000042
~10

177660
177616

007340

007340

PC,TYPADR
TYPlINllJSR
lB. ,@lCDUNTl
ItOVB
PC,TYPlOC
u:
JSR
PC, TYPSPC
JSR
TST
R4
BEQ
31
R4,R5
ClIP
BIll
21
@ICOlIIHI
DEC
BN!:
II
PC
2S:
RTS
3$:
CLI
RTS
PC
H+
TYPADR bPeS the value in
;--

016746
042767
004767
010401
132737
001006
004767
1G0403
004767
G00402

TYPMIR: : KOV
032054
ooo2GO 032046
BIC
JSR
156236
ItOV
OGOG02 G07330
BITB
BN!:
174326
JSR
BKI
JSR
156462
DR

004767
012700
012667
000167

177424
020072
0320GO
156174

a:
2':

JSR
KOV
KOV
JI!P

;tYP£I address in R4 as label or octal AUlber
;t~

location in current .ode, advance R4

ifOf 177776 to 0 ra ••
idone iJet!
;~es

R4 as a label Dr ochl nUlber, followed by : :t ascii character
;
Hoop until checked 0 to 177
;reset aaintenace bit
;~S, cleir error
;check for error
;branch it error
,see if in diagno lode
; if not then goodb~
Hoo? for flier
hnitialize scralchpad RAft and start lonitor

IRllt.RO
Rl,R2
CHKSUIt

iaccululate check SUI
;done ':Iet 7
;no

JjjP

21
Rl
Rl,I72
SLU.1
'4,~IROI

R5
R5
4S
12.@1l7756~

.ENABl lSB
062100
020102
103775

CHKSUM: :AnD

CHP
FLO

A-96

T-ll Ev.luation !odul. Konito, !ACRO V05.00 Sund .. 13-K.,-83 04:10 P••• 57-1
Power-up

58
59
60
61
62

Dia~nostics

155566
155570
155572
155574
155576

R5
RO

itest result

CLRB

R5

;cheClSUt foiled
ielse clear error

RTS

PC

000305
005700

SWAB
TST

001001
105005
000207

BHE
1$:

a

A-97

1-11 [valuation ftodul. Monit.. KACRO VOS,GO Sunda. 13-"a.-S3 04:10 Pas. 58
Power-up Oii9nastics

,SBIIl Seecial Data Slructu.es

2
3
4
5

HI

INSTRUCTION ENCODEIDECODE and COHHAND DECODE TABLES:
The five paralelers listed for each opcode are:
I,
Base value of the optode
2.
Strins nale of the opcode

6

7
8

3.

9

10
11

12
13
14
15

16
17

Paraleter or~anization:
00 - decode condition code bits (N,Z,V,C)
01 - nnnnnn (16 bit nu.be.1
02 - no para-elers
03 - nnn (8 bit nuobe.1
04 - xx. (8 bit di",laceoentl
OS - .,dd
IM-ddors.s

07 - •• ,dd

18

1~

19

11 - r,nn (6 bit displacetlent)
EQUals 1 if instl'lJction is le!lal in b'Jte lode

4.

20
21
22
23
24
25
26
27

The fifth paraleter is a code used b~ the top-level parser to decode ASCII
characters in th@ 0.0 to 077 ranse. The values of this paraleler are:
o - Illesal character at 10' level
1 - Inf.e.rpret as tile first characler of an expression or instruction
2 - :, or label definition
3 - i, or caDent
4 - ., or s~l definition
5 - ,?, or lyp"e as a nulber
6 - Valid is an operator within expressions
7 - Both 1 and 6 •••1.

28
29

30
31
32

- r

;--

33

34
3S
36
37
38
39

40
41
42
43
44
45

46
47
48
49
50
51

52
53
54
55

56
57

,lIACRo
CODE
COIlE
CODE
COIlE
CODE
CODE
CODE
CODE
COIlE
CODE
CODE
CODE
CODE
COIlE
CODE
CODE
CODE
COIlE
CODE
COIlE
CODE
CODE
CODE

INSTRS
OOOOOO,(HALT
000001,(W!IT
000002, (RTI
OOOOOl,(BPT
000004.<101

}'2,0,0

;sPice

),2,0,6

"

,.

>,2,0,0
),2,0,1
),2,0,1
OOOOOS,,110,6
),2,0,7
),0,0,0
),2,0,7
>,1,011
),0,0,6

a

H

;,
;;,
;/

),2,0,1

;0

),6,0,1
),4,0,1

H

),~,O,l

;2
;3

),4,0,1
},4,0,1

;4

),-1,0,1

;6

;5

1-11 Evaluation KoOOle Konitor KACRO V05. 00 5und •• 13-1.,-83 0.:10 P". 58-1
Special Oata Structure;
58
59
60
61
62
63
64
65
66
67
6B

CODE
COII£
CODE
CODE
COIlE
COIlE
COII£
CODE
CODE
CODE
CODE
CODE
COIlE
COIlE
CODE
COIlE
COIlE
COllE
COllE
COIlE
(011£
CODE
CODE
COII£
CODE
CODE
CODE
CODE
COllE
CODE
CODE
COllf:
CODE
CODE
COllf:
COOE
CODE
CODE
CODE
CODE
COIlE
COIlE
COIlE
CODE
CODE
COllf:
CODE
.ENDI

69
70
71
72
73
7.
75
76
77
7B
79
BO
BI
B2
B3

e.
B5
86
B7
sa
a9
90
91
92
93
9.

1'5
96
97
98
99
100
101
102
103
104
105
106
107
lOB
109
110
III
112
Il3
114

155600
155602
155604
155606
155610
155612
155614
155616

000241
000242
000244
000250
000261
000262
000264
000270

CBASES::.WORD
.WORD
.WORD
•WORD
.WORD
.WORD
•WORD
.WORD

003000.(B61
003400.<9LE
004ooo.,$,0,1
),6,1,2
>,6,1,3
),6,1,1
>,6,1,4
),6,lrO
),6,1r5
),6,1,0
),6,ltO
),6,110
),6,1,0
),6,hO
),611,0

),1,0,0

),6,0,0
),1,0,0

),7,110
),7,1,(1
),7,1,0

),7,110
),7,1,0
),7,0,0
),lrO,O
),5,0,0
),1,0,0
>,11,0,0
),4,0,0
),4,0,0
),4,0,0
),4,0,0
),4,0,0
),4,0,0

),4,0,0
),4,0,0
>,~,O,O
),~,o,o

),3,0,0
),3,0,0
),bO,O
),6,0,0

),bO,O
),6,0,0
>,110,0
),7,0,0

),lrO,O

mc
;CLV
mz
iClN
iSEC
iSEV
;SH
;SEN

,7
,a
i9

..,••
h

j=
j)

,."

T-11 EvaluatIon Module Monitor HACRO V05.00 Sunda, 13-H,,-83 04:10 Pas. 5B-2
SJ-erial Data Structures
115

116
117
118
119
120
121
122
12l
124
125
116
127
128
129
130
131
Il2
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
1.13
164
165
166
167
168
169
170
171

155620

BASVAL,HNEH,FORMAT,BYTMO[l,MlSC
•MACRO COllE
.WORD BASVAL
.ENDN
BASES:: INSTRS

156034

BASVAl, HNEN, FORHAT ,BYTNO[I, HISe
.NACRO CODE
.BYTE (BYTMOD'200>+ I
IGO
/STEF'
IPASS~

"

I
IPASS2 I
IHOS! I
lNOHOST I

.RAPSO .'TALK
,RAOSO ILOAD !

"

.RAP50
,RA1l50
.RAD50
•RAD50

I.STARTI
" ,ENrl I

!.EVEN •
I.ASC1!1
.RAD50 (IBnE /
.RAD50 I.WORD I
.RADSO I.Bl~P, I
· RAOSO I.BLKW •
DIR'JP,A: .RAOSQ IABSOLU,'
DIRVBB: .RAI!'50 ICANCELI
PrRVBO' •RAIISO IEXl! I
D1RVBH: .RAI150 IBm i
DIRV81: ,R:'D50 'INSTR/J .
,RA{!50 IClEAR I
.RAD50 /DEleE.'
OlRVBH: .RADSO IWORD I
OIRVBO:
Dlf:VBP: .RAD50 IREPEAT l
DIRVBS: .RA!l50 ISYHBOl/

A-IOO

;Predefined s~lbol~- lUSt. flOt. be 3 ;i13r cct.ers HI
HeMth, or (lIse a 'o'::tf? lO
0

.ENDR
The following word adjusts the

R~

check sua to zero.

;--

CHECKS::.WORD

527~4

;12-HAY-83 R. Arnott

H+
The last

b~tp

in fach of the ROMs is used to identifY the ROMs.

;--

Lo.m:: .8YTE
HI.IO:: .8YTE

010
010

EHD::

START

.END

;Version 1.0, low b~te
iVersion LOr high b!:lte

A-IOI

T-ll EvaluatIon "odule 110m tor HACRO V05.00 Sunday
tablp

13-"ar~B3

04:10 Pa•• 59-1

S~It>ol

AODIT
ADRCHK
A[IRCHI
AORCH2
AOVAIIR'
ASCOUT
ASCRAD
AUXFLO,
AUXIN'
AUXOUT'
AICREO,
AIRBUf'

1521510
154610 0
154524 0
154S30 G

007334 0
133626 0
154416 0
007711 G
000120 0
000124 0
177452 G
177550 0
AISREO~ 177552 0
AIXBUf, 177450 G
FASES 155620 G
BCDm 140050 I:
BCIITBl 136522
9lHASC 154214 0
BIHASI 154254 0
BLH!;DS 136350
BLNKHI 136344 0
8lHKlO 136336 0
SLOAD 150442 G
BOTTOH, 007346 0
, 007630 0
BP
BRAHCH 153266
BRDISP 153024 0
BREAK 137114 D
BRKFIL' 007760 G
BRKPT 137174 G
BRKPI 141466
BUFFER' 007470 G
CANCEL 142246 G
CBASES 155600 G
CHECKS 157774 0
CIIKSUH 155S60 0
CHROUT 133530 G
CHROI 133540 G
CHROl 133554 6
CLRAPE 1S1l46
CHHEHS 156442 G
CHOHIT 142724 0
CHONI 142572 0
CHON2 143164 0
CKON3 143216 G
CHOH31 143224
CHOH4 143246 6
CHON5 143604 G
CHDN6 143616 0
CHOH7 143652
CHTLC ' 007344 0
COHACH 152670
COHLUP 143646
CONBRK~ 000140 0
COHCOD 153172 G
COHFLO' 007710 0
COKIN " 000060 0

COHOUT, 000064 G
COHTIH 143612 G
COUHTl' 007340 0
COUNT2' 007341 0
133524 G
CRLf
CURCOH, 007326 0
CIRBUF, 177562 0
CIRCSR, 177560 0
CIXFUF' 177566 0
CIXCSR' 177564 0
DEBNCE, 007704 0
DECDS? 140030 0
DELETE 147444 G
DELIH , 007345 0
DELSIK 151674 0
DOOIS? 140014 0
DIAOIlO 155334 G
DIOEXE 1.0542 G
DIRVBA 156346
DrRVBB 156352
DIRVBlr 156m
DIRVIIH 156362
OIRVSI 156366
DlRVBH 156402
DlRVBO 156406
DIRVBI' 156406
DlRVBS 156412
DIRVBT 156416
DIRVDI 156256
DIRVRB 156242 0
DISPLA 135344 G
nlVID 152164 G
DOCOiVI 144124
roCR
144170 0
DOEXPR 144274 0
DOFUNC 142226 0
DOLABL 151426 0
DONVAL 144134
DOOPER 145124
OOSIHB 151164 G
DOVERB 147112 G
DS?DEC 136366 0
DSPOIO 135772 G
DSPLNH 136044 G
DSPHAK 136112 G
DSPNUH 136050
DSPTBL 140360 G
DSPUHH 136036 0
DSYK?S 156~O2
DSYHS 156142 0
DSYHUR 156216
[ABS
146150 6
Em
146176 0
EGAN
146156 G
ECHO
134142 G
EClR
146222 G
ECON
146354

£[IEL
EDEll
EERR
EEXT
EfND
EINS
EHOO
EHOV
ENTRAP
END
EHIIEX?
EHUM
EREG
EREP
ERROR
ERROR2
ERRSEO
E51H

146232 G
146240
14.360
146320 G

14651Hl
146210
146760
146364
153152
160000
145002
146270
146332

G
0
0
0
0
0

0
G
W276 G
143212 G
143720
135756
1.6312 0
EXDOOP 145220
EXINlT 145172
EXINl1 145200
EXfnG' 007332 0
FERCNR B7~42 G
FERRll1l 137350 0
150114 0
FIND
FIXBP 140170
FLAOSl= 007706 6
FHESAO 137424 0
FHESOI 137434
FMES02 137450
FHES03 137472
FHESG4 137522
FHCDON 142264
FNCTBL H2234 G
, 007631 0
FP
fPAAEH 145162
FULOPR 152364 G
f.ABS ' 000002
F.ADDR' 000004
F.APPL' 010000
F.A64X' 000200
F.BRKA' 000400
F,DRKO' 001000
f •BRKS~ 000020
F. BYTB= 000001
F.BYTK, 000200
F•CHAN' 000002
F•COHM' 000020
F.CPBO' 000010
F.CPDl c 000020
f ,CPB2' 000040
f.DATA~ 000001
F.FUNC' 000040
f.HOST' 004000
F.INST= 000100
f. KElP, 002000
F.LDST~ 000100

A-102

f.LOAD'
f .HNEH'
f.NULL'
f .PASl,
f.PROT'
f.REG '
F.SAVX'
F.SST '
F•SSll,
F.STOP'
F. T~AS'
F.UNDF,
F.USER'

000200
000001
000004
100000
040000
000010
000010
000200
000001
(100002
020000
000004
000100
F.USRD~ 000010
F.VAlU' 000002
F.VT ' 004000
GEHEXr H~512 G
OETARG 152642 0
GElBP 133436 0
OETCH 133316 G
DEICHC 133412 G
OEIDST 153M2
GETERH 144556 0
GETm 144522 G
GETEXI 144540
OETlNS 152206 G
OElKEY 140044 0
GElLCN 133406 G
6ElLlH 133240 G
omIT 146060 G
GElHAH 145450 G
OElHH! 145306 G
GETHUH 140054 G
GETHXT 133426 0
6ElOF'R 144724 G
OETOPV 144720 G
OETREG 152322 G
OETSYH 151560 G
OHEXAH 141146 G
147m 0
60
OOILED 142270 G
143052
ORET
147320 6
HELP
HEXSEO 13·1016 6
HfP , 007072 G
HOncH 134744 0
HLID 157777 0
HOST
150222 G
HOSTSF~ 007632 G
HOSTlN 134540 G
HSTFlG' 007673 G
IHSDHI 152744
IHSDH2 152760
IHSDOH 1:·2770
INSDSP 152276
INTDDN 153564
INTDSP 153514

IOIHIT
IOVECT
ITRAP
KADReH
KEYBCn
KEYCHD
KEYCHI

135076 G
135224 0
137334 G
14215.:.

136514 G
140330 G
140344 0
KEYGET 136H6 G
KEYOEI 13WO
[[YPIV, 007076 G
KEYPVS, 007700 0
.LOOP 140106 G
KLOOPI 141170
!LOOP2 141644
KHOHlT 140200 G
LASCOK, 007127 G
LASLIN' 007325 G
LEDlV ' 000104 G
lERR
150472
LEVEL ' 007333 0
L1HElH 133000 0
LIHFLG, 007324 0
LOAD
150442 0
LOBLNK 140040 G
lODISf' 140024 G
LOGAN[I 1521346
LOGOR 152130 G
LO.ID 157776 G
LPAREN 145046
MATSYM 151632 G
KF8251, 007464 0
HNeCC ' 156566 G
HNEHS 156502 G
HOOE ::: 007342 G
HOHITR 140010 0
HDHlT! 137556 C
HOVE
150044 G
HULm 15~142 G
HAKTBL 136154 G
NOHOST 150306 0
HOPCtlD 153540 G
HOPROT 150134 0
NPRDT 142562 G
HUHCH 154356 0
NUHGET 136546 G
O[rlrADR 154512
OPERAT, 007343 0
OF'F:AND 153a!6 G
OPRTBL 145250
OPTION 15035i
OVERfL 143104
PADRAn 146050
PA[rRI 146040
PARMS 156034 G
PARDSP 144104
PASSI 150202 G
PASS2 150212 G

T-tl Evaluation Module "cnitor MACRO VOS.OO Sunda'J 13-Mar-B3 04:10 F'ag;e 59-2
S,"bo1 hl>l.

PI'SUAl 145670 G
PER!oD~ 007331 0
PfUEC ~ 000024 0
PRINT 133766 0
PRINTA 133754 0
PRIHTl 134004 0
PRINT2 133774 G
PRIHT3 m014 0
PRINT4 134010
PRNERR 143120 0
PRom 150172 0
PURGE 133450 G
PIIRFVS' 007674 G
PIC REO' 177446 0
PIPORA~ 177440 0
PIPORC' 177444 0
F'U'ORD~ 177544 0
PIPORI: 177542 G
P~PORO' 177442 G
RAI'CH 154302 G
REGDSI 152724 G
REPEAT, 007466 G
REF-OFO 151412
RERR
1'50152
RPAREN 145152
RSTART 140004 0
RISREG 152714 0
R1X40 134122 0

• ASS. 160000
000000

000
001
Errors detected! 0

SAUEXP~

SCRPAD'
SCRP!'1 ~
SEOBUF'
smux
SETAXI
smX2
SETHOD
SlUTST
SlU.1
SlU.2
SOBDSP
SPCl8F'
SPOlBL
SPEEDS
SRCDST
STACK ~
START
STEP
SUBTR

TAlK
TALK I
TBlBOT~

007336
007400
006500
007712

0
0
0
0
135170 0
135126
135124
146104
155454
155472
155504
153102 0
007726 0
142302 0
142320 G

153006 G
007462 G
140MO G
147416 G
152160 G
150504 0
150530
007462 G

TBlFUl 151504
007320 0
TBROSP 153734 0
TCOHNA 153602
TBlTOP~

TCONCD 154132 0
TEHTRP 1~3721 G
TFUlOP 153750 0
TIME ~ 007730 0
THPHOD~ 007330 0
TOPNAM~ 000770 G
TOPRND 153551 0
TPREO 153612 G
TREGIS 153636 0
TROOST 153574 G
TRTSRO 153566 G
TSOBDS 153676 G
TIROST 153544 0
TYPADR 155250 G
TYPASC 154m 0
TYPDEC 154660 G
TYPINS 153300 6
TYPLIN lS5202 G
TYPlOC 155100 6
TYF'lOI 155170 G
TYPlOI 155114 0
TYPlO2 155132 G
TYPNHI 155076 0
TYPHUH 155064 G
moC! 154W 0
TYPREG 151730 G
TYPSPC 155042 G

IRW,I,OBL,ABS,OVR)
IRW,I,lCl,REl,COH)

t •• Asseabler stotistics

W{)r~.
file reads: 0
Wo,f. file writes: 0
Size of !Jor'" fIle: HI760 Words

Size of core pool: 1}312 Wards
O~eratirl.!i syste.: RT-11

I 43 Pag.,)
( 52 Pt3SfcS)

Elapsed tile: 00:02:30.51

DK:HON2,DK:HON2IC'DK:HOH2

A·J03

152040 G
137004 0
151m
140034 0
140020 G

1001
IHALT
IHOHIT
INUll!
IHUHER
IPC ::

154470

U'S

000100 0
007702 0
150142

IREG
IRPEAT
IRQ ::
IRI "
IR2 ::
IR3 o
IR4 ::

TYPSYH 152102 G

TYPT8l
UCSAUE
UNDEFX
UPBlNK
UPDIS,"
USERAH
USERIU~
IJSERVS~

VCON
VERR
VERRI
VRBDSP
VRSI'SI
VTJHP
VTOfF
VTON
WHM

150146
150162

147220 0
147262
147402

147406
147374
1430'b

007756 0
IADItRK 1415500
IA['V
141232 0
UAn 141372 G
IFRKP 141462 G
HlIlO 0
IClR
IEXAM 141122 0
IFUNe 141650 0
100
141714 0
I~ODR ~

141722 G
136752 G
137570 G

135676 0
140430 G
007750 G

:: 007752 G

141610 G
150012 G
007732 G

007734 C
007736 G

007740 G
007742

C'

007744
ISf' ~ 00774,
ISS 1 141706
ISTART 136660
IUR :: 006500
IWATCH~ 00;754

r,

$R5

$. A~.CI

~

G
r,

0
G

0

W700 0

I.Blfl 147634 G
I.BlKU 147654 0
l.mE 147466 [,
I.£V£II 147776 0
1.5m 150344
I.IOR[' 147560 G

APPENDIXB
SCHEMATIC DRAWINGS

J3

I.. .."... .. I

............
.... ................
...... .....

J4

..••••••••••••
.............. ....... .

\ -_ _ _ _ _ _ _ _ _ _ _ 10.40 F.B.S. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _- 1
(?f>I'1.I60MM)

Figure B-1

DCTll-EM Component Placement

B-1

CI

PROCESSOR CYCl£ IlECllOE

Z.2uF +

T lEAl 7. H
TI EAlbM

Tl EAI Ii H
'f! £At ... H
TI EAI~H
11 EAI 2 H

TI EAI I H
11 EAt IIH
11 ECOUT H
11 [PI H
T! ERAS l

T, E(AS L
11 [SElOH
11 (SEL I H
TI [wLS L
11 (wHB L

12 ROv l
TI TeLl< H
11 BCLR L

All

7

:7

31) A:~

B·
TI SAL II) H
11 SAUlt H

TI OALIl H

11 SAUl H
TI SALIZ H
TI SAUl H

11 OALl2 H

3... 12

'ffl)ALII H

3:3 A11

11 DALI. H

32 Alii
21 (OUT

11 SAlle H
TI SAL q H
TI SAL e H

TI OAL 9 H

TlOAL9H

31 FI

z~-;r-p"--------- TI DATA H

11 REAOH

+~.
TIDAlll)H
TI DALI'" H

Alb

t.tl)

1~1

TI E(AS L

ADORESS
LATCH

ZQ -RAS
UI -(AS

TI E(A(K L

TIEOMGL

TI ESELI H ~Il}lo""----'
TI EOMG H

~ ... SELG

~~~~LB

11 E(ASL~u

28
27 R/-WHB

~b

I

Tt OAL If H

-ROY

.B XTAll
XTALG
I -BClh

1 01

L~=========~'+

t

0I
L _ _ _ _ _;i17 02
03

LT~I~0AL=-'1-;H'----718A1D7

t:p
tv

-

TIOALZH
TIDAl.IH
11 OAL' H

170b
140r;
13: 04

E~lm(l)

2

TI SAL 1 H

Rim
r;
R2(1)·

11SALbH

R;:(I) Ci
R7(f) 19
Rb(l)lb
R,)(ul'5
R4(\) I

TISAl.4H
T I SAL 3: H

TI SAl';H

TI REAO H

~"'8'--_ _ _ _ _ __

TI EWHBL

~~~l,--_________________

TI EWLBL

I~~.'-----------------

11 EOMGL
11 EDBIN L

TISALZH
TI SAL I H

II

':~l
2!~>'-------

II

II

~TIINTAL

TIDCLKH

T1ESELmH~
11 CALlZH
TI ESEL. 1 H
TI EDBIN L

,~,

/'

~TITCLKZH

TI HBOIR H

T.I READ H

TI.4 PC;: H

1"'1.,.57'"

TI EWRL L

TI B(lR H

HHZ

+~.

TI EwRH l

TI ERES L

II

11 ERAS L·

".~.oZ."'1)7b

11 E(AS H
TI EOBtN L

TISAL,H

DC
EN
,---,-

11 TCLK H

+~.

v'

7"'1.,.53n

e

F;

TI T(Ut H

TI OAL£N L

2~~TIEROL

~

9E21

I

2'

TEB

- " - - T2 ARC 11 L

TI

)AlIS H

TI CALl4 H
TIDALI~H

TIDALI2H
TloALllH

TI DALlltlH
TI OAl QH
TI OAL Bioi

74LS24'}
E4'
9t 18
2 AI
82 17
' A2
B~16
4.:.,
84 11)
o A4
BS 14
b Ao

Be 11

7 Ab
S A7
AS

87 12
BE II

" ",,' "~""

f20BrSH
T20814H
T2 Ofl 13 H
T20812H
T Z DB r t H
TlDBI()H
T 2 DB Q H
T2 DB
H

e

TI SAL 14 H

2 SHB

TI SAL II) H

'SHC

+sv
", .. !I ERAS L

' : - " " ..... ,,,,,

TI EDBIN L
E VAWATOR

T2 [SEL l

14
~

02

j

03

12

0,+

I I

os

III

TI OAL 14H
12

~_ EN

4~,

TIC.aII~I-I~~11I3

TIOALSH

TI DALbH

'AZ
't iI'3

TI

S-"4

DAL4H
T r OAL, H
TIOAL2H
TIDAL I H
TIDALItH

~
I

(. ':'S
7.lt>
6 .....7
9 he

~12 E{sBi~ ~

T 2 067 H
T2 Ie b H

8,Ic
84 IS
8S 14

T2
T2
T2
T2
T2
T2

86 13
87 12
8e II

S
4
3
2
I
1

H
H
H
H
H
H

PERI PHERAL
(HIP
DECODER
74lS138
E26

Drohe2

TISAL3H
TI SAL4 H

TI SAlo H

~

"~'''~.

T2ADI4H
T2 ADI":j H
T2ADI2H
T2AOIIH
T2AOIQlH
T2AO 9H
T2An 8"

16
17
IfIS

FIt;; 14

tAS
7 Ar;,
EA7
lAB

F<6 I,
F<712
F-& II

D't

"" "~.
T2ADr;,H

T2A'JSH
T2A[l4H
T2 AD '3 H
T2AC2H
T2ACIH
T2ADIIlH

9 AS

I

-

I

I~

~~TIDAL8H

NORMAL WRITE

T2 PPI L
T2 pcr L
T2 DLART L

EN

TIEDM(,L~,

~~10

17
TI [(OUT H
TI [PI H
T! ERAS L
TI ECAS L
TI ESEL/JH
T! ES£LIH
TIEOMGL
TI EOBIN l

745241
E4a

":j

g:~ lL ::~

S

IS
13 DBl
II OBI

11'IIr...~l:5IDIIlp!L-- T2 E(AS 2 L

T2 ARD~ l
T2 ARD I L
T2AROIXL

~

OAI

b OAl
B DA'3
OA4

R2
IU
T2 (OUTH

YBl 7
YBI 9
YAI Ie
YA2 Ito
YA,I4
YA4 I

+>V

c"'l,S~'bU

E2'
R,
I ~m

T2 HALT L

T2 PI H

R4

'"

T2 RAS L

5I
HALT

Ro

T2 CAS L
18
17

TI r AL 7 H
TIDAL 6 H
TIDALSH
TI OAL 4 M
TI OAL 3 H
TIDAL 2 H
TI (lAL I H
TI DALI]) H

Rb
I ••
T2 SEl (I L

+Sv

R7
I ••
TZSELll

T2 PF I
(14)

Bc JNC
T2 OI'1(,L

52
INT

RQ

II.

Rl7
2.2K

RB

~

~: ~!~~~ ~

REFRESH ON

I ••

16
IS
I ..
13
f,7 12
86 I I

c'H

"

TI EWLB L

TI[lALI~H

'TI DALI2 H
TIDAL I I H
TI OAL I!I H
TIC1AL9H
TI DAL 8H

USER DATA
'sus BuFFER
74lS24<;
E'4
81
82
3j,2
81
"~ ..q
R4
)44
8S
6 AS
Sf
7Ab

~Q~TIDAL,QH

T I 0AL IS H
T I OAll'l H

orR ENG
TI HBCIR H
TI CALEN L

Ib 8IT MODE

SELS
SEL(

TISAL7H

V.>
7'tLS24S
E47
AI
B<::
~L:;2
83
A,
f<4
SAl.>

~LS~ TI OAL II H

I SElA

TI SALCjH

TI SAL II H
TI SAL lilI H
TISALQH
TISALBH

11'l

"

1

DATA

Ib
62 I f

DB
riB
DB
r 8
DB
DB

STA~T

ADDRESS
J41l10ille

T2 ROY L

7'oLS24"j

, ,.""~'

L

TIOALI3H

BUS BUFFER

U" 81

T2 ARDIl(

Db
07

b

~'

EN

01

11 OAL IS H

TI BelR H

T2 DBIN L

+,.

~
TI
TI
TI
TI
TI
TI
TI
TI

SAlt I
SAL I'
SAL QI
SAL
SAL 7
SAL t.
SAL'")
SAL"

" AI'

H
H

2 A.
, AS

9 AI'

,AO

D7~
D6~
DS~

TZ
TZ
TZ
D 4 t i - - T2

All

'.,

eH

..

"SA'

H
H

TISAL~H

0'77--

DZ~

081 .. 101
0I11H
DB 12101
T2 08'1101
TZ 081'H

IS

, ,16
4 Ali

0,1

-;:::J ~

5'·~·I"

TI [WRL L

TZ D'~H
Tl DISH
T2 ol .. H
T2011H
T20BZH
TZD8IH

th!--- T 2

.,

T2 ARo. L

08.-; 101

ff--- 12 DB II H
~T2 DlI,H
J!-T2
L-T2J"1f18H

~

P

,~
'Ell
,,,
,
,,
,2
,
•
,
,-----;

~T2oel"'"
~TZO'ItN
~T2D'12H

2

D2~
DI~
O.~ T2 !JOI.

-----lA2

I

T~~=~~

Db~
DI)~
D4~

~A"
~ oil

~

,,

071H--- T2 017101

A8
Z ,17

AI

TZ AROII L"

El'

,A~

DBJliH

g~i=: ~~ ~:::

• A2
A'

TI SAL Z"
TISALIN

~
,ElO

~

E'S

H
H
H

019 H

,

q

Tl087M
T2 oe'H
T208I1)M
TZ DB '1M
T2 DB:t M
12 oa2 H

yzr,tlH
12

re."

~~

~

~I

18 ZI

TI (wRL L:

TI [WRH L

I

If'
~

E21
T2 08 II) H

~: ~:~ :~ : ~:~ ~

~~~::~:

T I SAL I' H 21t A~
TI SAL q H ~ ,18

11
Ol.i:: T2 08 12 101

01 11

~: ~:~ ~: \I:~ g~
T I SAL 6 H C; AI)

i: ~:t:: ~:~

;: ~:~;: ::~
TI

SAL I H II ,lei

T2 DB II H

12

~~~:::

O. II

T2 DB 8 H

-l!!..
~~~~~~~;~
~
,.

n SAL 11 H
TISAll2H
TI SAL II H
TI SAL III H
TI SAL q H
TI SAL 6 H
TI 'SAL 1 H
TI SAL f> H

AI~.r;lDl

21t Aq
zr; ,18

Iq
[)EttS
01) 11
Olt It.
01 II)

T2 DB 7
TZ DB b
T2 DB I)
T2 DB If
T2 08 1

1 oil
It ,1&
I) ,Ie;

02 11
01 12
Dl I '

T2 DB 2 H
12 08 t H
T2 DB II H

2

Z1 AII

21 AI'

~: ~:t ~ ~ ;:~

TI SAL J H 8 AZ
TI SAL 2 H QI AI
TI SAL I H I' AG

+sv

H
H

"'I)V~
1

iSV

,

L-

~~
,. ~~ ~~~:~

t

¥

"

UI.t)

Til) INH L
Tit INT8 L-

11 INTA LTI) INT7 I.:TI) INTEl I.:-

TC) INT' L"
Til) (NT2 l-

(tit)

11 EAI, H
TI EAI I "
TI EAI2 "
TI"£AI1"

+')V

I

(1'1)

EzT--'

E21

I

I

: fKII
ff~

2

~: ~:; ~=

I.

E21

H

H
H

~:~:~!:

I,

2'

Z7ttlt

27f:11t
"2
Eltl)
19
TI SAL fl 101'21 J.12 07 18

2'

ZK :

_.J

•

~DI

~

7Itf~l't..

7ItLS~7't

~Ot

E"
R'W 2

Rr

02 RZCt) f:I

R'{J)~9
g~ ::::.~:",.

If. 01
17

:~ DC) Ff)(I) IS

Tit OI"IR L'

~

0"

Fl't(l)

IZ

1-

___.J,.£,d
I'

T2 HALTL

2 loll

T2 PF l.:

I.t IAZ

Ip'!.._ _ _ _-=======~IAJ
I A..

~AI
b~-----+=======t'~'
~~ZA2
lit

17

~:
,~

'"

i4-'i.~(1f
I

In I"
ZYI
1Y21t1

1, .. 12

2Y2~

~~! ~

2 loll

In 12
1'1
ly ...

:~ ~A2

17

~:

,~

,.
TI ED"' H

TI EPI H --'lr!!s~>='----L-.l

I" 18
IY2 It>

f:I
8 'Alt

IAl
I 2AI 2Y1

z~

TIE(ASH

If tA2

2Y2~'9

~:~,

2~

H AI7H
n Alt.H

n

AIS"
Tl AI 't H

n

AI'"
TJ .11:11 H

nAil"

nAIl"

~

~

T2DB7H~D7
H~ Db
12 OBI) ~ DC;

3 01
... 01

RClW 2
RUD')

PAC;

702

RZOl b

12 De If

~ 04

PA7 n
PAt> 38

FA ... 4ID

12 DB::!

03

~
21AI

1yl.l8

R3(t)

PA::! I

e 03
18 Olf

RIt(l) ,q

... IA2 U. IV2 16
b 143
tV, Ilf
1A.,.
IV .. 12
17 2A4
2Y4::1

T2DB2H--HOZ

17 0 ,)

Rsm 1b

IS 2A3

12 DB 1
12 08111

H~
rt~

PAZl

01
0$

PAI::I

RMI) I')
R1W 12

13 2A2

12 PPI

L~

cs

peb~

14 Db
07
DC

~D

pe ... ~
"'B1~

12 DB b

~

TI SAl2H~ AI
TI SAL I H~ ~

TI E081N L - - f t ;

TIEwRLL~W'R

TI B(LRH---2.2 RESET

H~

T4 PC 7
PO
T4 PC 6 H---1! PC6

T4PCI)~~P(Cj

TI.iP(4H~f-(4

,Q

PA'I~I.f.,

I~

FB7r,i-- T4 Pe 7 H

?BC;~

T4

.pe It H

po.!.l.---P(2~
pel~

2'AI
4'A
b IA~

T4 PC ::I H
T4 PC 2 H

17 244
1<; 2A~

IVI

2n

T4PCIH

It2A2
I'ZAI

ZVlif.

'U,

,;~

6 I A'"

pelJl~T4PC'H

2VI

IV"

18
Ib
14
12

t

l7B

47

14 UDP L

!~'7 ~ "t7

T4 UG l

f4 7 .

14UFL
T4 UE l
T4 UD L
14 ue l

47

14 ue L
T4 UAL

ylQ

47

eZ4t
T~iC; l~
~~~b

T4lDPl

R2Q

!~~1f

R28t
47

'+7

T2 AD II H

T4 LAL

TZA.DIZH

HADe H

~

+C)V~

JS

DB
TI) De:, 4 H

IN414fL...

T<; De:, 3 H

IN4'4e

T S De:, 2 H
T<; DC:. 1 H

D7
Db

7
b

IN4, ... e
INltl4e

TI EWHS L

Ifl

.

T4 PC

4 H

1

(14)""

loll

~.,

.

T4 WHB L

121

- I

T'-4 PC b H

,

I

TI (RES l

T2 AOl3H
T2 AD II) H

13 AI '+ H

13 AI I) H

AI 1 H

13 AI 3 H
13 AI 7 H

T4 PB til H

T4 PB I H

T4 P8 Z H

T4 PB 3 H

T4 PB '+ H

T4 PB C; H

T4 PB 6 H

T4 P8 7 H

T2 HALT L

T2 PF L

T 4 Of1R L

T4 INTS L

T4 VEe L.

T2 PI H

'") ,

TZ ARD 3 l
T'-4 RESET l

T4 PC 7 H

T2 ARC 11L

T4 lACK L

T2 Of1G L

12SEL.IH

TlSELIIH

T4 wLB L

RN

'"

H

T2 AD 11 H

T2 ARDZ L

,.

RI"

RlB

"

\04

T2 AD\)

n

I + Sv

T4 PC C; H

2

tt

TZ AD 7

T4 RESET L

2.
+I)V

H

13 AI 0 H
13 AI 2 H
nAI 6 H

E23

,

4J

T4WlBL

TtEDMC,H~

T I (OMC, L - r - - - . . . J

B

e

D'

T<) D6 , 1'1

,,---.,
q

DS

IN41 ...

I'")'

E23
2_

KEYPAD

H

~

T2 AD II): 1'1

T4LEL
T4LDL
T4 LC L
T4 LBl

T2AOl4

VI

T2 AD I
T2 AD

T ... L() L.
TI.i LF L

7

Cj

_

RZZ

1:~3

2V2~:

26

J,

-

2Y4::1

_

Ie:,

L---

26

e

fR"

_

T4 PBI H

PB(II~T4peClH

RIC;

C;

y"Q

74(c;lQ4(J

~~Ib ~~7

2Y2~~T
~ej~
~!R2r ~~t f

16

T4 PC3 H

14 pe::l H

zv,

I 12AI

EN

14 PSb H I l i
14 pa'}'"
-=

PB2~T4P82H

"'81~

Q

T 4 WHB L
T2 RAS L

R••

'"

• Sv

,.

R"

o

TI (lACK L

I>"

T Z CAS L

RII

T 2 DBIN L

IK

T2(OUTH
T4 lACK L

T2 ROv l

UPPER

NUMERIC DISPLAY

UPPER
RIGHT
OIGET

LEFT

OIGEl

ESO

ES2

21:

T4 UA L
T4 UF L

".

",

E"17

<3'

e
~

T'5 0(' Cj H

LOWER
LEfT

LOWER
RIGHT
OlGET

DIGH

~A<

T4 LA L
T4 LF L

E.9

E"

T"UOL

c.A!!.\

I I"

TCj oG 3 H

T'5 oGIL H

T4 ue, L
T4 U( L

'"

~

TCj 0(,4 H

Te; oG 2 H
Te; OG I H

E"

'"'

2

""I

ElO

E'"' '
G II
( III

T4 LOP L

0 8

T4 LE L·

T4 LG L
T4 LC L

TS OLS I LTI BCLR H

I

T'l DC"

0\

Til LD L

T'5 tNT3 L

JtHITlR~.,J

re;INTZl

127

51

H

T[ST

BRClK

S031
8a:iliHZ .:.')

IIIIUF
Ie;V

TSOG3H
T,DGZH·

~~ g~~:

.,RlO

82<)1
T2007 H
T208b H

HOBS

~

D7

D6

to O~

".

-12_~

~12it

DTR
T2 08 4 H
2
T2 DB 3 H
1 r.z
T2 Dez H
T2D81H 28 r J
T2 0811 H 27 Dil
TZ PCI L II
TI SAl. I H 12 c/D
TI [OBIN L
T I EwRl L
R I< C 3
TI TCLK2H 21l ClI(
TIBClRH ZI hfSfT rAEMPTv 16
TO; PoSR l
22 5SR SVN)fT BO t6
TO; PCTS L 17
~TiC
TO; SRCU< H
ze; RiC
H

"
"

.~Te;tNTbl

cs

Te;INT7l

:! ~

TIL---+-

T C;

DC,

~TSDG4H

<9

R'.

211

Te;POTAL~B

3 H

~TC;OGo;H

To;PRTSL~11

TS DLSO L

Te; pcso

,"

R"

l~to

I.Z'I
I.
I.
R",
,00

APPENDIXC
ERROR MESSAGES
C.l DIAGNOSTIC ERROR MESSAGES
The following flashing error messages are displayed if the DCTII-EM fails its diagnostic tests. These are
fundamental errors and must be corrected before you attempt to do anything else.
UPPEA
DISPLAY

LOWER
DISPLAY

I I I I'I I I I IElll+1
I I I 121 I I I IElll+1
I I I'H I I I IEI'I'H'I
I I I I I I Hll+1
3

1 1

MEANING
RAM cha::ksum test failed. Try
replacing RAM chips.

ROM checksum test failed. Try

replacing ROM chips.

RAM and ROM checksum tests failed.

Board may have major problems.

DLAAT feedback test failed.
Board may halle major problems.

C.2

KEYPAD ERROR MESSAGES
If the DCTII-EM detects an error while you are using the keypad, it displays a flashing error message on
the upper and lower rows of LEOs. The upper row of LEOs displays a two-character error code and the
lower row of LEOs displays:

The entire error message disappears and the DCT II-EM is returned to register mode when you press the
HALT switch or any key on the keypad.
The keypad error messages are as follows.
UPPER
DISPLAY

111+111
111+111

LOWER
DISPLAY

MEANING
You tried to e;o.:ecute a program With
a BPT instruction In it.

A break was detected on the console
terminal pon while the keypad was
active.

C-I

You tned to execute CI program with
an invalid Instruction In It.

YOu tried to execute a program and
used an unacceptable value for the
SP. See chapter 5 for more information.

You tried to a!ter a protected location
In the keypad monitor scratch pad
(locations 7400 through 7776).

C.3 CONSOLE MESSAGES
The console displays 12 different messages (Table C-IJ. Most of these are error messages that indicate a
problem with your input or with the execution of your program. This paragraph explains each of the
messages and its probable causes.
Some of the error messages are preceded by the portion of your input that caused the error. If this is the
case, your erroneous input is displayed between backslashes on the line above the error message.

C-2

Table C-l

Console Messages

Message

Meaning

BRANCH OUT OF RANGE

You input a branch instruction which was too far from the branch destination. Recall that branch instructions have a range of -J28 to 127 (decimal)
words.

BREAK POINT
ENCOUNTERED

A breakpoint (81, 82, B3, or 84) or a BPT instruction was encountered
while your program was executing.

BUFfER OVERfLOW

The console monitor was accepting input from a host and a line exceeding 96
characters was received. As with all errors generated during host loading.
this error stops the OCT I I-EM from loading further input from the host.

CONSOLE BREAK

The BREAK key on the console keyboard was pressed. If you are executing
a program, execution stops and the OCTJ I-EM internal register values at
the time of the break are saved. If you arc in HOST, TALK, or LOAD
modes. CONSOLE BREAK causes a return to NOHOST mode.

INVALID INSTRUCTION
ENCOUNTERED

An invalid op code was encountered while your program was running.

INVALID STACK POINTER

The stack pointer did not have a value between 4 and 6500 (inclusive) when
you started your program or when you single stepped.

NOT IN USER RAM

You attempted to alter a location that was in the protected
scralchpad area (locations 6500 through 7777, inclusive).

ODD ADDRESS

You attempted to access a full word in RAM on an odd address bounda~
Use the BYTE mode 10 examine or alter locations at odd addresses.

REPEAT OF ZERO

You input a REPEAT command that had a count of zero.

TABLE fULL

You attempted to define more than 66 symbols.

UNDEFINED EXPRESSION

You attempted to use an undefined parameter, operand. or other data object
when a defined expression was required. For example, you referenced an
undefined symbol while in PASS2 mode.

WHAT'!

You attempted to input a line that had a syntax error in it.

C-3

mOnitor

INDEX
A

ABSOLU command, 4-7, 4-29
Address decoding, 6-6
Address pointer, 4-6
Address space, 5-13
standard RAM space, 5-15
expansion RAM space, 5-15
monitor space, 5-15
I/O space, 5-15
for external hardware, 5-16
reserved, 5-16
Altering memory
with console, 4-10
with keypad, 3-10, 3-32
Altering registers
with console, 4-5
with keypad, 3-4, 3-32
.ASCII command, 4-21, 4-29
B

.BLKB command, 4-21, 4-29
.BLKW command, 4-21, 4-29
Breakpoints canceling
with console, 4-20
canceling with keypad, 3-27, 3-32
displaying with console, 4-20
displaying with keypad, 3-20, 3-32
setting with console, 4-19
setting with keypad, 3-20, 3-32
Buffers, 6-5
.BYTE command, 4-21, 4-30
BYTE command, 4-7, 4-30

c
Cancel breakpoints, 3-27, 3-32
CANCEL command, 4-16, 4-20, 4-30
CLEAR command, 4-14, 4-30
Connectors, 6-8
60-pin (J1), 6-8 through 6-9
auxiliary serial (13), 6-10
console serial (14), 6-11
power supply (J2), 6-10
Console
altering memory with, 4-10
altering registers with, 4-5
command summary, 4-29

connecting a, 4-1
control commands, 4-3
default modes, 4-2, 4-21
entering programs with, 4-12
examining registers with, 4-5
examining memory with, 4-7
host loading with, 4-22
input rules, 4-2
monitor, I-I, 3-28, 5-1, 5-15
output formatting modes, 4-6
single stepping with, 4-17
transferring control to and from, 4-2
using breakpoints with, 4-19
using watch point with, 4-16
Console commands
ABSOLU command, 4-7, 4-29
.ASCII command, 4-21, 4-29
.BLKB command, 4-21, 4-29
.BLKW command, 4-21, 4-29
.BYTE command, 4-21, 4-30
BYTE command, 4-7, 4-30
CANCEL command, 4-16, 4-30
CLEAR command, 4-14, 4-30
DELETE command, 4-14, 4-30
.END command, 4-26, 4-30
.EVEN command, 4-21, 4-30
EXIT command, 4-2, 4-30
GO command, 4-16, 4-30
HELP command, 4-21, 4-30
HOST command, 4-23, 4-30
INSTRU command, 4-7, 4-30
LOAD command, 4-24, 4-30
NOHOST command, 4-23, 4-30
PASSI command, 4-25, 4-30
PASS2 command, 4-25, 4-30
REPEAT command, 4-21, 4-31
SHOWMO command, 4-21, 4-31
SHOWRE command, 4-5, 4-31
SHOWSY command, 4-14, 4-31
.START command, 4-25, 4-31
STEP command, 4-17, 4-31
SYMBOL command, 4-7, 4- 3 I
TALK command, 4-23, 4-38
VTOFF command, 4-3, 4-31
VTON command, 4-3, 4-31
.WORD command, 4-21, 4-31
CTRL/ A, 4-3, 4-24, 4-25, 4-32
CTRL/C, 4-3, 4-32
INDEX-I

CTRL/O, 4-3, 4-24, 4-32
CTRL/Q, 4-3, 4-32
CTRL/R, 4-3, 4-32
CTRL/S, 4-3, 4-32
CTRL/U, 4-3, 4-32
CTRL/X, 4-3, 4-32
CTRL/Y, 4-3, 4-32

I

INT switch, 3-25, 6-7
INSTRU command, 4-7, 4-30
Instruction format, 4-11
Interrupts, 5-5, 6-6

J
D

Jumpering, 2-4, 6-4
Default operating modes, 2-3, 4-2, 4-21
DCTII-AA microprocessor, 1-1,6-3
DELETE command, 4-14, 4-30
Directives, 4-20
Debugging, see Breakpoints,
Single stepping, Watchpoints
E

.END command, 4-36, 4-30
EPROM,6-4
.EVEN command, 4-21, 4-30
EXIT command, 4-2, 4-30
Error Messages
console, C-2
diagnostic, 2-4, C-I
keypad, C-I
Examining memory
with console, 4-7
with keypad, 3-7
Examining registers
with console, 4-6
with keypad, 3-2
Expressions, 4-3

K
Keypad
altering registers with, 3-4
altering memory locations with, 3-10
command summary, 3-32
entering programs with, 3-12, 3-16
examining registers with, 3-2
examining memory locations with, 3-7
monitor, 1-1,2-3,5-1,5-15
number system, 3-2
single stepping with, 3-17
special functions, 3-26
cancel breakpoints, 3-27, 3-32
go with LEDs, 3-27, 3-32
release protection, 3-30, 3-32
set baud rates, 3-28, 3-32
start console, 3-34, 3-32
using breakpoints with, 3-19
using watchpoint with, 3-22
L

LOAD command, 4-24, 4-30

G

GO command, 4-16, 4-30
Go with LEDs, 3-27, 3-32
H

Host Loading
configuration, 4-22
example of process, 4-28
preparing a loadable program, 4-25
the HOST command, 4-23
the TALK command, 4-23
HELP command, 4-21, 4-30
HALT switch, 3-24, 6-7
HOST command, 4-25, 4-30

M
MACRO-II,4-20
Memory expansion module, 6-11
Monitor, 1-1,2-3,3-8,3-28,3-30,4-2,5-1,
5-15,6-4
Monitor subroutines,
console, 5-8 through 5-13
ASCOUT,5-9
CHR02,5-9
CHROUT,5-9
CRLF,5-9
GETCH,5-9
GETCHC, 5-9
GETLIN,5-8
GETNXT,5-9

INDEX-2

PRINTA,5-9
TYPDEC, 5-9
TYPOCT,5-9
using, 5-10
keypad/LED, 5-2 through 5-8
BCDKEY,5-3
DECDSP, 5-3
DGDISP, 5-2
GETKEY, 5-3
GETNUM,5-4
LOBLNK,5-3
LODISP, 5-3
UPBLNK,5-3
UPDISP,5-3
using, 5-4
N

STEP command, 4-17, 4-31
Subroutines, see Monitor subroutines
SYMBOL command, 4-7, 4-31
Symbols
defining, 4-14
deleting, 4- I 4
displaying, 4-14
symbol name rules, 4-13
Symbol table
deleting, 4- I 4
displaying, 4-14
System specifications, I-I
T
TALK command, 4-23, 4-31
Timing, 6-7
Traps, 6-6

NOHOST command, 4-23, 4-30
U

p
User LED, 3-25, 5-5
PASS I command, 4-25, 4-30
PASS2 command, 4-25, 4-30
Peripheral chips, 6-4
address decoding, 6-6
auxiliary serial line (825IA), 6-5
DLART console serial line, 6-5
parallel port (8255A), 6-4
reserved locations for, 5-15, 6-4
Processor status word, 3-2
Power supply
cable, 2-1
connector, 2-2, 6-8, 6-10
requirements, 2-1

R

v
VTOFF command, 4-3, 4-31
VTON command, 4-3, 4-31
W

Watchpoints
canceling with console, 4-16
canceling with keypad, 3-27
displaying with console, 4-16
displaying with keypad, 3-20, 3-22
setting with console, 4-16
setting with keypad, 3-22
,WORD command, 4-21, 4-31

RAM, 6-5
Release protection, 3-30, 3-32
REPEAT command, 4-21, 4-31

S
Set baud rates, 3-28, 3-32
SHOWMO command, 4-21, 4-31
SHOWRE command, 4-5, 4-31
SHOWSY command, 4-14, 4-31
Single stepping
with console, 4-17
with keypad, 3-17
Stack pointer, 2-3, 3-2, 5-2
.START command, 4-25, 4-31
Start console, 3-28, 3-32

INDEX-3



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.6
Linearized                      : No
Create Date                     : 2008:11:19 23:12:21-05:00
Creator                         : Adobe Photoshop 6.0
Modify Date                     : 2016:06:10 15:57:04-07:00
XMP Toolkit                     : Adobe XMP Core 4.2.1-c041 52.342996, 2008/05/07-21:37:19
Metadata Date                   : 2016:06:10 15:57:04-07:00
Creator Tool                    : Adobe Photoshop 6.0
Format                          : application/pdf
Document ID                     : uuid:033ff668-cd47-423e-ac9a-74e803bbe4eb
Instance ID                     : uuid:43a8dd97-9d9b-b04d-a7be-1c042be6a207
Producer                        : Adobe Acrobat 9.0 Paper Capture Plug-in
Page Layout                     : SinglePage
Page Count                      : 221
EXIF Metadata provided by EXIF.tools

Navigation menu