MC6801L1UM_LILbug_Monitor_for_the_MC6801L_Aug80 MC6801L1UM LILbug Monitor For The MC6801L Aug80

User Manual: MC6801L1UM_LILbug_Monitor_for_the_MC6801L_Aug80

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

DownloadMC6801L1UM_LILbug_Monitor_for_the_MC6801L_Aug80 MC6801L1UM LILbug Monitor For The MC6801L Aug80
Open PDF In BrowserView PDF
MC6801 L 1UM(AO)

LILbug
MONITOR FOR THE MC6801 L 1

@

. MOTOROLA

MC6801 L1UM(AD)

®

MOTOROLA

LILbug
MONITOR FOR THE MC6801 L1

PREPARED BY
NMOS MICROCOMPUTER SYSTEMS
AUSTIN, TEXAS

Motorola reserves the right to make changes to any
products herein to improve reliability, function or deSign.
Although the information in this document has been
carefully reviewed for broad application, Motorola does
not assume any liability arising out of the application or
use of any product or circuit described herein; neither
does it convey any license under its patent rights nor the
rights of others.

Second Edition

@MOTOROLA INC. 1980
"All Rights Reserved"

LILbug
MONITOR FOR THE MC6801 L1
TABLE OF CONTENTS

1.0

MC6801 OVERVIEW ................................................ 1
1.1 ARCHITECTURAL INNOVATIONS ............................................ 1
1.2 SOFTWARE INNOVATIONS .................................................. 1
1.3 SUMMARY OF FEATURES ................................................... 1

2.0

MONITOR OVERVIEW . ............................................. 1

3.0

COMMANDS . ...................................................... 2
3.1 FORMAT .................................................................... 2
3.2 DESCRiPTION ............................................................... 2

4.0

MONITOR OPTIONS ............................................... 6
4.1 1/0 INDEPENDENCE ......................................................... 6

4.2
4.3
4.4
4.5
4.6

5.0

INTERRUPT VECTORS ...................................................... 7
USER-DEFINED COMMANDS ................................................ 8
HARDWARE TRACE ........................................................ 10
INITIALIZATION (MODE SELECTION} ....................................... 10
JUMP TABLE ............................................................... 13

HARDWARE REQUIREMENTS ..................................... 14
5.1 MINIMUM SySTEM ......................................................... 14
5.2 EXPANDED SySTEM ........................................................ 16

APPENDIX A

COMMAND SUMMARY . .................................. 21

APPENDIX B

FLOWCHARTS ................................... ........ 22

APPENDIX C

SAMPLE PROGRAMS .................................... 38

APPENDIX D

LlLbug PROGRAM LISTING .............................. 48

lILbug is a trademark of Motorola Inc.

1.0 MC6801 OVERVIEW
Successful design begins with a clearly stated set of
objectives. The principle design objectives driving the
MC6801 development have remained constant
throughout its evolution: to provide the user with the
finest single-chip microcomputer possible today with
sufficient flexibility and power to deal with his problems
extending into the 1980's. Three clear trends are
emerging with respect to future applications: users will
continue to strive for minimization of part counts, make
increasing use of distributed processing, and automate
processes heretofore unimagined. The MC6801 has
demanded the highest skills and talents from its designers
in meeting these formidable objectives.

1.1 ARCHITECTURAL INNOVATIONS
The MC6801 represents the state-of-the-art in singlechip microcomputer development. The MC6801 MPU has
been enhanced from the M6800 with respect to both its
capability and internal architecture. In addition to the
MPU, the MC6801 has incorporated an on-chip oscillator
driver, an on-chip programmable timer, a serial
communications capability, two types of memory and 8
modes of operation. The single most noteworthy
accomplishment of the architecture is probably the
systems integration of these components into a powerful
single-chip microcomputer.
The MC6801 microcomputer may be considered an
entire family of processors all of which have been
integrated into one common design. This approach was
taken at the risk of overwhelming the user with the myriad
of options available. The advantages to be gained from
the approach are significant:
• a single microcomputer can be used in an extremely
wide and vastly different variety of applications.
• the user can build upon his experience with the
microcomputer without the fear of early obsolescense,
and
• the user's investment in learning and support tools
may be amortized over a longer period of time than with a
number of more custom designs, hence it also will freethe
user from a heavy burden of inventory.

1.2 SOFTWARE INNOVATIONS
The M6800 programmer will feel very much at ease with
the MC6801 instruction set. All of the familiar instructions
of the M6800 have been implemented and function in
exactly the same manner. In addition to the M6800
instructions, several new and powerful instructions have
been added to ease the problems associated with 16-bit
arithmetic problems. The A and B-accumulators have
been concatenated into a single, double-accumulator (D)
for which a full set of 16-bit arithmetic instructions
(including load, store, add, subtract, and shift) are
included. These new double accumulator instructions
have been im plemented with all of the addressi ng modes
available for single accumulator operations.
Indexing has been greatly enhanced by adding a "Add
B-accumulator to X" instruction along with the capability
to both push and pull the index register. A hardware
multiply instruction has also been added to further aid in
arithmetic problems. Improvements in the internal
architecture also have resulted in faster cycle times for
many instructions.

The MC6801 MPU may be considered an enhanced
M6800 MPU which capitalizes on the user's investment
with the M6800 Family of Parts. New users will appreciate
the widely acclaimed easy-to-Iearn instruction set.

1.3 SUMMARY OF FEATURES
Hardware

•
•
•
•
•
•
•

M6800 Bus Compatible
Single 5V Power Supply
8-Bit Word Size
16-Bit Address Field
TTL-Compatible Inputs and Outputs
On-Chip OSCillator/Driver
On-Chip 16-Bit Dual Function (Input and Output)
Programmable Timer
• On-Chip Serial Input/Output
• On-Chip 128 Byte RAM
• On-Chip 2K Byte ROM
• Vectored Priority Interrupts for Timer and Serial I/O
• Four Programmable Input/Output Ports
• Eight Hardware ProgramlT1able Modes of Operation
• Mask Option for External Clock Input
• Peripheral Controller Mask Option
• EROM version for all Mask Options
• Mask Relocatable ROM Address
• Mask Relocatable RAM Address
• Programmable External Address Space to 64K
• Multiplexed Address/Data Bus
• Valid Address Strobe
• On-Chip Standby RAM for 64 Bytes
• Vectored Restart
• Maskable Vectored Interrupt
• Separate Non-Maskable Interrupt
• Full Duplex Programmable Serial 1/0 for Either NRZ
or Bi-phase
• Four Baud Rate Programmable Selection for Serial
1/0
Software
• MC6800 Upward Compatible Architecture
- Two 8-Bit Accumulators
- One 16-Bit Index Register
- One 16-Bit Stack Pointer
• MC6800 Upward Compatible Instruction Set
- All M6800 Instructions Included (Many contain
fewer cycles)
- M6800 Object Code Compatible
- 8 X 8-Bit Unsigned Hardware Multiply
- 16-Bit Arithmetic Capabilities (Load, Store, Add,
Subtract, Shift)
- Additional Index Register Instructions (Push,
Pull, Add B to X)

2.0 LlLbug MONITOR OVERVIEW
The standard MC6801 ROM pattern contains the
LlLbug monitor. This ROM monitor is used to evaluate
and debug a program under development. The LlLbug
monitor commands enable the user to:
• Load a program
• Verify that a program was properly loaded
• Dump the program
• Punch (record) the program on tape
• Examine and change data in a memory location
(including I/O)
• Calculate the offset for relative addressing

•

Examine and change data in the user's program
registers
• Insert. display, and remove breakpoints in the
program
• Freerun or trace through the user's program
The 6801 LlLbug monitor is designed to enable a userto
modify the system to meet his specific hardware and
software needs. The main areas of flexibility are:
•
•
•

}
I-----~

I/O device independence
Interrupt vector independence
Command table expandability

=

$00

CR

$OA

LF

$00

~

NULLS
S = START OF
RECORD
TYPE OF RECORD
(CC = $31 or $39)

$53

3.0 COMMANDS

CC

.

3.1 COMMAND FORMAT
The general command format is:
  [  [J)

~

The command name is followed by a delimiter of space,
comma, or carriage return. If there are no arguments,
carriage return terminates the command; otherwise a
space or a comma separates the command from its
argument. A space or comma separates arguments from
each other. The "." and "I" are special quick commands
that do not need carriage returns.

CHECKSUM

.
-

·

}

·
·

DATA

L
L 

... L.o

Load a tape file. Figure 3.2 shows the monitor's tape
format. Load with offset is available by specifying the
hexadecimal . The offset is added to the address
on tape to get the load address. All offsets are positive, but
wrap around memory modul064k. Forexample, to offset a
load by minus $1000 locations, use $FOOO as offset. An
attempt to load into ROM, protected RAM, or non-existent
memory terminates the command after printing '?'. A
checksum error also prints '?' and terminates. On some
tape readers, several extraneous characters are
transmitted before the tape reader is turned off. These
characters will sometimes print after the prompt on the
console.
Example:

}

Figure 3.2 - Tape Format

VERIFY V
V 

Verify or compare the contents of memory to the tape
data. A hexadecimal  can be specified. A
checksum error, a bad compare, or non-existent memory
prints '?' and then terminates.
Example:

..

CHECKSUM

t------I

!2012 600 400 080 300 440 BFO/
2018 00 lAO 7FO 650 EEO
!L
!2012.60 40 0::: 0::: ':::0 44 BF 1 A 7F
!::: 0 1 2.' 4 2 I) 5 03 0::: CO ",. 0 F II F II F F
!L 1000
!::: 0 12·6 0 40 0::: 0 ::=:::: 0 44 B F 1 A 7 F

! '.,:

BYTE COUNT

ADDRESS

3.2 COMMAND DESCRIPTION
LOAD

LEADER (NULLS)

1 I) Ci (i

I ' •

2

PUNCH

P , 

Punch or record formatted binary object tape as shown in
figure 3.2. Start at  and punch through '
This routine fails to diagnose an end address smaller than
the beginning address. With low speed the values
punched to tape may also print to console. High speed
may cause some garbage characters to print to the
console during the punch.
Example:
~F'

2012 20AE.

S11B2012604008083044BF1A7FEE65EEE4A604480100058~1181~EEF71

211B202AFFAFB3EEFBD603852031005~12FCFFB~PDF5F7BAF7FE051114

211B2042081812545280EF65B3F7FCEF2FE716904280109F0751EFEFDE
211B205AABFFFF798926C0801AOOCB02C4DDA2FFF6FFE5DFB75710 1346
211B2072008151280888ABFE85CD8D7DAD6D0040001B8B46BA94DFFF51
211P208AFFABC9EF4BAF0206C30802511708FA7F6DFFEEDB2FBB40447D
210820A2814508629570
::":;' 0:::: 0 (I 0 OFC
DISPLAY D , 
D 
D
Display contents of memory in hexadecimal followed by
the literal ASCII characters. Start at  and print
thru . Ignore the command if the beginning
address is larger than the end address. The command
prints blocks of 16 bytes -  is masked back to
the beginning of a block and  is extended to the
end of a block. If only one argument is specified, display a
block of 48 words surrounding address ' If no
argument is given display a block of 48 words containing
the last location used in memory examine.
Example:

! It

2 (; 12 205E,

(>
1 2 .,::
2010 (I I~I 1 c' E,I) 41:1
21)20 04 4':''-' 01 00
.~ 0::: (I
0::: :::5 c't"! ::: 1
204 (I 05 1 1 0::: 1':''-'
2050 lE- ';. (I 42 ::: 0

! r.

C"
~
tEl
7 :;:
,.
0:::-' :::0 44 f:F lF1 "7-'t:
05 !::';. 1 1 ::: 1 ';'E EF FF
00 51? 1 c' FC FF F:'? F:D
1 E' 54 ~!2 ::: 0 EF t=:~ E":'
1 0 ';'F 07 51 EF EF At:

4

,~

i":'
~I'_'

1,_'

.'
"P

C

Ii

EE .:. ::; EE
AF E:::;: EE
F5 F7 E:A
r:--,
. , Fe EF
FF FF 79

E

E4
FE:
F"'".
c'F

F
AE.

IIE.

FE
-,

t:-,

::!'? 2E.

• • ", :il • • OIi'? •••••

:~.:

.H •.••...•• /3 .. V
•• 1.'f' ••• '~= .• : ••
• •••• T~~ ••• :;! •••.....•
• • E: •••• I;~ •• + •••• ~.:

2045

~
f: e
D E F
il
7 ::! .=:1 2 ';: 4
. , F:A F7 FE
20:;: (: O:~: :::5 C'O :;: 1 00 5'~-' 1.::'.-,.:: Fe FF F:'?
PI! F5 t:"7-'
." r-:
,;; 54 !;t2 ::: (I EF t:. ,;. E::: F7 Fe EF c'F E7
2040 00::, 1 1 0::: 1'-'':' 1-'
':::050 1E. ';. (I 42 ::: I) 1 0 9F 07 51 EF EF AE: FF FF 7'~ :::9 2':.
C"

MEMORY

M (Space)
1

Initiate the memory examine/change function. Print the
value at  and maintain a pOinter to that address.
 is 1 to 4 hex digits not counting leading zeroes,
and it must be followed by a a delimiter of space or slash.
The form 1 cannot start with characters 'A' through
'F'. If the address would normally start with 'A' thru 'F',
zero should precede the address. For example: OFFFE/
instead of FFFE/. The user may execute a combination of
the following sub-commands to modify the current
memory location, look at consecutive words of memory,
move the memory pOinter, or terminate memory examine.

3

••

1.'r' ••• ·;.:.: •• : ••
TF~ ••• :~: •••.····•

•••••

•• E: •••• I) •• + •••• g.:

•  - Enter one byte of data to replace the value
at the current pointer. There is no size check on the data. If
 is more than two digits, the right-most byte of
data becomes the new value.
• SPACE - Increment the current pointer and print the
value at the new address on the same line.
• , - (Comma) Increment the pOinter to the next memory
location with no print of address or value. This allows
insertion of data without seeing current values in memory.
• LF - (Line feed) Increment the pointer to the next
memory location, print the address and value at that
address on the next line.
• UA - (Up arrow) Decrement the pointer to the previous
memory location. Print the new address and its value on
the next line.
• / - (Slash) Print the current address and the value on
the next line.
• CR - (Carriage return) Terminate the memory examine
command.
Any other
command.

input terminates the memory examine

Example:

1M 2000 30
12000/30
!FFFE/

*
*
*
*
*
*
*
*
*

MEMORY EXAMINE

12005/01 02 03 04 05

*

Look at values just inserted

!2005/01
2006 02
2007 03

*
*

Line feed moves pointer to next
memory location

*

*

Up arrow moves pOinter to previous
memory location

*
*

Slash recalls current address
pilnting address and value

?

10FFFE/30 00
12000/3024 3248 3021

12005/201,2,3,4,5

12007/032006 022005 01
12005/01/
2005 01/
2005 01

*
*

*

Address cannot start with
"A" thru "F"
Zero should precede the address
Change 30 to 24 at address 2000
Space moves pointer to address 2001
where 32 is changed to 48

At location 2005 start inserting
values 1, 2, 3, 4, and 5

return terminates Memory
Examine - prompt indicates ready
f~r next command

Carr~age

4

SLASH

/

BREAKPOINT B 
B-
B
B-

Recall the location last referenced in memory examine
and print that address and the value at that address. No
carriage return or delimiter is necessary.
Example:

Enter a breakpoint at address  and print current
breakpoints. A maximum of four are allowed.
A question mark is printed if 4 breakpoints are already set.
B -
Remove the breakpoint at address  and print the
remaining breakpoints.
B
Display all breakpoints.
BRemove all breakpoints and show empty breakpoint table.
Examples:

1/200501* Slash recalls current address,
*
printing address and value
OFFSET 0   (CR)
Calculate the offset (second byte) of a branch instruction
from  to '  should be the address
of the second byte of a branch instruction.  is the
absolute address for the branch. The command prints the
offset if it is within the -127 to +128 byte range, otherwise it
prints '?' and roaturns to main control loop. If the range is
valid,  is printed and the user can modify that
location.
Example:

! E: 2002
2002 0000
! E: 2045
2002 2045
! E: -2002
0000 2045
! E: 1234
1234 2045
! t:
1234 2045

! 0 20:34 20'3A
E.5
20:34 00E,5
!D 2034 2012

riD

.

!B

20:34 E.5DD
!D 20:34 :3000
?

-

0000 0000
0000 0000
(1000 0000
0000 0000
0000 0000

0000 0000 0000 0000

!

.
I

REGISTER

GO

R

Display the contents of the program registers and
counter. The registers are printed in the format:
P-XXXX X-XXXX A-XX B-XX C-XX S-XXXX
Pwhere:
P = program counter
X = index register
A = accumulator A
B = accumulator B
C = condition code register
S = stack pointer
XX = values in registers
Register P is ready for update. New values may be
inserted or the register change function can be
terminated.
The following inputs are valid:
 - Insert new value for the current register.
There is no validity check on the length. of the data, so the
right-most byte or double byte, whichever is appropriate
for the register becomes the new register value.
SPACE - Pri nt reg ister val ue un less  changed
its value. Move the register pointer to the next register,
printing the mnemonic and a dash.
Any other input characters terminate the register
command. The command terminates after examining
and/or updating the stack pointer.
Example:
!r;:

G 
G

Execute starting from . Execution will continue
until a breakpoint (3F) is detected.
G
Execute starting at the current program counter setting,

CALL

C 

C
Call and execute a user routine as a subroutine starting at
address . A return address to the monitor is stored
in the users stack. Breakpoints are recognized and trace
can be used after initiating a "c" command. When the user
"RTS" is executed, the monitor gets control, prints
registers and returns to the main calling routine. The user
PC then points into the monitor.

C
Same as C  except start executing from the current
program counter.

TRACE

T 

Trace the specified number of instructions where  is a maximum of $FFFF. The opcode, program
registers, and counter are printed after each instruction.
The format of the print line is:
OP- P-XXXX X-XXXX A-XX B-XX C-XX S-XXXX
where:  =opcode of last instruction executed
P = program counter
X =index register
A = accumulator A
B = accumulator B
C = condition code register
S = stack pointer
XX = value in register

P-OOOO :>::-0000 A-OO B-OO C-D 0 S-BB
P'-2000 :,.,;- 0000 A--12:;::456 B- 00 C- DO S-AO

!P

P-2000 X-OOOO A-56 B-OO C-DO S-AO

5

4.0 MONITOR OPTIONS

Example:
~-2002

X-100I A-OO B-BF C-DO S-OOAQ
!T :3
OP-Ol P-20(r~ :"::-10(11 A-O!) E:-BF C-DO :;-(lOAO
OP-Ol P-20(l4 :~:-1 001 A-OO B-E:F C-DO 8-(lOAO
OP-'Ol P-2005 :'::-1001 A-OO B-E:F C-IIO S:-OOAO

NEXT.
The character '.' (period) with no carriage return will trace
the next instruction and print the trace line.
Example:
!•
OP-4C P-200tS ;'<-1001 A-I) 1 B-BF C-DI) :~-OOFtO
!.
OP-7E P-200(l X-l00l A-l)l B-E:F C-DO :;-OOF! (I

CONTROL X
Return control to the main command loop. Control 'X' is
recognized during display and trace print out, and
whenever the monitor is reading console input.

CONTROL W
Halt print and wait until input character signals
continuation of print. This command is recognized during
trace print and during display memory print. Print is
halted until any character is input, then print continues.

Since versatility is built into the MC6801, versatility,
expandability,' and ease of use were the primary design
criteria of LlLbug. LlLbug can be used in either the single
chip or expanded modes of the MC6801. It can be
configured to use on-chip I/O, standard external devices
(e.g., ACIA, VDG, PTM), or user defined external I/O (e.g.,
keyboards, displays). All interrupt vectors are accessible
to the user and can be redefined to point to user written
interrupt routines. Furthermore the user can define
additional variable length commands or redefine existing
ones to suit his needs. This flexible design will hopefully
allow LlLbug to become a defacto standard for the basic
monitor of all MC6801 based systems.
Often versatility is traded for ease of use. This is not true
for LlLbug. The monitor initializes all variables to
convenient defaults so that a user who wishes to become
familiar with the MC6801 and use its on-chip I/O need not
even be aware of the more esoteric features of LI Lbug. All
he needs to do is build the simple circuit explained in
section 5.1, find a RS232 compatible terminal, push reset
and his system is up and running.
~110INDEPENDENCE

Monitor I/O is indirect. All I/O calls are to a device type:
1. single-byte input (console keyboard)
2. single-byte output (console print)
3. high speed print
4. high speed punch/load device
Each device has three routines associated with it:
1. initialization
2. data in/out
3. device termination
Before a device is used by the monitor it will issue a call
to the routineto initialize that device. Normal data transfer
is done thru the data in/out routines and devices are
terminated thru the device termination routine. Data
transfers can be of two types: serial or block. In serial
transfers the byte of data is passed to or from the data
in/out routines in the A-register. For the high speed print
and high speed punch/load, the address of a data packet
is passed to the in/out routine. See Appendix B routines
HSDTA and BSDTA for details of the format of the data
packet.
The addresses for these device routines are ordered in a
table. The address of the table is stored in 'IOPTR' at RAM
location $OFC. The monitor calls an I/O routine by setting
register B as an index into the I/O table, and then calling
routine 10. Routine 10 retrieves the address from the table
and does a subroutine call.
The LlLbug monitor defaults to the on-chip serial input
and output routines for the Silent 700®. The monitor's
high speed routine writes blocks of data to the console
output device. The default high speed punch/load device
routines are for a Silent 700® cassette. The monitor's
RESTART code initializes 'IOPTR' to point to its default
table. Following is the default I/O table as defined in
LlLbug.

HIGHER HI
Set speed to 1200 baud (+1024), set padding and set bits
in on-chip serial I/O RMCR (rate and mode control
register). When changing speeds, tape readers and
punches should be off-line to prevent accidental read or
write during the transition.

HIGHER YET HY
Set speed to 9600 baud (+128), set zero padding. This is
for CRT terminals. Tape recorders and punches should be
off-line when changing speeds.

Silent 700 is a registered trademark of Texas Instruments.

6

.... .•.........

00171
00172
00173
001.74
00175

~
10 TABLE •••••••••••••••
ROUTINE 10 IS CALLED WITH
II! INDEX INTO 10 TABLE CI OR INTO lJSER 10 TABLE
lIE IOPTR POINTS TO THE 10 TABLE TO BE USED
• THE INDEX TABLE DEFINES ORDER OF 10 ROUTINES IN 10 TABL
FOB
CION,eIOTA,CIOFF
A CI
A

II!

0~176A

FS5B
A FS5D
A F85F
00171A F8Gt
A FSG3
A FaG5
00178A F8G?
A F86S
A F8GB
00179A F86D
A F8GF
A F871
00181
00162
00183
00184
00185
00186
00187
00188
00189
00190
00191

F8C8
F89t
F8D1
F8D2
F8A8
FaD1
FaDI
FDEC
FaD1
FEAF
FEC3
FEBA
0000
0002
0004
000G
0008
00@A
000C
000E
0010
0012
0014
0016

1210192

00193
00194

A

A
A
A
A

FDB

COON,CODTA,COOFF

FDB

HSON,HSDTA,HSOFF

FOB

BSON,BSDTA,BSOFF

A

A
A
A
A

*

THE FOLLOWING ARE INDICES INTO 10 TABLE
A CI.ON EQU
0
INIT INPUT DEVICE
INPUT A CHAR WINO WAIT
A eI.DTA EQU
2
A CI.OFF EQU
4
DISABLE INPUT DEVICE
INIT OUTPUT DEVICE
A CO.ON
EQU
6
OUTPUT A CHAR W)PADDING
A CO.DTA EQU
8
A CO.OFF EQV
SA
DISABLE OUTPUT DEVICE
A HS.ON EOU
Ie
INIT HIGH SPEED OUTPUT DEVICE
A HS.DTA EQU
$E
OUTPUT BLOCK OF DATA
A HS.OFF EQU
810
DISABLE HIGH SPEED DEVICE
INIT PUNCHJLOAD
A BS.ON
EQU
812
A BS.DTA EQU
814
WRITE DATA BLK TO PNCH/LOAD
DISABLE PUNCHJLOAD
A BS.OFF EOU
816

lIE

address is retrieved indirectly from a table whose address
is in 'VECPTR' at RAM location $OFE. The table must
contain addresses or dummy addresses for seven
interrupts. The monitor's restart code initializes 'VECPTR'
but the user may define his own vector table in ROM or
RAM by changing 'VECPTR'.

The user can redefine the I/O by writing his own
routines and putting the addresses of the routines in his
table. The routine addresses should be in the same order
as shown in the previous table. The user may wish to
redefine only part of the I/O routines. In this case, he
should fill in the table with the monitor's addresses for
those routines he does not change. He must then initialize
'IOPTR' with the address of his table.
The program - USERIO (Appendix C) - is an example
of redefining the I/O to use an ACIA instead of the on-chip
serial I/O. USERIO defines the initialization and
character input/output routines using an ACIA. The other
I/O routines used are from the monitor.

Word
$0
2
4
6
8

A
C

4.2 INTERRUPT VECTORS
The 6801 modes define internal or external vectors. If
the vectors are internal, they are in the LlLbug ROM. The
monitor is designed to allow any of the ROM vectors
except RESTART to be user defined. The interrupt

01621
01622
01.6;23

01SN
0'162:,
01.6:::6
01627A
0t628A
01S29A
0t630A
0t63tA

FFC8
FFCA
FFCC:
FFCE
FFD0

FCEt
FCEt
FCEt
FCEt
FCE1.

A
A

016nA FF!)2

F821

01633A F"FD4
01634

F803

A
A

A

A

A

Vector Table
Serial
Timer Overflow
Timer Output
Timer Input
IRQ1
SWI
NMI

Following is a listing of the vector table defined in
LlLbug.

*lIE**~.****

*

N~lI

IN. N~H

•••• VECTORS **~*.**~*~*.*.*
INDEPENDENCE
~ ALSO SAVE ON RAM USAGE
VECPTR - RAM PNTR TO VECTOR TABLE
VECTOR TABLE - ADR OF INTERRUPT VECTORS
MAY BE REDEFINED BY USER TABLE IN SAME FORM
SERIAL FOB
DUMMY
NOT USED 8Y MONITDR
TIMOVF FOB
DUMMY
Dl)MMY
TIMOUT FDB
TIMIN FDB
DUMMY
IRQ1
FDB
DU~1MY
SWt
FOB
IN.Sl..II

*
*
*
*

*

VECTOF~

FDB

DUMMY IS AN RTI

7

The monitor defines SWI and NMI. All other interrupts
default to an 'RT!' instruction. The LlLbug SWI is used for
the monitor breakpoint command. The NMI is used by
trace and breakpoint. The NMI vector controls the type of
hardware tracing. either on-chip timer, or PiM
(Programmable Timer Module).
The internal vector default uses the on-chip timer entry.
Address $F803 is the NMI vector for trace using the onchip timer, and address $F800 is for the PTM trace
processing. This vector should not be changed after
monitor initialization. The initialization defines the timer
according to the address in the NMI vector. Thechip must
be in an expanded mode to use a PTM. SWI and NMI can
be defined for other uses, if breakpoint and trace are not
used.

4.3 USER-DEFINED COMMANDS
The LI Lbug monitor has a command table consisting of
entries in the form:

Word

o

# bytes in entry
including this byte
ASCII Command Name
(variable n bytes)

n
n+1
n+2

~

Routine address

---------

-,-

The monitor reads a command and does a search of the
command table to find a match with the ASCII command
name. If a match is found, a subroutine call is made to the
routine address following the command name. If no
match is found, a question mark is printed. The user can
define new commands and have his command table
searched prior to the monitor comand table. The address
of the command table is stored in 'FCTPTR' at RAM
location $OFA. Command names are of variable length.
Decimal numbers are not allowed in command names.
The characters 'j' and ',' are special quick commands that
cannot be redefined. A terminating word marks the end of
the table. A negative one indicates the monitor table is
also to be searched. A negative two means the monitor
commands are not being used. Since the user table is always searched first, the user can redefine existing
commands. Program USERIO (Appendix C) ·is an example of redefining LlLbug commands. USERIO define&
ACIA I/O and redefines the commands, HI and HY, to
change output padding for ACIA baud rate change.
Figure 4.3 is the command table as defined by LlLbug.

00110
001i1.
00112
00113
00114
00115
001.1 S
00117
0121118
00119
00120
00121
00122
00123
00124
00125
00t2S
00127
00128
0012,
C:l0130A
00131A
00132A
00133A
00134A
00135A
00136A
00137A
00138A
00139A
00140A
00141A
00142A
00'l43A
00144A
00145~

00146A
00147A
00148A
00149A
0015eA
00151A
00152A
00153A
00154A
00155A
00156A
00157A
00158A
A

0015SA
001S0A
001S1A
A

001S2A
001S3A
001S4A
~01e;5A

00166A

00tS7A
00168A
00169A

•••••••••• COMMAND TABLE ••~.~ •••••
!IE T~ERE MAY BE AN EXTERNAL TABLE OF T~E SAME
II(
FORMAT. 'FCTPTR' POINTS TO T~E TABLE TO
II(
B~ SEARC~ED FIRST. T~E USER C~N DEFI"E
~lS OWN TABLE AND SET FCTPTR.
!IE

..

!IE EAC~ ENTRY
FeB
!IE

FCC
FOB

lIE
!IE

lIE
!IE
!IE
lIE
lIE
!IE
lIE
!IE
II<

FBZ4
F8Z5
F82S
F828
F829
F82A
FS2e
F82D
Fa2E
F830
F831
F832
F834
F835
F83S
F838
F839
FS3A
F83C
FS3D
F83E
F840
F841
F842
F844
F845
F·84Ei
F848
F84S
F84A
F84B
F84D
F84E
F84F
F850
F852
FS53
F854
FB5S
F857
F858
F85A

F8Z4
04
42
FE98
04

43
FC0F
04
44
FOBS
04
47
FCll
04
4C
FE9A
04
4D
FA5B
04
4F
FAB4
04
50
FE72
04
52
FB1E
05
48
4S
FeES
05
48
59
FSF1
04
54
FC4S
04
56
rEAB
FE

T~E

A
A
A
A
A
A
A

T~E

LAST ENTRY IS:
-1=END EXTERNAL TABLE,SEARC~ INTERNAL TABLE
-2=END OF TABLECS)

NOTE: AN EXTERNAL FUNCTION TABLE TERMINATED BY
-1 I T~E INTERNAL. TABLE WILL. ALSO BE SEARC~ED.
IF TEfH1 I NATED BY -2, INTERNAL TABLE NOT C~ECKED.

A FCTABL EQU
A
FCB
A
FCC
FOB
A
A
FCB
FCC
A
FOB
A
FeB
A
A
FCC
FOB
A
A
FeB
FCC
A
A
FDB
A
FCB
FCC
A
A
FDB
A
FCB
A
FCC
A
FOB
A
FeB
FCC
A
A
FOB
A
FCB
A
FCC
A
FDB
A
FCB
FCC
A
A
FDB
A
FeB
A
FCC
A
A
FOB
A
FCB
A
FCC
A
A

TABLE 15 AS FOLL.OWS:
XXX=TOTAL Sl~E OF ENTRY
/STRINGI STRING IS T~E INPUT STRING
ADOI'? IS T~E ROUTINE ADDRESS
ADDR
IN

xxx

FDB
FCB
FCC
FDB
FeB
FCC
FDB
FCB

•4
IBI
BRKPNT
4

ICI

!IE

*
*

CALL
4

IDI
DISPLY
4

II!

IGI
GOXQT
4

ILl
LOAD
4

IMI
MEMORY
4

101
OFFSET
4

*

.
..
II!

!IE

IPI
PUNCH
4

!IE

IRI
REGSTR
5

IHII
S120
5

IHYI
~y

4

.ITI
TRACE
4

II!

IVI
VERF
-2

Figure 4.3

9

*END OF TABLE

4.4 HARDWARE TRACE

If a PTM is selected for trace instead of the on-chip
timer, timer 1 is used. NMI is tied to the inverted output. To
execute one user instruction, latches are set such thatthe
output level changes after the first cycle of the user
instruction. The PTM output level returns to its initial level
after one cycle.

Hardware trace permits a user's program to be
executed one instruction at a time. Trace and breakpoint
functions need this ability, The trace will operate on
programs in either RAM or ROM. The circuitry as
diagramed below consists of NMI tied to the output of the
on-chip timer or to the inverted output of a PTM
(Programmable Timer Module). Figure 4.4 shows the
output waveform and timing for the on-chip timer and the
PTM.

4.5 INITIALIZATION

+ 5V

3.3K
P21

91----_

MC6801

NMI

4 .....- - -...

Hardware Trace Using the MC6801 Timer

NMI
MC6801

74LS04

4J-----oC

MC6840

Hardware Trace Using the PTM
Using the on-chip timer, Port 2 is set for output and the
output level bit in the TCSR (Timer Control/Status
Register) is set low. The on-chip clock is read. That time is
adjusted and stored in the OCREG (Output Compare
Register) such that the compare occurs after the first
cycle of the next user instruction. After storing the
OCREG, the monitor does an 'RTI'. When the compare to
the OCREG occurs, the output wave goes low
(corresponding to low setting of level bit in TCSR). The
low transition causes an NMI. NMI vectors back to the
monitor. The output waveform is brought high by setting
the level bit in TCSR and by setting OCREG for another
compare.
10

An MC6801 mode that best allocates resources for the
user's software must be selected. The MC6801 has eight
hardware selectable modes controlling on-chip use of
ROM, RAM, interrupt vectors, and I/O ports. Figures 4.5.1
and 4.5.2 are the mode select chart and mode overview.
Modes 2, 3, and 4 cannot use the monitor since the
internal ROM is not used. Mode 0 is a test mode designed
to check on-chip memory. Mode 7 is minimal having only
the on-chip ROM (monitor) and 128 bytes of on-chip
RAM. The monitor uses about half of the on-chip RAM.
The monitor stack is at address $OCF, and RAM variables
are from $000 to $OFF. The user has the low addresses
in RAM. Modes 1, 5, and 6 allow development of large
programs since they can have expanded memory. In
modes 5 and 6, the user must program port 4 as output to
have external memory. Modes 5 and 6 have internal
vectors while mode 1 has external vectors. Mode 1 is most
easily used with programs that use PTM trace, or
programs that redefine 1/0 devices. For these programs,
external devices (and addresses) are necessary. Also,
external vectors allow the user to jump to his own
initialization routine at RESET.
If the 6801 is in a mode that has internal vectors and
LlLbug enabled, the RESET vector initializes the
monitor's on-chip serial 1/0 and on-chip timer for
hardware trace and breakpoint. The vector table,
command table, and 1/0 tables are initialized. Calls are
made to turn on console reader and printer and I/O
devices are initialized.
'
If the user selects a monitor option, such as adding
user-defined commands to the command table, a mode
with external vectors is usually more convenient. The
RESET vector would then jump directly to a user
initialization routine. The user needs to set the command
table pointer, and then jump into the monitor RESET code
such that the table painter is not redefined to the monitor
default. This may cause omitting other initialization which
the user routine needs to do prior to entering the monitor.
An example is USRCMO in Appendix C. The routine
defines a conversion command, The program sets the
pointer to the user-command table, and also the pointer to
the monitor I/O table. USRCMO then jumps to the monitor
code following the monitor setting of the command table
pointer
When the user selects mode 1, which allows external
vectors with the internal ROM, the MC6801 will input data
from the external data bus for the addresses $FFFO
through $FFFF. This function allows the user to define
'his own vector table in the MC6801 memory map. A full
'decode of the external memory is not required, due to the
architecture of the MC6801, which. selects either the
internal data bus or external data bus to read the data for
these sixteen memory locations.

Cycle
#1

1/>1

I I
Cycle
#2

Cycle
#3

Cycle
#4

Cycle
#5

Cycle
#6

Cycle
#7

Cycle
#8

Cycle
#9

I I I
Cycle
#10

Cycle
#11

Cycle
#12

'

:x

X

X

Address
Bus

X

RTIOpcode
Fetch

PTM Output
(Inverted)

X

X
SP

SP + 1
CC

X

X

SP + 2
B

SP + 3
A

X
SP + 4
XHI

X
SP + 5
XLO

X
SP + 6
PCHI

X

X

X

SP + 7
PCLO

>e::

X

User
INSTR

1~

RTI

..

Interrupt
Process

(L + 1HM + 1)

L=1,M=5

User Instr

Output Compare

NMI

Output Compare

MC6801 Timer
Output

Set
OCREG
$OB

RTI
User
Instr

(Reset Holds Timer Output Level High)

Hardware Trace
NMI Tied To PTM or On-Chip
Timer Output
Figure 4.4

-----'

~--Ill~

Interrupt
Process

PC2

PC1

PCO

ROM

RAM

INTERRUPT
VECTORS

BUS
MODE

7

H

H

H

I

I

I

I

6

H

H

L

I

I

I

MUX (6)

5

H

L

H

I

I

I

NMUX (6)

4

H

L

L

1(2)

1(1 )

I

I

3

L

H

H

E

E

E

MUX

Multiplexed/No RAM or ROM

2

L

H

L

E

I

E

MUX

Multiplexed/RAM

1

L

L

H

I

I

E

MUX

Multiplexed/RAM & ROM

0

L

L

L

I

I

1(3)

MUX

Multiplexed Test

MODE

LEGEND:
I - Internal
E - External

MUX - Multiplexed
NMUX - Non-Multiplexed

OPERATING
MODE
Single Chip
Multiplexed/Partial Decode
Non-Multiplexed Partial Decode
Single Chip Test

L - Logic "0"
H - Logic "1"

NOTES:
(1) I nternal RAM is addressed at $XX80
(2) Internal ROM is disabled
(3) RESET vector is external for 2 cycles after RESET goes
high
(4) Addresses associated with Ports 3 and 4 are
considered external in Modes 3 and 4

(5) Addresses associated with Port 3 are considered
external in Modes 5 and 6
(6) Port 4 default is user data input; address output is
optional by writing to Port 4 Data Direction Register

MC6801 Mode Selects
Figure 4.5.1

OVERVIEW OF MC6801 OPERATING MODES

COMMON TO ALL MODES:
• Reserved Register Area
• I/O Port 1 Operation
• I/O Port 2 Operation
• Timer Operation
• Serial I/O Operation
SINGLE CHIP-MODE 7
.128 bytes of on-chip RAM; 2048 bytes of on-chip ROM
• Port 3 is parallel I/O handshaking port
• Port 4 is parallel I/O port
EXPANDED MEMORY SPACEINON-MUL TIPLEXED
BUS-MODE 5
.128 bytes of on-Chip RAM; 2048 bytes of on-Chip
ROM
.Port 3 is 8-bit data bus
• Port 4 is optional 8-bit address bus
.256 bytes of external memory space

• External memory space select output (lOS)
EXPANDED MEMORY SPACE/MULTIPLIED BUSMODES 1, 2, 3, 6
• Port 3 is multiplexed address/data bus
.Port 4 is address bus
.4 memory space options
(1) No internal RAM or ROM (Mode 3)
(2) Internal RAM (Mode 2)
(3) I nternal RAM and ROM (Mode 1)
(4) Internal RAM, ROM with partial address bus
(Mode 6)
TEST-MODES 0 and 4
• Expanded Test-Mode 0
May be used to test internal RAM and ROM
.Single Chip and Non-Multiplexed Test-Mode 4
(1) May be changed to Mode 5 without RESE'f
(2) May be used to test Ports 3 and 4 as I/O ports

Figure 4.5.2

12

4.6 JUMP TABLE
LlLbug subroutines and entries frequenty used are in a
jump table at the beginning of LlLbug. These entries
should be used whenever possible to insure compatibility
with future versions of the monitor. Following is the jump
table as defined in LlLbug:

00094A F800

ORG

IZ0114

0~'096

00097A
00098A
00099A
00100A

F800
F803
F806
F e,'213

7E FC7E
7E FC79
7E F8?3
7E F 8.%

0()101A
00102A

FrSl~'C

-.~

It:.

F80F 7E
00103A Fe12 7E
(1l0104A F815 7E
0010SA F8lS 7E
0010E:A F81B 7E
001r~7A

00108A

FBO?
FBr21E
FADB
FAD8
FBI2
FADD
F;3FG

F81E 7E
F.821 7E FD5F

A

'*

.1 I) f'1 p

E.'<.N~11

TC.S:"E TO '3U8ROIJT I i'lE'3
~lt1F'

~1.~H11

N~1

A IN.NMI ·)np
A INCHNP ..)MP

C.t~t11

NMI \lECTOR FOR ON-'-CHIP TIMER
I i'JPUT 1 CHAR I·J/ NO PAR I TY

A OUTCH
A
A
A
A
A
A
A
A

P

INCH1
'.)UTCHl

·Ji'lP

PDATA1

,J~1P

PDA;"A

,J 11

~IMP

,)UT2HS

,,IMP

OI)T<1HS

i

"lECTOR

OuTPUT

1

pn1

FOR

CHAF:

tL-'PADD I NG

PRIHT DATH STRING
PR ,:R /LF._ DATA STRli"'~G
F'P 2 HE>< + SP ( .;( )
PR 4- HE/: + SP (" !~ )

Jt1P

F'CR~F

::,PACE

STR!

Jilt"
-.)1'1 P

3TART

H,j. SWI

RESTART

Jt1P

:-'1 • 5; ~. ~ I

S t~·J 1

PF: I ~H CR/LF
Pi':; iH A :3PACE
ADDRESS

\,IECTOR

Following is a description of the jump table entries and
their associated subroutines.
Entry

Address Description

M.NMI

$F800

C.NMI

$F803

INCH1

$F806

CIDTA

NMI entry for hardware trace using a PTM. The LlLbug monitor initializes the PTM if the NMI
vector is this address.
NMI entry for hardware trace using on-chip timer. The LlLbug monitor initializes the on-chip
timer if the NMI vector is this address. This is the default NMI vector.
Call I/O routine CI DTA to input one character into register A Carry bit is clear until data read,
then it is set. INCH1 waits for input, clears parity, and ignores rubouts. OUTCH1 is called to
echo input if OUTSW is clear.
I/O routine that reads one character of data into register A using on-chip serial I/O. This is a
read with no waiting for data. Return with carry bit set if data is read, otherwise carry bit is
clear.
Call I/O routine to output one character from register A. Saves register B.
Default LlLbug I/O routine called by OUTCH 1. Call OUTC to use on-chip serial interface to
output one character. Write nulls (padding) after output character. OUTSW and CHRNL
control padding. OUTSW is the tape flag; set to 0 if not tape, set to number of nulls to follow
character if tape. The upper six bit value of CHRNL is the padding for a carriage return. The
low two bit value is the r.>adrlino for other characters.

OUTCH 1
CODTA

$F809

PDATA1

$F80C

Print data string pointed to by register X. Last character of data string should be $04.
Registers A and X are modified. Call OUTCH1 to print one character at a time.

PDATA

$F80F

OUT2HS

$F812

Call PCRLF to print carriage return and line feed, Then call PDATA1 to print data string
pointed to by register X. Registers A and X are modified.
Output two hexadecimal characters pointed to by register X. Then output a space. Modifies
register A. Calls OUT2H and SPACE.
Print two hexadecimal characters pOinted to by register X. Calls OUTHL and OUTHR to
convert and print a byte.
Convert left four bits of a byte to display code and output. Calls OUTCH1 to print.
Convert right four bits of a byte to display code and output. Calls OUTCH1 to print.
Call OUT2H and OUT2HS to print four hexadecimal characters pointed to by register X.

OUT2H
OUTHL
OUTHR
OUT4HS

$F815

13

PCRLF
SPACE
START
M.SWI

$F818
$F81B
$F81E
$F821

Call OUTCH1 to output a line feed and then a carriage return.
Call OUTCH1 to output a space.
Reset entry point. This is the default RESTART vector.
Default SWI vector in LlLbug monitor. This routine processes breakpoints.

5.0 HARDWARE REQUIREMENTS
5.1 MINIMUM SYSTEM
The minimum system for the MC6801 requires only a
clock generator, serial communication interface, and
reset logic. This minimum system is shown in Figure 5.1.
CLOCK- The two connections XTAL 1 and XTAL2 can
either be used for a parallel resonant crystal or
an external clock source as shown in Figures
5.2 and 5.3.
The frequency of the crystal or clock source should be
either 4.9152 MHz or 2.4576 MHz to give a standard baud
rate for the serial communication interface. The following
table shows the baud rates available with these crystals.
4.9152 MHz
1.2288 MHz
9,600 Baud
1,200 Baud
300 Baud

XTAL
¢2
HY
HI
Reset

20pF

E

-

401-----.

2.4576 MHz
.6144 MHz
4,800 Baud
600 Baud
150 Baud

Connections For A Parallel Resonant Crystal
Figure 5.2

+ 5V

.4-____

XTAL2

4.7K
P22

(4xfo)

E

401-----.

Connections For An External Clock
Figure 5.3

RS232

Interface
+5V

Serial Communication Interface
The MC1488 and MC1489A devices provide the system
with a RS-232C interface capability. The circuit in Figure
5.4 interfaces the serial input/output of the MC6801
directly to an RS-232C terminal without any additional
hardware.
Reset
The Reset Funtion should be performed when power is
first applied and if the LlLbug Firmware loses program
control. The Reset Function is also used to select the
mode of operation of the MC6801. The circuit shown in
Figure 5.5 is a simple reset function. The diodes are used
to select the different modes of operation during reset.

4.7K

-L

f,J
4.9152 MHz

or
2.4576 MHz

20pF

Minimum System Requirements
Figure 5.1
14

12V

- 12V

RS-232

P24

12L-----------------------~~~

M6801

P23
11'-_ _ _--.

6

Serial Communication Interface
Figure 5.4

3

Transmit Data

6

Data Set Read

5

Clear To Send

8

Carrier Detect

20

Data Terminal
Ready

MC1489
6

2

Receive Data

27K

- 12V

Protective
Ground
Signal Ground

+ 5V

+ 5V

4.7K

+ 5V

4.7K

+ 5V

4.7K

4.7K

P22
10~-------+------r_----~

P21

9~--~f---+
P20

8 J - - - -....

Simple Reset Logic
Figure 5.5

IN914

...L
30llF

T

1
15

5.2 EXPANDED SYSTEMS
When one of the expanded modes of operation is
selected, I/O Port 3 and I/O Port 4 can not be used as I/O
lines. A Block Diagram of a Expanded Multiplexed System
is shown in Figure 5.6. Port 3 becomes the multiplexed
bus for data and address and Port 4 becomes the address
bus. Figures 5.7, 5.8, 5.9and 5.10 show the logic required
to replace the I/O Ports when the MC6801 is operated in
one of these expanded modes.

Port 3

Mode
Control

MC6801

Latch

AS
Reset
Control

lData Bus (AO/DO-A7/D7)

I

Port 4

Block Diagram Of A Expanded Multiplexed System
Figure 5.6

Address Bus (AO-A15)

74lS273
($0006) • ¢2. R/W

-

OB7
('OB6
I~B5
l'OB4
r"OB3
OB2
OB1
DBO

10

"1"

($0004) • <1>2. RIW

DBO
DB1
DB2
DB3
r'" OB4
OB5
OB6
OB7

DATA BUS
(DO - 07)

74lS126

ClK
80
7D
60
50
40
3D
20

-

ClR

($0004 + $0006) • ¢2 • R/W
DBO
I"'"OB1
"'OB2
i"OB3
L.-OB4
OB5
-OB6
OB7

.!'~

-f'..!::1"

..J""~

..J""~

.../"'- ...'::l'"

~~

IClK
10

2D
3D
4D
5D
60
70
80

10
20
30
40
50
60
70
80

---.J

r--

J
74lS273

1
10 OC
20
30
40
50
60
70
80

10

-

20
3D
40
50
60
7D
80

E
--H lATC

PORT 3

..f'~L-f

---1

ClR

RESET

80
70
60
50
40
30
20
10

J

74lS373

MODE 7

MODE 7 I/O PORT 3
FIGURE 5.7

17

MODE 7 74lS273
MODE6 74lS373
MODE 5 74lS373
MODE 7 ($0007) • t/J2 • R/W
MODE6 "1"
ClK or E
MODE5 AS
80
80
70
70
60
60
MODE7 OATA BUS (DBO-DB7)
50
50
MODE6 AD DRESS (A08-A15)40
40
MODE5 AD DRESS (AOO-A07)
3D
30
20
20

rd8

3.3K
74lS126

"'

............. ....

"'....."'

" , ...

....

",-10-

.r-.,I.
1-

1&lR or
MODE7 "1"
MODE6 GND
MODE5 GND

+ 5V

T
74lS273

($0005) • t/J2 .RIW)

DBO
DB1
DB2
DB3
DB4
DB5
DB6
DB7

DATA BUS
(DBO - DB7)

RESET
($0007) • t/J2. R/W

---

DBO
DB1
DB2
DB3
DB4
DB5
DB6
DB7

ClK

10
20
3D
40
50
60
70
80

10
20
30
40
50
60
70

-

ClR 80

---1

DATA DIRECTION REGISTER

I !

E
10
20
30
40
50
60
70
80

O~D
20
3D
40
50
60
70
80

74lS373

DATA INPUT REGISTER

MODES 5, 6, AND 7 PORT 4
FIGURE 5.8

18

PORT 4

74LS243

~
l!f=04

~

PRE

a

0

~CLKClR a~

ClK
ClR
T74lS74

($OOOF) • t/J2 • RIW

I

I

"1"!

"1';-,1,
PRE
r-- 0

PRE

"1" - I- 0

..... ClK

aI-

r-- ClK

ClR

ClR
74lS74

'l74lS74
74lS08

1

r-~
\)

74lS32

0tJ

"1" Y74lS74

t/J2~74lS04
($OOOF) • t/J2 • R/W

DATA BUS
(00-07)

!
OB7
OB6
OB4
lOB3

r

lY
2Y
3Y
4Y

m

74lS367
lA
2A
3A
4A

I/O PORT 3 CONTROL/STATUS REGISTER
FIGURE 5.10

20

'-

J'

APPENDIX A
MC6801 MONITOR COMMAND SUMMARY

L []
V []
o [ [,]]
P , 
M 

Load a program from tape. Add , if specified, to load address on tape.
Verify that a program was properly loaded. Add , if specified, to load address on tape.
Display memory from  to .
Punch or record contents of memory from  to .
Set pointer to  and print value at that memory location.
Next input:
 Change one byte in memory to 
(LF)
Increment pointer and print address and value of new pOinter.
(UA)
Up arrow, decrement pointer, print address and value of pointer.
Space, increment pointer and print new value on same line.
( )
Comma, increment pointer with no print of address or value.
/
Slash, print address and value of current pointer.
(CR)
End memory examine command.

/
/
o  
B
B 
B-

Same as M ;  must start with 0-9, zero may precede hex address.
Print address and value of location last referenced by memory examine.
Calculate relative offset from  to  for branch instructions.
Displ~y.all breakpoint addresses.
Set a breakpoint at address  and display breakpoints.
Remove the breakpoint at address  and display breakpoints.
Remove all breakpoints and display breakpoints.
, if specified, becomes the new program counter. Execute from program counter.
Display/modify user's MPU registers.

BG []
R

Next input:

T []
C []
HI

HY

 Change value of register to 
( )
Space, display register value and move pointer to next register.
(CR)
Terminate register change command.
Period. Trace one instruction. (No carriage return after period).
Trace  number of commands.
, if specified, becomes the new program counter. Execute code as subroutine starting
at address in program counter. User "RTS" returns to monitor.
Set speed for on-chip I/O to 1200 baud (+1024).
Set speed for on-chip I/O to 9600 baud (+128).

21

APPENDIX B
FLOWCHARTS

1)
2)
3)
4)
5)
6)
7)
8)
9)

10)
11)
12)
13)

MAIN - command loop
DISPLAY.- print block of memory command, call HSDTA
HSDTA ~ print block of data
VERIFY/LOAD/PUNCH - initialization for aSDTA call
BSDTA - bulk store date used by tape commands
MEMORY - examine/change memory command
PRINT/MODIFY registers - R command
OFFSET
BREAKPOINT
GO/CALL/TRACE - execution commands
CRrS - return to monitor after CALL
NMI entry - breakpoint or trace
SWI - breakpoint process

22

MAIN COMMAND LOOP

GET COMMAND
TABLE ADDRESS
IN FCTPTR.
COMPARE INPUT
TO TABLE

NO

23

DISPLAY MEMORY
D (CR)
D  (CR)
D   (CR)

YES

NO

DEFINE 
USE MEM/EX
POINTER
DEFINE 

NO

RESET MEMORY/
EXAMINE POINTER
SET ERROR CC

CALL 10
TURN ON POINTER
PRINT BLOCK OF
DATA
TURN OFF PRINTER

24

HSDTA (PRINT BLOCK OF DATA)
HSDTA is called indirectly through the routine 1/0 and is the default high speed print routine. The index pointer
(register 8) for HSDTA is $OE. The 1/0 Packet contains the start address and the end address. Register X pOints to the
1/0 Packet that is transferred to all high speed print routines. The 1/0 Routine "pushes" register X before calling
HSDT A; therefore the address of the I/O Packet follows the return address on the stack.
The routine displays a block of memory to the console device by repetitively calling the character output routine.
WORD
GET ADDRESS
OF 10 PACKET
FROM STACK

~ I-



-

I-



-

2

3

10 PACKET

PO I N T E R

~

L-=::::::::::==1

STACK

PRINT ADDRESS
PRINT 16 BYTES
PRINT ASC11

25

BSDTA (BULK STORE DATA)
BSDTA is a subroutine that reads and writes tape. The monitor's default Load, Punch, and Verify commands use
BSDTA. BSDTA is called indirectly by setting the index pointer (register B) to $14and register Xto pOinttothe liD packet;
then call routine 10. Unless the high speed punchlload device has been redefined, the index pOints to the BSDTAaddress
in the I/O table (defined in the I/O Independence section). The liD packet passed to all high speed punchlload routines
consists of a function code indicating load, punch, or verify. The punch liD packet hasa begin address and an end
address. The load and verify routines have a two-byte offset in the liD packet. The 10 routine pushes register X before
calling BSDTA; therefore the address of the liD packet precedes the return address on the stack. This routine calls CIDTA
and CODTA to do character input and output.

Function Code
Verify = -1
Punch = 0
Load = 1

Word

Word

o

Code

o
2

1
2

-

not
used

3
4

-

2-byte
offset

1

.

3

4

Code = 0
~

I-

Stack Pointer

SP + 3
SP + 4

end
address
Punch liD
Packet

LoadlVerify
liD Packet

SP
SP + 1
SP + 2

begin
address

~------I

Return address
into monitor
Address of
liD Packet

Hi-byte
Lo

Stack

26

BSDTA
PUNCH

GET BEGIN AND
END ADDRESS
FROM 10 PACKET

FRAME CNT+-DIF

WRITE S9 RECORD
CLEAR CONDITION
CODE FOR RETURN

27

BSDTA
LOAD/VERIFY

TAPE FORMAT

NULLS
$D
$A

0
'53
'31

READ
CHARACTER

YES

28

CR
LF
NULL
S (START)
1

bb
bb

#BYTES

XX
XX
XX
XX

ADDRESS

nn
nn

DATA
BYTE 1

nn
nn

BYTE 2

nn
nn

LAST DATA
BYTE

cc
cc

CHECKSUM

VERIFY LOAD PUNCH

SET FUNCTION
CODE = -1 IN
10 PACKET

SET FUNCTION
CODE=1IN
10 PACKET

SET FUNCTION
CODE = 0 IN
10 PACKET

PRINT CR/LF
SET TAPE/NO
ECHO FLAG

REG X +-10 PKT
ADDRESS
'10 CALL TO BSDTA

(BULK STORE)

SAVE CONDITION
CODE AS STATUS
FLAG ON RETURN

TURN OFF TAPE
10 CALL BSOFF

29

MEMORY EXAMINE/CHANGE
ENTRY AFTER
M RECOGNIZED

READ
ADDRESS

NO

NO

SET ERROR
CONDITION
CODE

PRINT
BYTE

SAVE CURRENT
POINTER

READ

YES

SET ERROR
CONDITION
CODE

NO

STORE
DATA

INCR
POINTER

SLASH
COMMAND

I
NO

READ
ADDRESS

INCR
POINTER

SAVE LAST
CHAR READ

INCR POINTER
PRINT CR

DECR
POINTER

30

PRINTADDR,
SPACE

PRINT/MODIFY REGISTERS

R COMMAND CALLS
THIS ROUTINE FOR PRINT
AND FOR MODIFY.
FLAG SETTING

*- PRINT
= MODIFY

PRINT CONTENTS
OF CURRENT
REGISTER

STORE BYTE

31

OFFSET

SUBROUTINE
RD2ADR

A:B -
A:B - A:B -  -1
(UNSIGNED SUBT)

YES

32

PRINT SPACE
PRINT REG B

BREAKPOINT

PRINT CR/LF
>-"oIIPRINT ADDRESSES
INTABLE

NO

CLEAR BREAK
POINT TABLE

REMOVE
FROM TABLE

33

GO/CALL/TRACE

CALL

GO EXECUTE

SET CALL
FLAG

TRACE
T (CRl
T 

(TRACE ONE
INSTRUCTION)

CLEAR CALL FLAG
STORE RETURN
TO MONITOR
ON USER STACK
SAVE MONITOR'S
RTN
YES

SET NUMBER OF
INSTRUCTION TO
TRACE
TRACE N +- REG X
SET EXONE

34

CRTS·ENTRY INTO MONITOR WITH 'C' COMMAND
AFTER EXECUTE USER 'RTS'

SAVE
REGISTERS

REMOVE
BREAKPOINTS

PRINT
REGISTERS

CLEAR
EXONE

35

NMI ENTRIES

FROM $F803

SAVE USER
REGISTERS
REMOVE BRKPNTS
FROM CODE

FROM $F800

POSSIBLE
EXECUTE
ONE
INSTRUCTION
AFTER A
BREAKPOINT
CLEAR EXECUTE
1 INSTR FLAG

YES

SET LATCHES
IN PTM FOR
TIMER

SET PORT 2
CLEAR OLVL BIT
SET OUTPUT
COMPARE

36

SWI (BREAKPOINT PROCESSING)

SAVE STACK,
REGISTERS
RESET STACK
POINTER

REPLACE BRKPNT
WITH OPCODES

YES

EXONE ~$FF

NO

ERROR EXONE ~O
NTRACE ~O

NO

CALLS SUBROUTINESMOVSTK - MOVE USER REGISTER FROM STACK
TO RAM STORAGE IN MONITOR
SET B-

SET BREAKPOINTS (3F) IN USER
CODE, SAVING OP CODES.

RBRK -

REMOVE BREAKPOINTS FROM USER
CODE, REPLACING WITH OP CODES.

37

APPENDIX C
SAMPLE PROGRAMS
The following routines illustrate the monitor flexibility previously described:
1. User-defined 1/0 - USERIO redefines console input an output to use an ACIA instead of the on-chip serial 110.
USERIO must run in an expanded mode to enable use of external resources (Le. ACIA).
2. User-defined vectors in an internal vector mode - OVERFLOW tests timer overflow. An interrupt routine is defined
vector table is redefined.
3. User-defined commands - USRCMD adds a command which redefines the monitor's C command. The new
command is also referenced as CNVRT$DEC. The command converts a decimal number to hexidecimal.
4. Alternate hardware for trace - USEPTM sets the NMI to indicateuse of a PTM. This must run in expanded mode
with external vectors.

38

PAGE

001

FAGE

U5ERI0

0"''''01
00002
00003
00<>04
00005
00FC
F9'28
00F8
0005

00008

00053

*

11054
00055
Q005S

000·29
0001 i~'
00011

• EQUATES INTO MONITOR
A 10PTR EOU
S0FC
RAM LOC-PNTR TO 10 TABL
ENTRY TO INIT REST OF MONITOR
A MYNTRY EOU
SF90S
A OUTSW EOU
S0FG
ECHO/TAPE FLAG, TAPE IF *0
A CHRNL
EQU
$0D5
# NULLS FOR PADDING

Ij0013
(H,.;' 14

***************************************

*

'J0') 15A 3000

0001GA 3000 CE 300B
00017A 3003 OF FC

A

00018A 3005 CE 3068
00013A 3001 7E F906

A

A
A

VISPLAY COMMAND ID) USES HS ROUTINES
HS (HIGH SPEED PRINT) WRITES TO
•
CONSOLE, CALLING DUTCH
'" TAPE COM{1ANDS USE BS (BULK STORE) ROUTINES
BS ROUTINES CALL INCH AND OUTCH TO READ
•
AND WRITE TO TAPE
INCH AND OUTCH CALL THE READ AND WRITE
ROUTINES DEFINED HERE

* MONITOR'S

00024
003025

*
*
*
*

00f~12b

90028

FEBA

MONITOR ROUTINES USED IN 10 TABLE
THE FOLLOWING ADDRESSES WILL CHANGE IF
* T~E MONITOR IS REVISED
A COON
EQU
iFIDZ
TURN ON CONSOLE OUTPUT
$Fe-rll
A (DOFF EOU
H H::::ON
EQU
TURN ON HI SPEED DEVICE
SF8D1
OUTPUT TO HI SPEED DEVICE
A HSDTA EQU
iFDEC
TURN OFF HI SPEED DEVICE
A HSOFF EQU
$F8DI
$FEAF
TURN ON BULK STR DEVICE
A,ESON
EQU
A ESDTA
EQt)
fFEC3
BtlL"';: STORE 10
$FEBA
TURN OFF BULK STR DEVICE
A BSOFF
EQt..l

9CF4
9':FS

A ACIAS
A ACIAD

00u30
00031

*

F8D2
F8DI
F8D1
FDEC
FBDI
FE<'lF

00033

00035
0093b
0"'C·37
000:3[;,

FEC3

'*

00043
O'J044

ACIA

EOU~TES

EQU
EQU

$9CF4
ACIAS+I

STATUS WRD
DATA WRD

**********._******-***********.*********

0f:H2'45

00048
09047
001j48~

3008

A 3000
A 300F
00049A 3011

A 30'13
A 3015
00050A 3017
A 3019

A 301B
00051A 3010
A 301F

3023
3030
3047
F8D2

3048

A
A
A

FOB

COON,PRINT,COOFF

A

FOB

HSON,HSDTA,HSOFF HI SPEED PR

FDB

BSON,BSDTA,BSOFF TAPE ROUTINES

A

A

3023 CC
00058A 3026 B7
00059A 3029 F7
100G0A 30ZC 86
000S1A 382E 20

90976
00077
00073A
00079A
00080A
00011A
00012A
00013A
00084A
100as
00086A
00081
00089
00030A
00091A
00092A
00093A
00034A

USER 10 ROUTINES
INIT, TURN ON CONSOLE INPUT
* INITIALIZE ACIA
AON
LDD
.S0311
INIT ACIA
STAA
ACIAS
MASTER RESET
STAB
ACIAS
LENm8, NO PARITY
LDAA
•• 11
SET PADDING FOR 3e0 BAUD
BRA
HI!

0311
3CF4
9CF4

A

10

A

A
A

45 3075

*
*
*
*
*

3030
3033
3034
3036

BG
47
24
B6

3039 0D
303A 39

READ 1 CHAR W/NO WAIT
MONITOR INCH ROUTINE CHECKS C BIT I~ CCR
IF CLEAR - INCH LOOPS WAITING FOR INPUT
MONITOR 'CHKABT' ROUTINE NEEDS READ W/NO WAIT
TO CHECK FOR 'CONTROL X'
9CF4 A READ
LDAA
ACIAS
READ BIT SET?
ASRA
READ2
04 303A
BCC
geF5 A
ACIAD
READ "'ATA
LOA'"
SET CARRY TO INDICATE DATA READ
SEC
READ2 RTS

*

*

303B
303C
303F
3040
3041
3043
3048

37
F6 9CF4 A
57
57
24 F9 303C
B7 9CF5 A
33
3047 A
3047 33

WRITE I CHAR - NO PADDING. SAVE B
CALLED BY PRINT
WRITE PSHB
WRITE2 LDAE
ACIAS
WRITE BIT SET?
ASRB
ASRS
BCC
WRITE2
OJR ITE DATA
STAA
ACIAD
P\)LB
EQU
AOFF
RTS

*

*
*

3041
304A
304C
304E
3050

80
D6
26
D6
81

000~6A 3054 81
000S7A 3056 27
00098A 3051 C4
0@03SA 305A 20

00100A 305C 54

'"

"A

*

•

00057A

00064
00065
0006B
00067
00061A
001369'"
00070A
00071A
00072
00073A
00074A

A

***.****** •••• *.*.*.*~.*.****.** •• M.*.*.

00095A 3052 27

'" 10 TABLE
• ~DDRES5 OF THIS TABLE MUST BE STORED IN IOPTR
A IOTAE FDE
AON,READ,AOFF

MONITOR OUTCH ROUTINE CALLS PRINT
ADD ROUTINE TO DO PADDING-ASSUME 120CPS
Fl 303B PRINT BSR
WRITE
NULLS FOR TAPE CR
F6
A
LDAB
OUTSW
JMP IF TAPE
02 30S'2>
BNE
PI
.. NULLS FOR CR
05
A
LDAB
CHRNL
CR?
0D
A PI
CMPA
.SD
-JMP IF CR
P2
BE8
08 305C
DO NOT PAD IF DEL
CMPA
10
A
"&10
BEQ
READ2
E2 303A
#:13
MASK OUT HI G BITS
ANDB
03
~
P4
BRA
02 305E
REMOVE LOW 2-BIT CNT
LSRB
P2

LSRB
00101A 305D 54
NO PADDING PER CHAR NEEDED FOR LOWER SPEEDS
00102
00103A 3eSE 5A
P4
DECB
ENOUGH HULLS?
BI1I
READ2
00104A 305F 2B D9 303A
PSHA
0019SA 30G1 3G
CLRA
SET A=NULL
00108A 3062 4F
BSR
WRITE
00107A 3063 8D D5 3038
PULA
00108A 3065 32

*

F.B.D1

F8DI
FDEC
F8Dl
FEAF
FEC3

FEEA

012063

USER 10 CODE TO INITIALIZE 10 TABLE
ORG
53000
#IOTAB
GET USER 10 TABLE
LDX
STX
10PTR
DEF H~E 10 TABLE FOR AC I A
#CMDTAB REDEFINE HI & HY
LDX
MYNTRY
JUMP TO MONITOR
JI1F'

*

0QII2I21

00022

USERIO

A 3021

**.**

*

0Qp~H2I7

Z01
OPT
USERIO
NAM
USER PROGRAM TO TEST MONITOR 10 INDEPENDENCE
CHANGE RESTART VECTOR TO POINT HERE
SUBSTITUTE ACIA 10 FOR MONOTOR'S SERIAL 10

002

ROUTINES

PAGE

003

USERIO

PAGE
BRA

00109A 3066 20 F6 305E

P4

00114A 30G8
00115A 3069

USER DEF *** •• **.* ••••••
• REDEFINE HI AND HY CMD FOR ACIA
THE FOLLOWING TABLE IS USED BY THE MONITOR
A CHOTAE FCB
5
# BYTES IN ENTRY
A
FCC
!HI!
CMD NAME (2 BYTES)

05
48

A 306A

49

A

00116A 30GB
00117A 306D
0011eA 308E

3073

A

FDE

HI

r;)5

A

FeB

S

ADDRESS (2 BYTES)
#BYTES IN nlTRY

48
59
3078
FF

A
A

00009
00010

FCC

/!4Y/

CMD NAME

12112'011

FOB
FeE

HY

ADDRESS
END OF TABLE

A 306F

0011 S'A 307'~
00120A 3072

-1

00123
00124

*

HI .******~******.
SET SPEED FOR 120 CPS
SET # NULLS TO POD C~OR.ICR
A HI
LDAA
#f4F
A HI2
CHRNL
STAA
RT",:

00123A 3073 86 4F
00130A 3075 97 D5
00131A 3077 39

ACIAD
BSON
HI2
IOTAS
PRItH

00025A
00026A
00027A
00028A

*
*

9CFS
FEAF
3075
3008
3048

ACIAS

9CF4

Cj..jR~~L

00D5

HSDTA
FDEC
n'NTRY F306
READ
3030

AOFF
crWTAE
HSOFF
OUTSW
READ2

3047
3068

F8D!
00FG
303A

AON
COOFF
HSON
PI
'WITE

3023
F8D1

BSDTA
COON

FeD!
3050

H'(
P2

303B

l'J~'

~

*

*

00023

HY ******_********
00134
HIGHER YET - 9600 BAUD FOR CRT
(H:}135
SET PADDING TO ZERO
00136A 3078 4F
HY
eLF:"
00137A 3079 20 FA 3075
BRA
HI2
00!38
END
TOTAL ERRORS 00000

EQUATES INTO MONITOR
MAIN
EQU
IF903
~10N I TOR ENTRY
POATA
EQU
$F80F
PR DATA STRING
TCSR
EQU
$08
CLOCK CONTROL REG
VECPTR EOU
$IFE
PNTR TO VECTOR TABLE

*

12'12112122

***************

00133

r2'(~FE

*

A
A
A
A

00020
00021

*

0012e

F903
F80F
0008

012'016
012'017
012112't 8

*

*

00127

THE OTHER INTEPRUPTS ARE SAME AS NMI.
SET LILBUG VECPTR TO POINT TO VECTOR TABLE
ENABLE TIMER OVERFLOW AND INTERRUPT MASK
• PRINT MESSAGE WITH EACH OVERFLOW INTERRUPT

00014
00015

***************

00126

*
*
*

00012

HI & HY SET CHRNL FOR PADDING
LOW 2 BITS =
NULLS AFTER CHAR
• HI 6 BITS =
NULLS AFTER CR

0080
0080 8E 00C0
0083 ~6 08
0085 SA 04

0002SA 0087 97 08
00030A 0089 CE 009F

MONITOR COMES UP
THIS P~OGRAM IS LOADED
AFTER EACH RESTART, EXECUTE STARTING AT
TO SET OVERFLOW INTERRUPT VECTOR

A EEGIN
A
A
A
A
A

00031A 008C DF FE
00032A 00SE 0E
00033A 00BF 20 FE 008F

FEC3
F8D2

3078
.305<:
I TE2 3,21.3(:

BSOFF
HI
IOPTR

FEBA
3073
0'?FC

P4

305E

00035
00036
00037
00038A
00039A
00040A
00041A
00042A

ORG
LDS
LDAA
ORAA

'BEGIN'

$80

.. 5C0
TCSR
#$04

STAA

TCSR

LL')(
STX
CLI
ERA

",TABLE
VECPTR

SET STACK POINTER
SET ETOI
SET VECTOR TABLE PNTR
ALLNJ I ~HERRUPT
WAIT FOR INTERRUPT

••
INTERRUPT ROUTINE *****
* WHEN TIMER GOES FROM iFF TO
~*.

0091
0092
0095
(109"
0099

00044A ')03A
0(;)(:;'4SA

OVFLOW
Z01,LLEN=80

.** •• EXAMPLE OF TIMER OVERFLOW INTERRUPT *.* ••
* REDEFINE VECTOR TABLE USED BY LILBUG
* THIS VECTOR TABLE IS USED IF THE MC6801 MODE
* SELECTED HAS INTERNAL INTERRUPT VECTORS.
* DEFINE OVERFLOW INTERRUPT, SWI, AND NMI.

012'01218

*
*

0'~12Z

NAM
OPT

00004
00005
00006
00007

*

001'13

OVFLOI-J

00001
00002

*.***.***** ••• ~

00111
00112

001

0(~9E

0F
CE 009A
BD F80F
0E
38
4F
04

0, AN INTERRUPT
•
OCCURS AND VECTORS TO 'OVFLOW' TO PRINT MSG
OVFLOH SEI
PREVENT INTERRUPT UNTIL END MSG
LD~:;
,.MSG
A
GET ADR
A
JSR
GO PRINT
PDATA
eLI
ALLOW i NTERRUF'T
RETURN
RTI
A

~lSG

A

FCC
FeE

/OVER/
4

******

0')(2'47

00048
QIf)!)4'3
()I;'()5r~~A

009F
A 00Al
0 i)952Cj 001~3

00AB

(j r2t r)51

12'091

')')f~:,r::'3C!

C~C\A5

00AB

90')54'~

C1')A 7

r~'f)AB

O':")S~:A

(:~C~(:3

F8.Z1

()'?,r~'51;C!

(1r~CjB

F3'Zt3

'-~~0AB

VECTOR TABLE
• DEFINE OVERFLOW INTERRUPT, SWI AND NMI
• VECPTR I ADDRESS ~IFE) MUST POINT TO THIS TABLE
A TABLE FDB
NMI
TAKE NMI IF VECTOR HERE
A
FOB
OVFLOl-J
T I ~-1=:R OVERFLOW
A
FDE
N~11
FDE
A
NMI
cD:::
A
N~ll
FDE
$FE-21
SWI ENTRY - LILBUG BRKPNT
$F;3!~3
H NMI
FDB
NMI - LILBUG TR~CE
END

BEGIN

PAGE

001

VSRCMD

PAGE

00001
00002

NAH
OPT

USRCHD
Z01

***** EXAMPLE OF USER DEFINED COMMAND
* EXTERNAL VECTORS SHOULD BE VSED
* RESET VECTOR NEEDS TO BE SET TO COME

00004
C::10~)05

00008
00007

*
*
*

000 r2·8

00010

*
*
*

00 .. 11
013012
0(~013

*

0'3014
00015
00016
C0017

*
*
*
*
*
*

00013
00020
00021
00022
00023
00024

*

*
*

HERE
SO THAT RESTART WILL RESET USER CMD TABLE
ADDRESS OF LABEL 'START' IS THE RESET VECTOR

FCTPTR POINTS TO COMMAND TABLE
COMMAND TABLE ENTRY CONSISTS OF:
1. NUMBER BYTES IN ENTRY
2. ASCII CHARACTERS FORMING COMMAND NAME
3. ADDRESS OF COMMAND ROUTINE
TADLE IS TERMINATED BY:
-1 INDICATING MONITOR TABLE IS ALSO TO BE SEARCHED
OR -2 INDICATING MONITOR COMMANDS ARE NOT USED
NOTE:

COMMAND LENGTH IS VARIABLE.
DECIMAL NUMBERS ARE NOT VALID IN COMMAND NAME.
AND / ARE SPECIAL QUICK COMMANDS-CANNOT
BE REDEFINED.
A COMMAND IS TERMINATED BY SPACE. COMMA.
CR, OR LF.

S51E
6521
S52:3
S525
C~07bA 6528
00077A S52A
00378A 652C
0~075A S52E
00080~ 6530

0080
00

A CONY
A

01

A

000712'
00071
,,0072A
00073A
0",,,74A
C,CC7SA

*

*********~****w.***~****._**~***.**~*****

*****

CE
SF
SF
BD
81
27
81
2B
81
0008tA 6532 2F

FS0S A
3D
A
24 S550
30
A
S534
39
A
03 6537

,,4

USER COMMAND-CONVERT DECIMAL TO HEX
LDX
*NUMBER
CLR
0,)(
INIT
i,X
CLR
INCH
READ A CHAR
CONV1
JSR
CtifA
TERMINATES NUMBER
PI': I NT
GO PRINT HEX NUMBER
BEQ
,.'0
DECIMAL CHECK
CMPA
ERROR
NOT DEC
BMI
CI1PA
GOOD DEC
BLE
CONU2

=

*

A"DA

:tS-F

STAA

TEMP

A

*

C-0:)Sl A 653D 104
0Q'·092A 853E 37

LDD
ASLD
PSf-iB
F'SHA
ASLD
ASLD
STD
PULA
PL'LB
ADDD
ADDS
,o,r'CA
STD
3RA

0002
0001

ORG
$8~
RAM FOR USER COMMANDS
A NUMBER RMB
2
HEX NUMBER
A TEMP
RMB
TEMPORARY STORAGE

00052A 6503 OF FA
00053A 6505 CE F8SB
00054A 6508 OF Fe
00055
00056

0C
43
S5tE
FF

*

A

USE SAME 10 AS MONITOR

MONITOR ROUTINES USED
A INCH
EOU
$F8~6
INPUT 1 CHAR INTO REG A
iF809
OUTPUT 1 CHAR FROM REG A
A OUTCH EQU
A PDATAI EOU
JF80C
PR DATA STRG (ADR IN REG X)
A OUT4HS EOU
$F815
PRINT 4 HEX CHAR & SPACE

*

ORG
$18500
USE EXPANDED MODE W/MEMORY AT iS500
SET THE COMMAND TABLE PNTR
JUMP TO MONITOR TO CONTINUE INITIALIZATION
BE SURE MONITOR DOES NOT RESET FCTPTR
START
LD~
*TABLE
GET ADR
STX
FCTPTR
LDX
*CI
ALSO SET 10 PNTR
STX
IOPTR
NORMALLY DONE BY MONITOR
VECTOR TABLE NOT NEEDED IF USING EXTERNAL VECTORS
SO DO NOT NEED TO SET VECPTP

*
*
*

*

A
A
A
A

6511
S512
651B
S51D

*_**_ USER COMMAND TABLE
_ THIS C COMMAND REPLACES THE MONITOR'S C CMD
A TABLE FCB
4
BYTES IN ENTRY
A
FCC
IC/
COMMAND NAME - CONVERT DEC
A
FDB
CON V
ADR OF PROCESSING ROUTINE
BEGINNING OF 2ND ENTRY
12
• B'r'TES
A
FCB
A
FCC
./CNVRT$DEC/ANDTHER NAME FOR C CMD
A
FDB
CON V
ADR
A
FCB
-1
TERMINATOR - MONITOR COMMA

A CONV2

ENTRY TO RESET INITIALIZATION

F80S
F809
F80C
F815

00051A 6500 CE 650D

04
43
65tE

000SSA 653S 97 82
0~0SCA S53B EC 00

MONITOR RAM LOCATION
A FCTPTR EQU
50FA
PNTR TO COMMAND TABLE
A IOPTR EOU
$0FC
PNTR TO TABLE OF 10 ADDRESSES

*

0004SA 6500
00047
00048
00049
00050

E50D
E50E
650F

0008SA S537 84 OF

00FA
00FC

00041A 0080
00042
00043A 0080
00044A 0082

ENTRY

*

00031
00032
00033

00033

00059
00060
000S1A
00062A
00"S3A
00064
00"65A
0006£.A
00067A
000S8A

..IMP

000g5A 6534 S6 FF
000B6A 653S 39

F85B

012038

A

ERROR - SET NEG CONDITION CODE, RETURN
MONITOR ~ILL PRINT ?
A ERROR
LDAA
,.SFF
RTS

ENTRY INTO MONITOR
A ENTRY EQU
$F30D
10 TABLE
EQI)
A CI
$F85B

00035
00036
09037

USRCMD

C.C?:S3

0002S
00027
00028
00029

F90D

002

C0057A S50A 7E F90D

*
*

*

00C~S4

00C,::<::;A 653F 36
0~·0S~A 6540 04
C'0C'85A 6'54t 04
000SBA £542 ED 00

000::<7A
0009BA
00099A
00t00A
0010!A
00102A
00:~3A

S544
E545
6546
6548
654A
GS4C
S54E

32
33
E3
DB
B::<
ED
20

00

A
A
00
A
00
A
Os 6525

82

0r'"i (''5

r: (~": ?:;
ClC': " 7

cc~"~c:;.

e.'-'

~

A

550 CE 0080
553 ;::D FE-i5

~

PRINT

~

R~G

A °R!NT
A

L

~EX

CONVERT ASCII TO DEC
GET PREVIOUS NUMBERS
DOUBLE LEFT SHIFT
SAVE DIU BY 2

0,X

SAVE DIU BY 8

a.x

CON','ERS I ON
ADD IN LATEST NUM

TEMP
~QI
1~ , ;...~

CC'l'-lV~

~~~E~RS

G:::T

t~XT

NUM

& SPACE

X P0[!~T TO F:RST BYTE TO PR
LDX
OLT4:"':S

CLR CCR - PREVENT

":'S

*

SET

EXTE~NAL

VEC70RS

E~R

RETU

PAGE

N"3

USRCMD

PAGE

1S

".

€:0

-:'S

~

('('

!7A F"fFA

00 14
Ct~

( •.::0

.: :.~.

F~FA

('C'

·:?A FF"FC

(\('

2::A

("C'

2~~

~FFE

FDS3
FB@3
6SI2'0
6512'0

A
A
A
A

SET SIJI VECTOR
SFB03
NMI VECTOR
FOE
START
FDE
START
END

TO A!... ERRORS 00C:00

FSSE C!
651E CONII

00029l1!0@12'53
12'006~ 12'12'12'67 @@072l1!

;525 C0NVt

ee075*00103

6537 CONV2
ENTRY

@Ol2'B1 012'0SBI!
12'012'27l1!00eS7

c~0D
SS3~

ERROR

0e07S

~~~6

~:TPTR

e0e32~0e~S2

~

::;=~

00:3SK~C~/~

~

iOPTR

00e33~t2C54

USEPTM
OPT
ZI2'1
NAM
USEPTt1
lIE USE PTM INSTEAD OF ON-CHIP COUNTER
FOR HARD>JARE TRACE
lIi
II THE MONITOR >JILL INITIALIZE AND LJSE
RESOURCES FOR TRACE ACCORDING TO THE
II( ADDRESS IN THE N!'tl
VECTOR
lI!
5FS@(l - PTM ADDRESS
5FS03 - ADDRESS FOR ON-CHIP CLK/CNTR
!Ii IF EXTERNAL VECTORS ARE USED, THE MONITOR
lI!
GETS THE NMI VECTOR DIRECTLY.
I! IF INTERNAL VECTORS ARE USED, THE NMI
VECTOR IS RETRIEVED INDIRECTLY FROM
lIE
!Ii
THE TABLE POINTED TO BY 'VECPTR'.

"

•

12'012'16
12'12'12'17
12'12'12'18
12'12'12'19
12'002"
@N'21

00085~

~

12'12'1

012'12'12'1
12'012'12'2
121012'03
0012'04
@12'012'S
00006
12'12'012'7
e0"0S
12'12'12'12'9
12'12'12'112'
0012'11
12'12'12'12
0OO13
12'12'12'14

e0~'l22

:=-:. •
::

O·.)TC~:

t2'0037~

?:-C::T~~

C0e3S:=:

65 ,:' :." 1 N~

00("77

;s
S!

~

STARr

0~C51~ee~20

~

7~3LE

00e~1

0~

2

TE~P

00044~eC08S

(~t?~ G\7~:

00121

CC061~

0@@24
0002!:.A 00F8
100026A 00FS
00027A: eeFA
0@I2'2SA 12'I2'FC

!Ii MONITOR EQUATES
EQU
SWI
SFB21
MONITR EQU
5F912'0
EXNMI EQU
5Fa.12'0
PTMADR EQL'
$CF00
CI
EQU
IFFS5B
FCTABL EOV
IFFa24

F821
F912'D
FS@0
CF@12'
FSSB
F824

A
A
A
A
A
A

10002

I! RAM USED BY MONITOR
OR(i
IF0FS
RMB
A PTM
2
A FCTPTR RMB
2
A 10PTR RMB
2

12'1002
1012'12'2

SWI ENTRY
IN IT MON ITOR
MONlTOR ENTRY FOR PTM NMI
ADR FOR PTM
10 TABLE

PNTR TO PTM ADR
PI'otTR TO CMD TABLE
PNTR TO 10 TABL

ee100

12'12'12'312'
012'031
00032
12"'12'33
12'0034
12'@03SA @clOse
00"361'1 012'ae CE
00(~37A 0083 DF
0~'03SA 00S5 CE
000351'1 12'0SS DF
00040A (>0SA CE
~0e41A e·0SD DF
00~4ZA 00f.F 7E

¥ •• !Ii.!Ii •••••• !Ii~!Ii¥.!Ii ••••• !liF..!Ii.~!liF..ll!li!lillllF. •••

!NITIALIZE TAELES LlSED BY MONITOR
THEN ~IL'MP TO MONITOR
SUCH THAT !'tONI TOR DOES NOT
~
RESET PTM ADDRESS
ORG
$80
#PTMADR RESET PTM ADR
START LDX
CHANGE MON ITOR DEFAULT
STX
PTM
SET 10 TABLE
LDX
+CI
IOPTR
STX
,.FCTABL SET CC.KMANO TABL
LDX
STX
FCTPTR
.JMP
KONITR

:!E

II!

!Ii

CF012'
F8
FBSS
FC
FS24
FA
,FS0D

A
A
A
A
A
A
A

~~~~~~~~~~~~~~

p:

7'!="FA

Fe2~

A

0e':""-fA FFfC

Ff.~'')

~

008('

A

oesc

A

(~':-:·'-'-7A

00~50

T07AL

ER~ORS

cr
FS5B
MONITR F50D

EXTER~AL

r IX:

~~~~~~~~~~~~~~**

RU!="T

!lEC7CIF~S

SRKfNT ENTRY !NTO MONITOR
NMI ENTRY FOR fTM
INlT FROM USER PROG

0000~

EXNMI
PTM

Fa00
12'0F8

FCTABL FB24
PTMADR CF08

FeTpTR 00FA
START 12'(2'S0

IOpTR
S>JI

00FC
F8Z1

The following programs test various features of the M6801:

Program Description
MODE 4 Test the single chip mode 4 in low speed - 300 baud. Serial lID rutine is defined. Interrupt by 153 is enabled.
Port 1 is tied to Port 3. Write Port 1 causes 1$3 and IRQ. The interrupt routine writes one character of a
message. The interrupt vectors use $FO-$FF.
PORTS Cycle through Ports 1, 3, and 4. Read port and print hexadecimal value. Use LILbug print routine.
TIMER Test on-chip timer. Generate square wave and watch on scope. This can be run in single chip mode.
TOGGLE Cycle through all ports, writing to each and watching on scope. This does not use LlLbug. The test can be run
in single chip mode. LlLbug is not used.
TSTIO
TSTIO is a basic on-chip serial lID test that reads the keyboard and echoes to terminal. It sets NRZ and baud
rate of 300.
TSTPTM ihis program tests the PTM which can be used as alternative hardware for LlLbug monitor trace. It sets
latches to zero and brings the PTM outof RESET. Then latches are set and the program loops waiting for NMI
interrupt. NMI is tied to the inverted output of Timer 1. The NMI routine outputs a counter indicating when the
NMI occurred. LlLbug I/O routines are used.

43

PAGE

001

MODE4

PAGE

00Nl1

~

0000Z

0013133
0131305
00006
000137

00008
00005
0No10

FFFE

TEST FOR MODE 4
NAM
MODE4
OPT
201

• SINGLE C~IP TEST MODE
• ~IT~ INTERNAL ROM MONITOR DISABLED
!Ii CAN C~ANGE TD ~ODE S IN SOFT~ARE
!Ii
BY ~RITING : INTO PC0 BIT OF 10 PORT 2.
,.. DEFINE RESET VECTOR
A RESET EQU
~FFFE
USED TO GO TO MONITOR
II( DEFINE PORT 2

00012
00013

0003

A PORT2

0001S
00016
00017
00018

0006
0004
000F

!Ii DEFINE PORT 3
A PORT3 EQU
$06
A DDR3
EQU
~e~
A CR3
EQU
~0F

00020

00021
001022

0002
0000

00£123

100024
00025
00026

00113
0011
0013

EQU

~03

,.. DEFINE PORT
A PORT1
EQU
.02
A DDRl
EQU
$00
• SERr~L 10 EQUATES
A RMCR
EQU
$010
A TRCS
EQU
5011
A TX
EQU
~e13

PORT 3
DATA D I RECTI ON
CONTROL REG

00058
00059A
OGObOA
00061A
000b2A
000b3A
000S4A
00065A
00067
0eoeo68
00069A
00070A
00071A
0eo072A
00eo73A
00074A

eo N" 75A
00eo78A
00077A

RATE ~ MODE CONTROL
TRANS/RECEIV CNTRL/STAT
TRANS REG

00078A
0007SA
00080A
00081A
00082A
0001!.3A

0132

~

00AB
00AC
00AE
00B0
00B2
00B4
00B5

37
D6
C5
27
97
33
39

0eB6
00B8
eo0BA
00BC
00BE
00Cl
00C4
00C5
eoeoC7
00C9
00CA
00CD
00CF
eo0Deo
0003

96
96
88
97
F6
CE
3A
A6
BD
5C
8C
28
SF
F7
3B

000t:.5A 00D4

00028
00029A
00030
001331
00032
1313033
00034A
00035A
00036A
00037
00038A
00039A
00040A
00041A
00042A
e0043A
00044A
00045A
('_'046
00047A
00048A

"'.II(II(.!Ii~.!Ii!li!li •• ~~II(!Ii!li~ •••• !Ii.~!Ii!li~ ••

0080

C.RG

!Ii SET IS3 TO CAUSE IRQ
II( PORT1 IS TIED TO PORT3

00088A eoeDF
00087
eo0088A eo0E1
00(.)8SA

~RITE TO PORT1
TO CAUSE INPUT INTERRUPT ~/PORT3
SET SPEED
30 CPS, INIT 10
.STACK
00F7 A START LOS
LDD
*~~He2
0702 A
A
STD
RhCR
SET BAUD RATE BITS. SET TE
10
., INIT PORT 3
LDD
4000 A
ENABLE INTERRUPT
STAA
CR3
A
eF
SET FOR INPUT
STAB
DDR3
A
04
LDAA
o<$FF
A
FF
STAA. PORTt
A
02
SET FOR OUTPL'T
STAA
DDRl
A
00
OFFS~T
A
CLR
00E1
ALLO~ IRQ
CLl
~ MAIN LOOP
SET LOOP CNTR
A LOOP
LE'AA
0A
GO THRU LOOP 10 TIMES
0002 A LOOP2 CLR
DECA
BI~E
:"'COP2
FA 0098
TRY TO C~ANGE MODES
00E2
A
LD"A

00E2

,..

!Ii

0080 8E
0083 CC
0086 DO
0088
008B
e08D
008F
00S1
0093
00S5
0098

CC
97
D7
86
S7
97
7F
0E

00S9 86
009B 7F

00050A 00SF 2S
0G051~ 0001
86
01)0S2C 00A4 97 03
00Q~~:A 00AG FE FFFE
ee05~~ 00A9 £E 00
0';:·:'55

~c0

A

STAA

A
A

L!)/

JMF

r'C =:72
C,)~

GET RESTART YECTOR
GO TO MONITOR

~~~~~~*~~~~~~~~~~~~~**~*~~~~*~~~~

~

~RITE

IRO

hES!QG~

~ITH

SERIAL TRANSMITTER

MODE4

(l00F

I RQZ

('t:)D0

OFFSET 00El
PORT3
0006
TRCS
0011

C~AR

-

NO PADDING

PS~B

11
A OUTCH2 LDAB
20
A
BITE
FA 00AC
EEQ
13
A
STAA
PULE
RTS

iRes

GET CNTRL ~RD
TDRE SET?
~AIT UNTIL IT IS

*$20
OUTCH2
TX

~RITE

~RD

I(
IRQ
~ PRINT 1 C~AR OF MESSAGE W/EACH INTERRUPT
A IRQ
LDAA
CR3
CLEAR INTERRUPT
A
LDAA
PORT3
A
LDAA
"SFF
A
STAA
PORTl
LDAB
OFFSET
GET MSG OFFSET
A
A
LDX
.MSG
AilX
GET NEXT C~AR OF MSG
0,X
00
A
LtoAA
GET CHAR
ESF;
DUTCH
PRINT
E2 00AE
INCB
CPX
00El
A
*ENDr.SG END OF MSG?
IF;Q2
BNE
eot 00D0
CLRB
OFFSET
0eoE1
A IRQ2
STAB
RTI

0F
06
FF
02
00E1
00D4

53
00
00El
0001
E0

00091
00@92A 00F8
00F7
00093
00B6
000S4A 00F8
0004
000SSA 00FA
0080
"·0eoScA e0FE
00097
TOTAL ERRORS 00000

CR3

OUTPUT

OUTC~

DDRI
LOOP
OL'TC~

RESET
TX

/SUMMER

A MSG

FCC
FCB
A
A ENDMSG EQU
A OFFSET RMB
A MODCHG FCB

*

SD.

TRY MODE

ORG
EOLI

C~ANGE

i:F8

"'-1

BETTER NOT USE ANY
SWI.NMI

A
A

FOB
F'~lB

4

A

FOB
END

START

e013

I NE/

INTERRUPT VECTORS

A STACK

eo000
eoess
0GAB
FFFE

~

f~

•

DDR3
LOOP2
OUTCH2
RMCR

IRQ

0004
009E
eCAC

EI\JMSG 00El
M0)C~G 0eE2
PC~T1

0002

0010

STACK

00F7

IRQ
MSG

PORT2
START

00B6
0004
OBC3
00B0

OT~ER

I

PAGE

001

PORTS

PAGE

00001
00002
00003
00004

NAM
OPT

PORTS
Z01

w CYCLE AROUND PORTS AND READ & PRINT
• DO NOT CHANGE PORT ::: - USED FOR SERIAL 10

00006
0000
0004
0002
0006
N!107

00007

00008
0000S
00010
00011
00013
00014
00015

1"812
F8tS

A
A
A
A
A

• PORT
DDR1
DDR3
P1
1"3
1"4

EQUATES
EQU
$00
EQU
504
EQL'
~02
EQU
$06
EQU
S07

*

MONITOR EQUATE
A OUT2HS EQU
SFe12
A PCRLF EQU
fFelS

00017A 0080

ORG

DATA DIRECTION
PORTt DATA
PORTS DATA
PORT4 DATA
PR 2 HEX Ie SP
CRILF

S80

001

TIMER

0012'01
00002
00003
12'0Nl4
00012'5
0000G
00007

0001
0009

00008

~'008

12'12'12'09

000B

A
A
A
A

00011
12'0012

F815

IE LILSUG EQUATE
A OUT4HS EQU
$Fe15

*

00014A 00S0
012'015
00016A 0080 BS 02
00017A 0082 97 01

ORG
$80
IE INIT DDR FOR PORT2

00024
00025A
00026A
00027A
0002BA
OC'02SA
0003BA
00031A

0087
008A
P08D
0090
lOeS3
0094
0~~7

CE
SD
CE
SD
lOS
BD
BD

00~32A

009A

2~

0~C3~

TOTAL

PORT
LDD
STAA
STD

• MAIN LOQP
010102
A LOOP
LDX
FB12 A
JSR
00106
A
LDX
FS12 A
JSR
INX
F8f2 A
JSR
F8tB A
JSR
EE 0087
BRA
00e.e

E~RO~S

• INIT
A INIT
A
A

A

END

SET FOR INPUT
DDR1
Dr'~3

"PI
OUT2HS
~F3

OL:72YS
OU72~S
f'C:=:L~

LC:'P
I t' I T

00000

GET PORT
ADR
GO PR
GET PORT S ADR
GO PR
SET TO PORT 4 ADR

00019A
00022A
0002tA
00022A
012'023A
00024A
12'0025A

0084
6086
0088
00BA
008C
008F
00S1

D6
C4
07
8D
7C
8D
20

A
08
FE
A
08
A
07 0093
0008 A
02 0093
Fl 0084

00027
00028
00029
00030
100.'31
00032A
0e033A
l'0034A
00035A
QIi)C~37A

0093
0095
0C97
0098

C6 20
DE 09
3A
DF 0B

A
A
A

F81S PCRLF

('0SA CE 0000
009D Db 0S
(~')9F

A
A

56

00A0 ~="s
9:'?A1 2A.FA 009D
0~~43~
~~2~~~

c«

.:,.==.:.

*:::

STAA
P2DDR
SET BIT 1 FOR OUTPUT
!It SET FOR OUTPUT COMPARE PULSE. SET LEVEL
PULSE LDAB
TCSR
GET CONTROL/STAT REG
ANDB
*~FE
CLEAR OLVL BIT
STAB
TCSR
RESET
S5R
SETCLK
SET CMPR REG. ~AIT FOR CMP
INC
TCSR
MAKE LEVEL HI
SSR
SETCLK
ALLO~ LEVEL TO GO HIGH
BRA
PULSE
DO IT AGAIN
!l(IEIE!I\!I\ SETCLK ~**!I\~
~ READ CLOCK
IE SET COMPARE REG = CLOCK + 20
~AIT FOR PULSE
!It LOOP W/ A INCR ~ITH EACH LOOP
SETCLK LDAB
#S20
LDX
CLOCK
GET CLOCK TI ME
ABX
ADD #CYCLES
STX
OCREG
STORE IN COMPARE REG
!It PRINT COUNTER - INDICATE WHEN OCF CLEARED
LDX.9
~ TIMES THRU LOOP
NOT SET LDAE
TCSR
GET STATUS
ASLB
LOOK AT OCF
!N~
TIMES THRU LOOP
BPL
NOTS~T
WAIT UNTIL OCF SET
STX
TE~?
SAV~ ~ TIMES THRU LOOP
SET ADR - GO PR

*

0C~('38

00007IE00021
10000 DDRI
0:;04 DDR3
00008lf-00022
0002011(00034
N;81O INIT
~)0e. 7 LOOP
.00025!1!010032
FB12 OUT2HS 00014*0002S 00028 00030
0002 Pi
0000S*00025
0005 P3
00010*00027

LDAA

A

A

00018

000t9
C0020A 0080 CC 0000
00021A 0083 97 00
00022A 0085 DD 04

NAM
TIMER
OPT
Z01
IE GENERATE ~AVE COMPARABLE TO ~HAT IS NEEDED
FOR LINE TIED TO NMI FOR LILBUG TRACE
~ ~ATCH ON SCOPE
$01
P2DDR EQU
CLOCK EQU
~09
TCSR
EQU
see
TIMER CONTROL STATUS REG
OCREG EQU
f0B
OUTPUT COMPARE REG

~?:A3 FF 0~AD
e0A6 CE 00~D
~0A9 BD FSIS
"('~C

00015~00031

A
A
A

-::·0
e.0~2

A TEt"!P

0C'C'':.;::.
Tor~~

E~~0RS

CLOCK

ecce

PU~SE

0084

00000

NOTSET 005D
SETCLK 0093

OCREG
TCSR

00CE
0008

OL'74HS FiStS

TE1-[P

0t)AD

P2DDR

0Nl1

PAGE

001

PAGE

TOGGLE

00001
00002
00003

•

00005
00006
00007
00008
00009
00010
00011

., PORT
DDRl
DDR3
PI
P2
P3
P4

NAM
TOGGLE
OPT
Z01
CYCLE AROUND PORTS AND WRITE TO THEM

001

TS'rIO

09(:<01

0(Hl02
00003

0000214
0000
0004
0002
0003
(10006
0007

A
A
A
A
A
A

EQUATES
EQU
EQU
EQU
EQU
EQU
EQU

0Qi~~05

DATA DIRECTION

0002106

PORTI DATA
PORT 2 DATA
PORT3 DATA
PORT4 DATA

('·:)0("0.

00007

00020
00021
00022
00023A
00024A
00025A
00026A
000Z7A
00028A
00029A
00030A
00031A
00032A

ORG

0080

A
A
A
A

00AI

A STACK

Eeu

A START
INIT
A
A

LDS
~ST~:K
SERIAL 10 - SET RMCR, TRCS
LDD
#ee78A
NRZ. SERIAL
STD
RMC·
BAUD
30

If!)lf*.W.ldt:

CGCc-9
~\0~q ~1

Q-0f~

-11 A

e0C~

0080
0083
0086
0088

8E
CC
DO
DO

(;,00~;7~

0~C'3e.A

11AIN LOOP
OUTPUT fFF TO $00 TO PORTS
lIE !-jATCH ON SCOPE
LOOP
DEeA
HI TO
STAA
A
PI
WRITE
BSR
0090
DELAY
PAl'SE
STAA
A
1'2
HRIfE
B~'R
0090
D£LAY
HRITE
A
STAA
P3
0090
DELAY
BSR
P4
WRITE
A
STAA
D:::,-AY
BSR
0090
eRA
LC~P
00BA
lIE
lIE

008A
0088
0080
008F
0091
0093
0095
0097
0099
0098

4A
97
80
97
80
97
80
97
80
20

NHl34
ce03SA 00eD C6
("?-~3E:A

00AD
FFFF
00'
04

00t.:l13

~e.0

., INIT PORTS 1,3,4 FOR OUTPUT
A INIT
LOS
"Et{DPGM+10
A
LOD
.~FFFF
SET FOR OUTPUT
A
STO
DDRI
PORTS 1, 2
A
STD
DDR3
PORTS 3 & 4

02
0E
03
0A
06
06
07
0Z
ED

~

8~

00SF SA
00~0 26- FD 0'l'9F
Cte~2 39

00040
00041
TOTAL ERRORS

01A3
0080

DEL2

LCAB

00014A 00C3 CC 07GA
00015A 00C5 DO 10

DDRI
INIT

~0e,Co

=

rc.0016

ee017

TEST - LOOP ON READING INPUT FROM
KEYBOARD AND PRINTING
00019A 00C8 80 02 00ec LOOP
BSR
INC'-:
0sezeA 00CA 20 FC 00C8
BRA
LOO~'
~

*

0~l{118

,. INPUT ROUTINE
LDAA
TRCS
ASLA

e.0022

LOW
PI

00023A 00CC 95 11
00024A NlCE 48
e0~25A

PORT 2

A INCH

00CF 24 FE 00CC

00025R 0@Dl 96 12

A

0@0Z7A 0@D3 84 7F

PORT 3
PORT4

A
00028A e0DS 81 7F
A
00Q29A 00D7 27 F3 00CC

00030A 0009 80 01 0GDC
0,,'('31 A o.'<'DE 39

Ece

INCH

Lr'AA
ANDA
CI'lPA
BEG

RECoil

B=:R

OUTC}.;!

~~e0

DECB

00037A 00EZ 97 13
00~3e,Q

RTS

A ENDPGM EQU
A
END

A

STAA

A

END

INC~

ECHO PRINT

GET CNTRL I-JRD
TDRE SET?

RTS

00E4 39

0003S
00C0
TOTAL ERRORS 00000

GET CNTRL HRD
CHK RDRF SET
LOOP UNTIL IT IS
READ
CLEAR PAR ITY
RUBOUT?

RTS

• OUTPUT ROUTINE
e·0033
00034A 00DC D6 11
A OUTCH LDRB
TRCS
A
BITE
#:!Z::
00C35A eeDE C5 20
00036A B0Ee 27 FA 00DC
SEQ
OUT~!-!
STA~T

.0~00

INCH
STACK
{I(l00

*

1,2,3 & 4

DELAY RO!..'T I N:::

A DELAY

RATE & MODE CONTROL
TRANS/REe eNTRL STAT
READ REG
TRANSMIT REG

0010
0011
0012
,'013

00012A 00ce BE 0GA0
00013A
00014
0001SA
00016A
00017A
00018A

OPT
201
NAM
TSTIO
• ON-CHIP 10 EQUATES
RMCR
EQU
5110
TRes
EQU
501:
RECEV EQU
5012
TRANS EQU
$01~

DDR3
LOOP

.004
00BA

DEL2
PI

DELAY

0090

:=-2

0003

ENDPGM 00A3
P3
13006

00CC
00AB

LOOP
START

00C8
00C0

OUTCH
TRANS

00DC
0013

RoCEV
Tc~S

0012
001!

RMCR

0010

PAGE

001

PAGE

TSTPTM

00001
00002

NAM
OPT

00004
00005
00006
00007
00008

TSTPTI1
Z01

TEST PTM BOARD
NMI IS TIED TO UNERTED OUTPUT OF TIMER 1
SET LATCHES TO o AND BRING OUT OF RESET
II(
TO PREVENT CALtSING NMI AT INITIAUZATlON
!IE THEN SET REQUIRED PTM MODE

II
II
II

00059110
00060
000101
00062
000831'0
000641'0
000£51'1
0008S'"

002

TSTPTM

2049 CE 2000

A
!IE
!IE
!It

204C IlO Fe12
204F BD FetS
2eS2 ElD F8t8
20-55 3B

A
A
A

e0067

00010
00011
00012
00013

FSt2
FS15
FS1S

00015
00016

.I>-

.....

00018
00019A
000201'1
000211'1
00022110
000231'1
00€1<:4
000251'0
000261'0
00027
000281'0
00029A
0003NI
00031110
00032A

C1"00

A
A
A
A

2007 CE 2€143
200A FF FFFC

A
A

CF00
02
03
0122
01
00
AS
00
01

A
A
A
A
A
A
A
A

2000
2010.
2012
2014
2017
?~'lS

201B
2010
201F
2021

CE
SF
GF
CC
1'17
E7
810
A7
GF
4F

2022 CE 2000
2025 03

A

A

2026 2'; FD 202S

2028 CE 2028
202B BD F8t2
202E BD F8lS

A
A
A

CF00
0601

A
A

~.c;:~046

CE
CC
ED
BE:
CE
03
203F 2S
20t.l 20

203t

12000430'1 2034
00049A 2037
000500'1 2039
00051A 2038
C~Cf,j52'A 2G:'3E
C0::~Sa.A

"'FF.,

2000

~,0057A

DLY
2025
OUT"-HS F815

TEMPORARY STORAGE
S20t00
"RG
SAllE REG A
F:MB
REGA
SAVE REG X I\: PRT
TEMP
RME
2
4
FCB
,,:2100
SET STK PNTR
LDS
!Ii SET NMI VECTOR
LDX
"NMIRT
SFFFC
STX
It(
INIT PTM
LOX
"PTM
2,X
SET LATCHES = 0
CLR
3,X
CLR
,,6122
GET OUT OF RESET
LDO
SET TO ~RITE REG 1
1.X
STAA
0,;':;
~RITE REG 1
STAB
#SA€
ENABLE TIMER OUTPUT
LOAA
0.X
STAA
NO MORE IJR ITE TO CR 1
CLR
1. X
FLAG = 0, PRINTED BY NMI R
CLRA
II(
NMI MIGIH OCCUR AFTER IN!T, BUT SHOULDN'T
WAIT LOOP
.:-2e~0
LOX
DEX
PLY
OLY
BNE
It( MAIN LOOP
.MAIN
SIGNAL TOP OF LOOP
LOX
MAIN
....ISR
OL'T2HS
PCRLe
PR CE
.lSR
110 SET CI'HR TO C':'.USE NMI
.FTH
LDX
SET L,M
.S6~1
LOP
2,X
STD
#~FF
RESET FLAG AFTER LATCHES S
LOAA
NMI SHOULD OCCL'R
fe~2Nl0
OELAY
LOX
OEX
DLY2

A

A
A

-

FO 203E
E5 202B

Bt·4E

D:"'Y2

E:F.'A

ti::'; I

NHI RO')T I NE
A NMIRT STAA

t..:

II'

00056
~('{15f.A

.,

ADDRESS FOR PTH
IICF00
A PTM
EGU

0001
0002
04
2003
2004- BE 2100

e0033A

OC'05~;t::

TOTAL ERRORS 00000

LlLBUG EQUATES
i'Fe12
A OUT2HS EGU
OUT4HS
EQL'
!FFelS
A
SFB16
A PCRLF EQL'

lit

2000
2000
2001

000341'1
00035A
00038A
00037A
00038
0003SA
00040A
000411'1
00042
000431'0
00044'"
00045A
0f.~0~7A

II(

2043 87 200';;'
2046 FF 2e01

A

=;T(~

F:=:G~.

:-::::I1-f

SAllE FLAG-SHOIJ ~HEN NMI OC
SAVE :"'OOF' CO')NTER

DLY2
PCRLF

203E
F818

.REGA
LDX
IF NMI AFTER IN IT
PRINT REG A
FF IF AFTER SET LATCHES
PRINT REG X FROM DELAY LOOP
OLrrZHS
.lSR
OL'T4HS
.lSR
PCRLF
...'SR
RTI
END

-

MAIN
PTM

202S
CF00

"

NM!RT
REtiA

2043
2000

OUT2HS FS12
2001
TEMP

APPENDIX D
LlLbug PROGRAM LISTING

PAGE

001

OPT
TTL
NAM

00001

0001212
1000103

00005
00l!'@6
001211217
@@f~0g

0("(Zl09

._lIE

LILBUG 6801 DEBUG MONITOR ••• VER 1.0

lIE
lIE

lIE

lIE

*:.: '* *'
*

Zf2Jl

681211 DEBUG MONITOR
LILBUG

lIE :If lIE
llE

lIE

*' *' * *
L

ll(

I

lIE

lIE

lIE

'*

*

lIE

B U G

L

1'1 0 T 0
A U S T I N

,

F:~

VER 1.0 __ ~

~~~

lIE

lIE

lIE

lIE

lIE

llE

lIE

'*

llE

if.

0 L A

*'
*'*-

10101010
00101'1
0010'12

;;:

1001014
121121015

*******************-*****************1IE*********

12'("?- 1 6
N)017
/21 i~G.' '1 ;.:,

~

ALTHOUGH THE INFORMATION CONTAINED HEREIN, AS
WELL AS ANY INFORMATION PROVIDED RELATIVE

•

THERETO,

*'

*'

*

lIE

lIE

lIE lIE

lIE

!If. lIE

*'

!If. lIE

*'

lIE

T

E X A S

*'

;;:

*

*' '*

lIE
!if

lIE

lIE

lIE

*'

•

HAS BEEN CAREFULLY REVIEWED AND IS
MOTOROLA ASSUMES NO LIABILITY
0RrSI~G OUT OF IrS APPLICATION OR USE, NEITHER
DOE3 IT CONVEY ANY L[CE~5E UNDER ITS PATENT

0(?r\)2~.

~

RIG~TS

0~?J('l22

~*.~~*.*

9
00G.'20

01Z,1Z,·~

*
*

BELIEVED

~CCURATE,

NOR THE RIGHTS OF OTHERS.

•• ! •••• ~* •• ** ••• ***' •• **.**************

'\I' ·COPYR I GHT

(C l

48

r10TOROLA,

I Ne.,

"1978

PAGE
000t8
00019
00020
00021
~Nl22

00023
0~024

00025
00026
00027
00028
00029
00030
00031
00032
0<:)12'·33

00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00040;
00047
00048
00043
0005"

00051

002

LILBUG 6801 DEBUG MONITOR ••• VER 1.0

~

••

PAGE

~

COMMANDS ••••••••••••••••
L
LOAD A PROGRAM FROM TAPE
L .OFFSET) LOAD FROM TAPE WITH AN OFFSET
VERIFY THAT A PROGRAM WAS PROPERLY LOADED
V
V 
LF
INCR POINTER. PR ADR AND VALUE OF NEW PNTR
SP
I NCR PNTR. PR NEW VALUE ON SAt1E LINE
I NCR p'NTR. NO F'R OF ADR OR VALUE
UA
DECR PNTR. PR ADR AND VALUE AT PNTR
I
PR ADR AND VALUE OF CURRENT PNTR
CR END MEMORY EXAMINE COMMAND
XI SAME AS M X. X MUST START WI 0-9. MAT NEED LEADING
I
PR ADR AND VALUE OF LOC LAST REF WITH MEM/EXAM
0 X Y CALCULATE RELATIVE OFFSET FOR BRANCH INSTR
B
DISPLAY ALL BREAKPOINTS
B - DELETE ALL BREAKPOINTS
B X ENTER BREAKPOINT AT ADR X
B -x DELETE BREAKPOINT AT ADR X
G X EXECUTE USER PROG STARTING AT ADR X
G
EX~CUTE USER FROG ,STARTING AT CURRENT PC
R DISPLAY/CHANGE USER'S PROGRAM REGS
TR~C~ t
INSTRUCTION

~

T X TRACE X Ir~STRUCTIONS
( EXECU'fE USER'S CODE AS 5U8R, RTS TO MONITOR

~..............

•

*
*

*

*
*
~

*

*

!Ii

"

*
*
*

*

*
*
•
*

*
*
*
•

*
*

*'
*

C X

xar

USER r S -C-Ot'E

AS

SUER START

AT- ~rtR

X

HI SET HIGH SPEED - 120 CPS FOR ON-CHIP 10
~y SET HIGHER YET SPEED, FOR CRT - 9600 BD
• CONTROL X - TE~MINATE r OP T PRINT
~

•

•

CONTROL W -

W~rT

DUP[NG D OR T PRT,

CAUSES CONTINUATION OF PRINT

AN~

C~~R

003

00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00084
00065
00066
00067
00068
00069
00071
00072
00073A 00CF
00074A 00CF
00076A
00077
00078A
00079A
00080
00081
00082A
00083A
00084A
00085A
00086A
00087
00088A
00089A
00090A
00091A
00092A
00093A
00094A
00035
00096A
00037A
0009BA

0000

LILBUG 6801 DEBUG MONITOR
0017
0018

A
A

0001
0009
00o:l8
000B

A
A
A
A

0010
0011
0012
0013

A
A
A
A

***

*

A

E000

A

0080

******.******** RAM STORAGE **.*** •••••••••
A LOW RAM EOU
S80
USED FOR STK OijFLOW CHK
ORG

A STACK

0001
0003

A
A
A
A

0005
0006
0007
0009
00DB

0001
0001
0002
0002
0001

A
A
A
A

00DC
00DD
00DF
00El
00E2
00E3
00E4

0001
0002
00102
0001
0001
0001

A
A
A

0f2!02

A
A

00E6
00EE
00F2

0008

A

() 0 '2'4
e·00t

A

00099A 00F3
@t.}1!?-0A 00F5

0002

A
A
14

00!~4

0'"0:

A

A
A
A

A

0010tA 00FE.

00GH

0010c'A 00F7
00103A 00FB

0001

A

0002

A

0!~FA

'2'002

A

00"l05A 00FC

0002
0002

H
A

0010£A IZ,0FE

VER 1.0

0003

0001
00D0
0002
0002

0f2!104A

***

• CONTROL CHARACTERS RECOGNIZED DURING PRINT
CNTL~
EQU
117
WAIT CHARACTER
CNTLX
EQU
f18
ABORT CHARACTER
ON-CHIP CLOCK EQUATES
P2DDR EQU
101
PORT 2 DATA DIRECTION REG
CLOCK EQU
109
TIMER 1
TCSR
EOU
108
TIMER CONTROL STATUS REG
OeREG EOU
f0B
OUTPUT COMPARE REG
* ON-CHIP 10 EQUATES
RMCR
EOU
1010
RATE ~ MODE CONTROL
TRCS
EOU
1011
TRANSMIT/RECElijE CNTRL STAT REG
RECEV EOU
S012
READ REG
TRANS EOU
.013
TRANSMIT REG
~ MODE SELECT WORD
MODE
EOU
503
UPPER 3 BITS
MODE
• DEFAULT ADDRESS FOR PTM
PTMADR EQU
IE000

R't1B

~CF

STK PNTR WILL RUN UP

TO~ARD

CT
RMB
INPUT CHAR CT
CKSUM EQU
CT
USED BY LOAD/ijERF
STRTX RMB
2
INPUT CHAR PTR (ON SATCK)
NEXTX
RMB
2
NEXT TABLE PTR
CHRNL - UPPER 6 BITS-. NULLS AFTER CR
LOW? BITS-. NULLS AFTER CHAR
CHRNL RMB
NUM NULLS AFTER CHAR
BBLK
RMB
BULK STORE BLK + NXT 4 LOC
PNTR
RMB
OF'EN ADR
TEMPA RMB
2
TEtlF'
~:MB
* TEMP AND OVFL MUST FOLLO~ TEMPA
OVFL
RMB
OVERFLO~ FLAG
SAVSTK RMB
2
PC
RMB
2
X
RMB
A
RMB
B
RMB
CC
SPSAVE RMB
2
STK
NUMBP EOI)
4
NUMBER OF BREAKPOINTS
BKADR RMB
NUMBP*2
BRKPNT ADDRESS
OPCODE RMB
tWMBP
BRi91
F8DI
F8D2
F8A8
F3DI
F3Dl
FDEC
F8Dl
FEAF
FEC3
FEBA

00196
00197

A
A

FDB
FCB
FCC
FOB
FCB
FCC
FOB
FCB

A
A

~~~.~

001B8
00189
001913
00191A F85B
A F85D

4
/D/
4
/G/

FAB4
04
50
FE72
04
52
FBIE
105
48
49
F8E9
05
48
59
F8Fl
04
54
FC46
04

00187

CALL
DISPLY

F83E
F84"1
F841
F842
F844
F845
F846
F848
F849
F84A
F84B
F84D
F84E
Fe.4F
F850
F852
F853
F854
F856
F857
FB58
F85A

LILBUG 6801 DEBUG MONITOR _ •• VER 1.0

010186

/8/

BRKPNT

005

0000
0002
0004
0006
il'008
000A
000C
000E
'(1010

0012
01)14

0018

A

A

FOB

COON,CODTA,COOFF

A

FOB

HSON,HSDTA,HSOFF

A
A
A

FDB

BSON,BSDTA,BSOFF

A

A
A

A
A

• THE FOLLOI-I!NG ARE INDICES INTO 10 TABLE
CI.ON EQU
0
INIT INPUT DEVICE
CI.DTA EQU
2
INPUT A CHAR WiNO ~AIT
C[.OFF EQU
4
DISABLE INPUT DEVICE
CO.ON EQU
8
[N[T OUTPUT DEVICE
CO.DTA EQU
B
OUTPUT A CHAR W/PADDING
CO.OFF EQU
fA
DISABLE OUTPUT DEVICE
HS.ON
EQU
~C
IN[T HIGH SPEED OUTPUT DEVICE
HS.DTA EQU
SE
OUTPUT BLOCK OF DATA
~S.QFF EQU
$10
DISABLE HIGH SPEED DEVICE
A B5.0N EQU
S12
INIT PUNCH/LOAD
A BS.DTA EQU
S14
I-IRITE DATA BLK TO PNCH/LOAD
A B5.0FF EOU
SIlO
DISABLE PUNCH/LOAD

A
A
A
A
A
A
A
A
A

*~

*
*

•• ~~~!If.* •• ~~

[NCH ••• ~~****~* •• ~
CALL 10 ROUTINE WI INDEX TO [NPUT DATA
CLEARS PARITY

PAGE

01
.....

006

L[LBUG 6801 DEBUG MONITOR ••• VER 1.0 •••

PAGE

*

00213
00214
00215
0021BA
002171'1
0021BA
002191'1
00220A
002211'1
00222A
002231'1
002241'1
00225A
00226A
00227A
@0228A

F873
F874
F876
FB7B
FB7A
F87C
FB7E
F8B0
F8B2
F884
F8B6
F888
F889

00230
00231
100232
0@233A
002341'1
1002351'1
00236A
@I0237A

••••••••••••••• DUTCH •••••••••••••••
CALL [0 ROUTINE loll INDEK TO OUTPUT DATA
• SAVES. RESTORES REG B
F88A 37
OUTCHt PSHB
F88B C6 08
A
LDAB
.CO.OTA PNTR TO OUTPUT A CHAR
F88D 8D 50 F8DF
ESc"
[0
F88F 33
PL'LB
F8910 39
PTS

37
C6
80
24
84
27
81
27
06
26
8D
33
39

02
67
FA
7F
F6
7F
F2
F6
02
02

A
F8DF
FB74
A
F874
A
F874
A
F888
F8BA

IGNORES RUBOUT CHAR
• ECHOES OUTPUT IF FLAG CLEAR
• SAVE, RESTORE REG B
INCHI
PSH8
INCH15 LDAB
.C[.DTA OFFSET TO CIDTA
INCH!
BSR
[0
SCAN 10 DEV[CE
Bec
INCH15
LOOP ON NO WAIT INPUT
ANDA
•• 7F
CLEAR PARITY
BEQ
INCH15
IGNORE NL'LLS
CMPA
•• 7F
RUBOUT?
BEQ
INCH15
LDAB
CH!( I F ECHO
OL'TSIol
[NCH4
BNE
BSR
ECHO [NPUT
OUTCHI
INCH4 PULB

002711'1
002721'1
00273A
00274A
00275A
002761'1
00277A
002781'1
00279,0.
002801'1
00281A
00282A
002B3A
002B4A
00285,0.
002a6A
00287,0.

RTS

*

~/PADDING

00239
••••••••••••••• CIOTA •••••••••••••••
00240
• READ 1 CHAR FROM INPUT WI NO WA[T
00241
• RETURN loll C CLEAR IF NO READ
00242
ELSE REG A = INPUT & C IS SET
00243A F89t 96 II
A CIDTA LOAA
TRCS
GET CONTROL ~ORD
00244,0. F8!:'3 48
ASLA
CHK THAT RDRF IS SET
00245,0, FB94 25 03 FB99
BCS
CIDTAI
READ DATA IF SET
01~246A F896 4e,
LOOK AT ERR EIT
ASLA
00247A F8!7 24 03 F89C
BCC
CIDTA2
RTN W/C CLR IF NO READ
00248
• IF FRAMING ERR OR OVER RUN-READ
002491'1 F8!:'9 96 12
A CIDTAI LDAA
RECEV
READ
00250
• RETURN W/CARRY SET & LDAA BITS SET
@0251A F8!:'E 0D
FLAG READ-NO WAIT ACOMPLISHD
SEC
0025:::A F89C 39
CIDTA2 RTS

*

00254
00255
00256
00257
0025B
00259
00260
~1!SIA

002B2A
002S3A
002B4A
00265A
00:::~;~::A

0(~28('A

*** •• ** •••

CODTA *•••• *****
OUTPUT CHAR FROM REG A
OUTC - SUBR CALLED BY CODTA
EXPECT 30 OR 120 CPS
DEFAULT SPEED
30 CPS
• PADS CR AND CHAR FOR 120
PAD 4 NULLS [F PUNCH CR
F89D 3 7
OUTe
PSH8
F89E D6 11
A OUTCI
LD~B
TRes
GET CONTRL WRD
FBA0 (5 20
A
BITR
.S20
TDRE SET?
F8A::: 27 FA FB9E
BEQ
OUTCt
WAIT UNTIL IT IS
STAA
F8A4 97 13
A
TRANS
F8A6 ,:.,;:,
PULB
F8A? 39
RiS
CRTN

*

*
*

*

=

*

00289
00290
0029lA
00292A
00293A
002941'1
002,,5
00296
00297
00298
0102991'1
00300
00301
00302
00303
003041'1
00305A
003(,\6
00307A
00308A
00309A

BSR
LDA8

OUTC
OUTS\.!

OUTPUT CHAR
GET TAPE FLAG

F8AC
F8AE
F8B0
F8B2
F8B4
F8B6
FBB8
F8EA
FBBC
F8BD
FBBE
FBBF
FBCI
F8C2
FBC3
F8C5
FBC6

***

LILBUG 6801 DEBUG MONITOR
26
06
11
27
81
27
C4
20
54
54
SA
2B
36
4F
80
32
20

02
05
00
0B
10
EF
03
02

FBB0
A
A Nt
F8BC
A
FBA7
A
F8BE
N3

***

BNE
LDAB
CMPA
BEQ
CMPA
BEQ
ANDB
BRA
LSRB
LSRB
DECB

N3
•• 10
CRTN
•• 3
N4

E6 F8A7

SI'q

CRTN

DECR NULL CNTR
EXIT IF ENOUGH NULLS

D8 F89D

PSHA
CLRA
BSR

OllTC

OUTPUT NULL

N4

PR NXT NULL

N4

NI
CHRNL

VER 1.0

•• 0

NOT TAPE
CR
NO PADDING IF OLE
MASK OUT HIGH 6-8IT CNTR
REMO~E

LOW 2-BIT CNTR

FoUL?:'

F6 F8BE

BRA

** ••• *•••••••

••••••• ***** ••• CION ••
INITIALIZE ON-CHIP SERIAL 10
1007 A CION
LOD
•• t007
SET PADDING FOR 300
IF F8EC
BSR
51205
SET RMCR
0A
A
LOAA
•• 0A
SET TRCS FOR ON-CHP [0
11
A
STAA
TRCS
• NO ACTION NEEDED BY THESE DEVICES
TURN CONSOLE IN OFF
F8DI
A CIOFF EQU
TURN ON HIGH SPEED
F8Dl
A HSON
EOU
F8Dt
A ~SOFF
TURN OFF HIGH SPEED
F8Dl 39
COOFF

FBC8
F8CB
F8CD
F8CF

*

CC
80
86
97

*

*

**.** .... *••••• *

*••

003t0A F8[)E 39

COON •••
*********
INiTIALiZE OUTPUT DEVICE-SILENT 700 PRT
TURN ON TI PRINTER
COON
LOX
.PRTON
ACTIVATE ACD
COON2 JSR
PDAlA!
ENTRY FROM BSOFF FOR DELAY AFTER TURN OFF PUNCH
DELAY
LD~
i00 MS DELAY
0'411B
DLY
DEX
SNE
DLY
RlS

00311
00312

'"
***"'.*******.**

~

*

FBD2 CE FF86
FBDS BD FE07

A
A

FBDB CE 411B A
F8DB 09
F8DC 26 FD F8DB

FBDF
F8E0
FE,E2
F8E3
~8E5

3C
DE FC
3A
EE 00
AD 00

0032;::?:. Fe.E7 3·3~~0::24f4

00::;27

00328

[0 ROUTINE .*.* ••• "'."'''' ••••
THIS ROUTINE USES [NDEX TO RETRIEVE 10
ROUTINE ADR FROM 10 TABLE. THEN CALL AS SUBR
REG B IS INDEX INTO 10 TABLE
~ TO 00 (0. REG E IS SET,
10 ROUTINE IS CALLED
.. SAllES REG X
F'S;..IX
10
LDX
IOPTR
ADR OF 10 TABLE
AB~~
ADD OFFSET
LD~.
GET iO ROUTINE ADR
.)S!?
DO 10
FULX
FTS

*

00314
00315
00316
0031;;A
003191'1
t;l0321M
003?1A
00322A

*

*
*

00313

00326
002891'1 FBA8 80 F3 F89D CODTA
00270A FaAA 06 F6
A

007

r2·Ee 33

A
A
A

•••••••• *~~ •••

HT / HI •••••••••••••
• HY & HI SET CHRNL FLAG FOR PADDING
• AND SET ON-CHIP SERIAL (0 RMCR

PAGE

1218 a

***

L[LBUG sa81 DEBUG MON[TOR
~

@@32S
121121330
121121332
121121333
121121334
00335
88336A FBES CC 4F86
00337A F8EC S7 05
9g338A FBEE 07 18

*

***

LOW 2 B[TS = NUM NULLS AFTER CHAR
H[GH 6 B[TS = NUM NULLS AFTER CR

*******~***

•• *

HI

•• **.*****~***

• SET SPEED FOR 120 CPS
• SET
NULLS TO PAD CHAR
• SET B[T5 FOR 1200 BAUD [N RMCR
A 5120
LOD
#f4F06
A 51205 STAA
CHRNL
RMCR
A
STP:B
SET BAUD RATE

*

PT:-.

0033SA Fe,F0 33

00341
00342
0121343
00344A F8Fl CC 0905

VER 1.121

*******~****~*.
~

~[GHER

• SET
A HY

00245A F8F4 20 FS F8EC

HY

_********_.****

YET - 9600 BAUD ON CRT

P~DDING

TO ZERO

LDD

#"[~01;!15

EF:H

512~5

A!..SO SET RMCR

PAGE

@@S

LILBUG 681211 DEBUG MONITOR •• ~ VER 1.121

**********

121121347
121121346
@@34S
12I@3S@
121121351
121121352
121121353

RESET ***11***1*
• COME HERE FOR MONITOR RESTART
• [NtT to & FCN TABLE POtNTERS
TURN ON CONSOLE
PR[NT MONtTOR NAME
tNtT RAM USED BY MONt TOR
MASK [ B[T [N USER CC
• SET INIT[AL SPEED
[N[T HARDWARE TRACE DEV[CE
START LDS
oSTACK
INtT STK PNTR
LDX
.ct
tN[T [/0 PNTR TABLE
STX
t OPTR
LDX
#SERtAL
tNtT VECTOR TABLE POtNTER
STX
VECPTR
LDX
.FCTABL
tNtT FUNCTION TABLE PTR
STX
FCTPTR
LDX
*PTMADR SET ADR FOR PTM
STX
PH1
LDS
.STACK-20 RESET tNCASE USER DIDN'T
STS
SPSAVE
tNIT USER STACK
RESET MONtTOR STK
LDS
"STACI<
LD~~
.BKADR
ZERO BKADR TO OVFL
CLRAM CLR

*
*
*

*

00354

121121355
12I@356A
@0357A
@@35BA
@@35SA
@0360A
@@361A
0@362A
@@363A
@@364A
@@365A
0121366A
@0367A
@@368A
00368A
00370A
00371A
00372A
00373A
@0374A

*

FaF6
F8FS
F8FC
F8FE
FS@I
F903
F906
FS@8
FSI2IB
FS@D
FS1@
F912
FSI5
FS18
F91A
FS1B
F91E
FS20
FS21

8E
CE
DF
CE
DF
CE
OF
CE
DF
8E
SF
8E
CE
6F
08
8C
26
SF
8D

I2II21CF
Fa5B
FC
FFC8
FE
F824
FA
E0@@
Fa
@@BB
E4
00CF
DgE6
00

A
A
A
A
A

A

A
A
A
A
A
A
A

A

[NX

00FB A
FB FSI8
Be F8DF

00375A F923 CS 08

A

CPX
BNE
CLRB
BSR

"CALLF+I
CLRAM

LDAS

#CO.ON

[0

00376A F925 80 B8 F8DF

BSR

[0

00377A F927 CE FF90

A

LOX

0g378A F92A BD FB0E
0037SA F92D 86 D0

A
A

00380A F92F 97 E3

A

JSR
LDAA
STAA

.LtL
PDATA
.SD0
SAVSTK+6

00383
00384
00385A F931 BD FCEA A
00386A F934 27 0A ~940
00387

@038BA
00389A
00390A
00391A

F936
F93S
F93B
F93E

8C
26
7C
20

F8@3 A
17 FS52
001218 A
12 FS52

00392

00393
00394
003?-5A F~40 DE F8
003S6A FS42 6F 92
00397A ~944 6F 03
00398A F946 CC 0122

*
*

A

00~00A F94B E7 00
00401A FS4D CC A600
00403A F350 ED 00

A
A
A

OFFSET FOR CION
TURN ON CONSOLE tN
OFFSET FOR COON
TURN ON CONSOLE OUTPUT
PR LILBUG
NtTH CR/LF
MASK [ tN CC

[NIT FOR WARDNARE TRACE CLOCK OR PTM
JSR
[FPTM
BEQ
[NPTM
GO [NtT PTM
• tN[T ON-CHIP CLOCK
CPX
.IN.NMt
MAY NOT WANT ANY TRACE
BNE
MAtN
IF NMI NOT SET-NO TRACE
tNC
TCSR
SET OLVL BIT Ht
BRA
MAtN
~ tNIT PTM - S[NGLE SHOT, B BIT
USER MUST SET NMI VCTR FOR PTM TRACE
• MONtTOR CHK [F VCTR SET
[NPTM LDX
PTM
GET PTM ADDRESS
CLR
2,X
SET LATCH FOR BRtNG OUT
CL~'
OF RESET, MAKE G Ht
LDD
•• 0122
I • :,~
STAA
SET TO NRITE TO CRI
STAB
0,>::
BRtNG OUT OF RESET
LDD
SET S[NGLE SHOT MODE
.SAb0e>
0,X
STD
ALSO SET NO NRtTE TO CRI

*

A
A
A
A

00399A F949 A7 (2rl

00403

.~.

PAGE

~1~

LILBUG SS01 DEBUG MONITOR

00404
00405
00406
00407
~040SA

00409A
00410A
~0411A
~0412A

00413A
00414A
~0415A

00416
00417A
00418A
00419A
00420A
00421
00422A
00423A
00424A
00425A
0042£A
00427A
0i042e.
00429
00430
0.431
@0432A
0@433A
00434A
00435A
00436A
00437A
00438A
00439A
00440A
00441A
00442A
00443A
00444A

_**

VER t.0 __ *

llllllllllllllllllllllllllllll MAIN ¥llllllllll!lll!lllllllllllll

lIE PROMPT USER
lIE READ NEXT COMMAND
II

F952
F955
F958
F95B
F95D
F960
F963
F965

SE
7F
BD
86
BD
BD
2B
27

F967
F96A
F96C
F96F

BD
2B
CE
20

F971
F974
F976
F978
F'?B
F97D

CE
81
27
CE
81
27

~0CF

A MAIN
.STACK
LDS
00F6 A
CLR
OUTS1~
MAKE SURE INPUT IS ECI-IOED
FB12 A
PCRLF
PRINT CR/LF
.'SR
21
A
L~AA
.' !
F8~9
A
,'SR
OUTCI-I
FA09 A
JSR
INPUTA
A-F ALPI-IA
ED F952
BtH
t1A I N
ABORT
0A F971
BEQ
MAIN01
!IIi HEX "'ALIDITY CI-I~.
F9FC A
JSR
VALIN
E6 f952
BtH
MAIN
< ADR >/ VAL I D?
FA5F A
LOX
.MEM01
ENTER MEMORY ROUTINE
74 F9E5
BRA
MAIN@8
SET UP FOR RTN
¥ A CONTAINS FIRST INPUT CI-IARACTER
FC41
A MAIN0! LDX
.NEXT
CI-IK FOR TRACE
2E
A
CMPA
#'.
QUICK TRACE
6D F9E5
BEQ
MAIN08
FAA8 A
#t1EMSL
LDX
CI-IK FOR /
2F
A
eMPA
QU1CK MEM EXAMINE
66 F9E5
BEQ
MAIN@8
!l
lIE

*

F97F
F981
F984
F986
F988
F98B
F98C
F98D
F990
F992
F995
F997
F999

9F
7F
8D
27
7C
36
30
8C
27
BD
2B
26
20

READ IN STRING_ PUSI-I STRING UNTO TI-IE
STACK. MARK TOP OF STRING IN 'STRTX'

*

01
A
STS
01300 A
CLR
65 F9EB MAIN03 BSR
13 F998
BEQ
13000 A
INC
PSI-IA
TSX
0080 A
CPX
2B F9BD
BEQ
FA09 A
JSR
2C F9C3
BMI
24 F9BO
BNE
E9 F984
BRA

STRTX
CT
TERM
SRC~

CT
.. LO(.JRAM
MERROR
INPUTA
MAIN07
MERROR
tlA I N03

SAVE PTR TO INPUT STRING
INPUT CI-IAR CT
CI-IECK FOR TERMINATORS
GOT ONE,GO DO COMPARES
CT + 1 -} CT
SAVE INPUT CI-IAR ON STACK
CI-IECK STACK POINTER
CI-IK IF END OF STK
GO GET NEXT CI-IAR
ESCAPE
NBRS ARE NOT ALLO(.JEO
LOOP

00445

00446
00447
00448
00449
00450

•

*

lIE
~

*

*

0045t

01H52
11453A
00454A
00455A
00458A

[NTERNAL)~

;,:

F99B
F99D
F99F
F9Al

97
DE
OF
DE

06
FA
D3
D3

0!2I457A FBA3 3C

0045&A
10459A
00460A
00461A

I-IERE AFTER STRING (.JAS INPUT. CI-IECK IT AGAINST
STRINGS IN TI-IE EXTERNAL AND/OR INTERNAL
FUNCTION TABLES. STRTX POINTS TO TI-IE
INPUT STRING. FCTPTR POINTS TO TI-IE START
OF TI-IE FIRST TABLE TO SEARCH (EXTERNAL OR

F9A4
F9A8
F9Hf
F9A9

E6 0~
3A
DF D3
C0 03

A SRCI-I
A
A

STAA
LDX
SP,

A SRCI-I01 LDX
PSHX
LDAB
ABX
A
STX
A
SUBB

8BLK
FCTPTR
NEXf)(
~~EXTX

LOCAL VAR - SAVE DELIMITER
GET PTR TO TABLE
SAllE IN TEMP
GET NEXT PTR INTO TABLE
SAVE A COPY ON STACK
GET ENTRY SIZE
CALCULATE ADDR OF NEXT ENTRY
SAVE FOR NEXT SEARCI-I
SUB OFF AD DR SIZE

PAGE

011

004S2A
00463A
01464
00465
00466
00467
00468
01469
00470A
00471A
00472A
00473
00474A
00475A
01476A
00477A
00478
00479
00480
00481A
00482A
00483A
01484
.04135
00486
00487
00488A
00489A
00490A
00491A
11492A
00493A
00494A
00495A
00496A
00497A
10498A
00499
00500A
01501A
00502A
01503A
0@514
00505
015@6
00507A
11508A
00509A
10510A
0051tA
00512A
00513A

F9AB 01 D0
A
F9AO 27 16 F9C5

')0516
12'0517
00518
12'0519

CMFB
CT
IS INPUT LENGTI-I=ENTRY LENGTI-I?
BEQ
SRCI-I03
YES,A POSSIBLE MATCI-I
NO MATCI-I ON TI-IIS ENTRY
lIE CI-IECK FOR TABLE TERMINATORS
II -1 = END OF EXTERNAL TABLE
-2 = END OF TABLECS)
IF NOT -1 OR -2, NOT RECOGNIZE END OF TABLE
lIE B IS ALLREADY TERM-3
PULX
CLEAN STACK
CMPB
.-4
END OF EXTERNAL TABLE?
NO
BNE
SRCI-I02
SWITCI-I FROM EXT TO INT TABLE
LDX
.FCTABL GET INNER TABLE
STX
NEXTX
SRCI-I02 CMPB
.-5
END OF TABLE SEARCI-I?
BNE
SRCH01
NO,KEEP TRUCKIN
INPUT STRING NOT FOUND ! GO GRIPE
~ I-IERE ON ERROR.
PRINT? AND
* GO BACK TO MAIN START
"ERROR LDX
"QMARK
JSR
POATA
MAIN07 BRA
MAiN
II

*
*

F9AF 38
F9B0 C1 FC
A
F9B2 26 05 F9B9
F9B4
F9B7
F9B9
F9BB

CE
OF
Cl
26

F824 A
D3
A
FB
A
E4 F9A!

F9BD CE FF8E A
F9C0 BD FB0E A
F9C3 20 BD F952

*

*

*
*

*

INPUT LENGTI-I=TABLE ENTRY LENGTI-I. TRY
FOR A MATCI-I. B=SIZE; (SP) = TABLE PTR

!IE

F9C5
F9C7
F9C9
F9CA
F9CB
F9Cl)
F9CE
F9D0
F9D2
F9D4
F9D5
F907
F9D8
F9DA
F9DB

INIT PTR TO INPUT STRING
DE 01
A SRCI-I03 LDX
STRTX
DF D9
A
STX
TEtlPA
RESTORE CURRENT TABLE PTR
313
SRCI-I04 PULX
08
INK
GET TABLE CI-IAR
AS 01
A
LDAA
SAVE FOR NEXT LOOP
3C
PSI-IX
GET INPUT PTR
LDX
TEI'lPA
DE D9
A
INPUT CI-IAR=TABLE CI-IAR?
Ct'1PA
13;1:
Al 00
A
BEQ
YES
SRCI-I05
27 03 F9D7
NO,CLEAN STAACK
38
GET NEXT TABLE VALUE
SRCI-I01
20 CA F9Al
BRA
lIE ~ERE WHEN A C~ARACTER ~ATCI-IED
SRCI-I05 DEX
DEC INPUT PTR FOR NEXT TIME
09
OF 09
A
STX
TEMPA
COMPARED ALL CI-IARS?
SA
DECB
26 EC F9C9
BNE
SRCI-I04
lIE

F9DD
F9DE
F9DF
F9Et
F9E3
F9E5
F9E7

0')S14A F8ES
00'515

LILBUG 6801 DEBUG MONITOR llllW IiER 1.0 ll*ll

38
013
9E
EE
96
AD
?B

~E

I-IAVE A MATCI-I!

GO TO TI-IE ROUTINE

PULX

GET TABLE PTR
POINT TO ADDRESS IN TABLE
STRTX
CLEAN STACK
LDS
LN(
GET ROUT[NE ADDRESS
Qo"X
LOAD TERMINATOR
LDAA
BBLK
I,X
GO TO ROUTINE
MAINI8 JSR
BM[
MERROR
ERROR RETURN
BRA
MAIN07
GO BACK TO MAIN
********** TERMINATOR SUB

INX

Dl
A
00
A
D6
A
00
A
D4 F9BD

**
;;*

CI-IECK INPUT CI-IAR FOR A TERMINATOR
TERMINATORS-ARE:, BLANK (CR>
CI-IAR IN A ON CALL

PC!GE
00520
00521
00522
00523A
00524A
lile525A
00526A
1il0527A
0052BA
00529A
00530A
00531
00533
00534
00535
00536
00537A
0053BA
00539A
00540A
00541A
00542A
00543A
00544A
0054S
00547
00548
00549
00550
00551
00552
00553
00554
005S5A
00556A
00557A
00558A
0055~A

00560A
00S6tA
005S2A
00563A
00564A
00565A
005S6A
005S7A
00568A
00569A
00570A
00571A

IH2

LILBUG

II:
II:

81
27
81
27
81
27

2C
A TERM
0A F9F9
20
A
06 F9F9
0D
A
02 F9F9
Bt 2D
A
TERM02
39

CMFA
BEQ
CMPA
BEQ
CMPA
BEQ
CMFA
RTS

Il

.',

.'
.'-

COMMA?

TERM02

TERM02
.ID
TERM·n

1I:IlllllEitI'IIEIIEIIEIIEllElIElIElIEIIEIIE

VALIN

8D
2F
Cl
2F
7D
27
53
39

11 FA0D VALINF SSR
INPUT
0A FA0B VALIN BLE
VALRTN
04
A
CMFB.4
3A FA3C
BLE
INPUTC
OVFL
00DC A
TST
BEQ
INPUTC
35 FA3C
CN1B
VALRTN RTS

00578A
00579A
01il5B0A
01il581A
00582A

013
FA37
FJ'l39
FA3J'1
FA3C
FA3E

LILBUG 6601 DEBUG MONITOR
C6 FF
39
DE 09
06 DB
39

LDAB
RTS
A INPUT9 LOX
A INPUTC LDAB
RTS

lIE lIE lIE

VER 1.0

lIElIElIE

SET CC NEG
TEMPA
TEMP

SET REG X=. READ
SET REG B=. HEX CHAR READ

BLANK?
00584
1'11'1585

CR?

1lEIIEIIEIIEllEllEllEllEIlllEllElIEllElIEIIE

READS INPUT
0'5 NOT COUNT

READ HEX

LEADING ZEROES?
SET C NEG FOR ERR RTN

READ ROUT! NE
INPUT ENTRY SET B=0, READ A-F AS HEX
INPUTA ENTRY SET B.0, READ A-F AS ALPHA
'" X= HEX NUMBER (ALSO IN TEMPA)
lIE A-LAST CHAR READ (NON-HEX)
.. B= • HEX CHAR READ (TEMP)
II: OUFL • 0 IF OVERFLOW FROM LEFT SHIFT
.. CC SET FROM LDAB BEFORE RETRN
'" CC SET NEG IF ABORT
INPUTA LOAB
.IF0
READ A-F AS ALPHA
ERA
INPUT2
INPUT CLRB
READ A-F AS HEX
INPUT2 LDX
INIT VAR TO 0
STX
STX
TEMP
o TTEMP, OVFL
.TEMPA
X PNT TO WH INPUT CHR STORED
LOX
INHEX
READ A CHAR
INPUT3 BSR
JMP IF NOT HEX
BMI
INPUT7
LDAB
1,X
INPUT5 ASL
0,X
ROL
BCC
INPUT6
SET FLAG IF OVERFLOW
INC
OVFL
INPUTS DECB
LEFT SHIFT 4 BITS
BNE
INPUTS
ORAA
ADD IN LSB

00587
005B8

00589A
00590A
00591A
00592A
00593A
00594A
00595A
00596A
00597A
00598A
00599A
00600A
00601A
00602A
00603A

INHEX lIEllElIElIElIEllElIEllElIEllEllEllEllElIEllElIE
INPUT 1 HEX CHAR, CONVERT TO HEX
lIE RETURN HEX IN REG A
lIE REG B = 0 CONVERT A-F TO HEX
lIE REG B < 0 LEAVE A-F ALPHA
INHEX JSR
INCHNP
(INHEX) MUST BE NEG
CMPA
.'0
BMI
NOTHEX
NOT HEX
CMPA
.'9
BLE
INIHG
GOOD
A-F NUMBERS?
TSTB
BMI
NOTHEX
NO
CMPA
.'A
NOT HEX
NOT HEX
BMI
01PA
.'F
NOT HEX
BGT
NOTHEX
SUBA
.7
INIHG ANDA
.IF
CLRE
AFTER FIND 0-9 CLEARR
RTS
GOOD HEX - RTN
lIElIElIElIElIElIElIElIElIElIEllEllElIElIEll

lIE

005B6

ALLOW MINUS
RETURN WITH Z BIT

lIE VALIDATE INPUT - ENTRY VALINF
III: ~LLOW 4 DIGIT INPUT W/LEADING
II: SET CC NEG IF ERROR

F9FA
F9FC
F9FE
FA00
FA02
FA05
FA07
FA0B

PAGE

Z BIT SET ON EXIT IFF CHAR WAS
TERtlI NATOR

itl'lIEitI'lIElIE lIE llEitI'iIE lIE lIE

F9EB
F9ED
F9EF
F9Ft
F9F3
F9F5
F9F7
F9F9

FA3F
FA42
FA44
FA46
FA4B
FA4A
FA4B
FA4D
FA4F
FA51
FA53
FA55
FA 57
FA59
FA5A

BD
81
2B
81
2F
50
2B
BI
2B
81
2E

F806 A
30
A
Ft FA37
39
A
00 FA5?

EA FA3?
41
A
E6 FA37
46
A
E2 FA37
B0 07
A
S4 0F
A
5F
39

",UU INPUT II(

*

FA09
FA0B
FA0D
FA0E
FAtl
FAt3
FA15
FAt8
FAtA
FAIC
FAtE
FA20
FA22
FAZ4
FAZ?
FA28
FA2A

C6
20
5F
CE
OF
OF
CE
80
2B
CS
68
69
24
7C
SA
26
AA

F0
A
0t FA0E
0000 A
D9
A
DB
A
00D9 A
25 FA3F
17 FA33
04
A
01
A
00
A
03 FAZ7
00DC A
F4 FAtE
01
A

00S72A FA2C A7 01

00573A
00574A
00575A
00576A
00577

DEBUG MONITOR lIElIElIE VER 1.0 lIElIE*

Sa~1

FA2E
FA3\
FA33
FA35

7C
21
81
26

A

STAA

00DB A
INC
E5 FAI8
BRA
18
A INPUT7 CMPA
03 FA3A
BNE
FA37 A NOTHEX EQU

1, X

00605
00606
00607
00S08
00609
00610
006t1
006t2
00SD
00S14
00S15
006t6
00G!7
00618A
00G19A
00G20A
00621A
00G22A
00623A
00624A
00625A
00626A
00627A
00S28A

..

FA5B
FA5D
FA5F
FA6t
FA63
FA65
FA6?
FA69
FA6B
FAbD
FA6E
006Z~A FA6F
0t;l63t;lA FA71

SO
2F
DE
81
27
81
26
80
DF
3C
SF
aD
38

90
52
09
2F
04
20
48
76
07

F9FA
FABI
A
A
FA69
A
FABI
FAEt
A

9C FA0D

TEMF

00S31A FA72 2B 3F FAB3

I Np'IJT3

t;l0S32A
00633A
00634A
00635A

.CNTLX
INPUT9

CHK IF ABORT
SKIP IF NOT ABORT
ERROR ENTRY FROM INHEX

MEMORY EXAMINE/CHANGE lIE lIE lIE lIElIElIE. lIE lIE lIElIElIE.lIE lIE
PRINT VALUE AT 
IS t-4 HEX, NOT COUNTING LEADING ZEROES
lIE SUECOMt1ANDS
< DATA> MODIFY VALUE AT CURRENT LOC
SP
INCR POINTER, PR VALUE AT NEXT ADR
INCR PNTR, NO PRINT
LF
INCR PNTR, PR ADR & VALUE ON NEXT LINE
UA
DEeR PNTR, PR ADR & VALUE ON NEXT LINE
lIE
/
PR CURRENT ADR AND VALUE
CR
TERMINATE MEM/EXAM COMMAND
lIE
MEMORY ESR
VALINP
t1ERRTN
BLE
NOT HEX - ERROR
TE"tIPA
MEM0t LDX
RRESET FOR ADRI
CMPA
/ DELl MITER?
BEQ
MEM02
CMPA
.120
SPACE?
MERRTN
BNE
PRINT VALUE
MEM02 BSR
OUT2H
PNTR
MEM25 STX
FSHX
CLRB
A-F NUMBER FLAG
BSR
INPUT
X=ADR
PULX
RETRN
BMI
IF NEG - ABORT
BEQ
11H103
JUMP IF NOT HEX
LDAB
TEMFA+l GET LAST BYTE
JSR
STRCHK
STORE BAND CHK FOR CHG MEM
EMI
REfRN
ERR IN CHG MEMORY
lIElIE.lIE~lIElIElIElIElIElIElIElIE

lIE
lIE

FA74
FA76
FA78
FA7B

27
OS
BD
2B

07 FA7D
A
DA
FAF7 A
36 FAB3

PAGE

01
01

014

LILEUG 6801DEEUG MONITOR •• '" VER 1.0 •••

00636A FA70 81
00637A FA7F 27
00638
0063~A FA8t 8t
00640A FA83 26
00641A FAilS 08
00642A FA86 20
00643A FA88 81
00644A FA8A 26
0064SA FA8C 08
00646A FA80 20
00647A FA8F 81
00648A FA91 26
00G49A FA93 08
006S0A FA~4 BD
006StA FA97 20
00GS2A FA99 81
006S3A FA9B 26
006S4A FA90 09
00655A FA9E 20
006S6A FAA0 81
006S7A FAA2 26
00658A FAA4 80
00659A FAA6 OF
00660
00661A FAA8 CE
00662A FAAB 8D
006G3A FAAO DE
00664A FAAF 20
00685
00666A FABI 86
00.667A FAB3 39
00669
00670
00671
00672

00
A MEM03
32 FAB3
••• X
2C
A
03 FA88
E3 FA6B
20
A MEM33
03 FA8F

CMPA
•• 0
BEQ
RETRN
AOR OF CURRENT
CMPA
,
BNE
MEM33
INX
BRA
MEM25
CMPA
•• 20
MEM04
BNE

=

.'

IN~:

OA
0A
06

FA6~

A MEM04
FA9~

FBt6 A
00 FAA6
SE
A MEM06
03 FAA0
04 FAA4
2F
~
00 FABt
6C FBI2
07
A
FAA8 A
0007 A
2B FAD8
D7
A
B8 FA69
FF

MEM08
MEM10
MEM12
MEMSL

IlRA
CMF'A
ENE
INK
JSR
BRA
CMPA
ENE
DEX
BRA
CMPA
BNE
BSR
STX
EQU
Lt,~:

•

ESR
LDX
BRA

A MERRTN LOAA
RETRN RTS

MEM02
"1IA
MEM06
PCR
MEM12
"SSE
MEMI}8

PAGE

CR?
END MEM/EX?
BYTE
COMMA?
OPEN NEXT LOC, DO NOT PR
SPACE?
INCR PNTR
GO PR VALUE
LF?

OUT CR, NO LF
PR ADDR,SPACE
UA?

MERRTN
PCRLF
PNTR

'"

.PNTR
OUT4HS
PNTR
MEM02
•• FF

SLASH?
PR CR/LF
SAVE NEH PNTR ADR
FOUIHl / AS I NSTR
X PNT TO PR OBJECT
ADR,SP
RESET X TO PNTR
SET CC NEG FOR RTN

"'*"'*."''''***

00674

OFFSET *."''''.*''' •••
.0 (AOR. CALCULATES OFFSET FROM LAST MEMORY REF
"'HHICH SHOULD BE LOC OF REL ADR OF ER INSTR. TO
*THE (ADR. SPECIFIED
• IF A=0, B<80 DISTANCE CHK
IF A=FF, E>7F

00675

~

00673

00676A
00677A
00678A
00G79A
00680A
00681A
006a2A
00S83A
00S84A
0068SA
01S8SA
I,S87A
00688A
00689A
00S90A
00691A
006~2A

*

FAE4
FAB7
FAB9
FAEt
FAEE
FAC0
FAC2
FAC3
FAtS
FAC7
FAt9
FACIl
FACD
FACF
FA02
FAD4
FAD6

ED
DC
83
93
Cl
22
40
27
20
81
26
D7
80
CE
80
80
20

FES7 A OFFSET JSR
09
A
LDD
000t
A
SUIlD
07
A
SUED
7F
A
CMPB
05 FAC7
BHi
TSTA
08 FACB
BEQ
EA FABI
BRA
FF
A OFF4
CMF'A
ES FAEI
SNE.
DB
A DFF6
STAE
43 FS12
BSR
00DB A
LOX
1}7 FADB
BSR
3C FB12
ESR
00 FAA8
BRA

R02ADR
T-EMPA

READ 2 ADDR

.1
PNT~:

•• 7F
OFF4

OFFSET=TO-CFROM+t 1
CHK IF VALID DISTANCE
POSITIVE DISTANCE?

OFF6
tlERF:TN
NEG DISTANCE
tlERRTN
TEtlP
PCRLF
.TEMP
OUT2HS
PCRLF
MEtlSL

PR OFFSET
PR LF AFTER USER CR

GO TO I

ROl'T I NE

~*~

LILBVG 660t DEBUG MONITOR

VER 1.0

~.~

.~.~ ••••• "' •••••• OUT4HS •••••••••••••••
006~5
• PRINT 2 BYTES AND SPACE
00696
• REG X - ADR OF 1ST BYTE
00697
• X H[LL EE INCREMENTED BY
00698A FAD8 80 07 FAEI OVT4HS SSR
OUT2H
00699A FADA 08
INX
GET NEXT EYTE
00700
• FALL THRU OUT2HS

*•• ••••

*......

00702
~
OVT2HS ."' ••• "' ••• "' ••••••
00703
• PRINT t EYTE AND SPACE
00704
• REG X - ADR OF BYTE
0070SA FADS 80 04 FAEI OVT2HS SSR
OUT2H
t BYTE
00706A FADD 86 20
A SPACE LDAA
.120
PR SPACE
00707A FADF 20 3A FBtE
ERA
XOUTCH
PR 1 CHAR lie RTN

."'
•••• "'~*"' •••• * OUT2H
• PR[NT 1 BYTE

00709
00710
00711

MEM10
. ' II

015

00694

00712A
00713A
00714A
00715A
00716A

FAEI
FAE3
FAE4
FAE6
FAE7

• REG X - ADR
A6 00
A OUT2H LDAA
36
PSHA
80 03 FAE9
BSR
32
PULA
20 04 FAED
BR'A

00718
00719
00720A
00721A
00722A
00723A

FAE9
FAEA
FAEE
FAEC

44
44
44
44

00725
00726
00727A
00728A
00729A
00730A
00731A
00732A

FAED
FAEF
FAFt
FAF2
FAF4
FAFS

84
8S
19
89
19
20

00734
00735
00736
00737A
00738A
01}739A
00740A
00741A
00742A
00743
00744
00745
00745
00747
00748A
00749A
00750A
00751A

••• "' •••• ** •••••

OF BYTE
0,X
READ BYTE ONLY ONCE
OUTHL
OUTHR

RIGHT

. " ' . . . . . . . . . . . . . OUTHL ••••••• "' •••••• '"
• CONVERT LEFT 4 BITS OF BYTE TO DISPLAY
OUTHL LSRA
OUTPUT LEFT 4 BINARY BITTS
LSRA
LSRA
LSRA

••••• "'."'* •••

0F
90
40

*••• "' •• "'''' •• '''.

~"'. OVTHR ••
• CONVERT RIGHT 4 B[TS OF EYTE AND PRINT
A OUTHR ANDA
.IF
OUTPUT RIGHT 4 BITS
A
ADDA
.190
CONVERT TO DISPLAY
DAA
A
ADCA
.140

DAA

24 FEtB

00
A
00
A
B6 FAB3
FF9B A
0e FB0E
AD FASt

BR:A

XOUTCH

PR t CHAR I!c RTN

••••••• *"'''''''.... STRCHK *"''''''' •••• ''' •• ''' •••
* STORE E AT 0,X I!c VERIFY STORE ••• **
• DETECTS NON-EXISTENT MEMORY, ROM, PROTECTED RAM
STRCHK STAB
I,X
STORE B
CMPE
0,X
VERIFY MEMORY CHG
BEQ
RETRN
OK
LOX
"NOCHG
MSG
BSR
PDATA
BRA
MERRTN
SET CC NEG

FAF7
FAF9
FAFE
FAFD
FB00
FB02

E7
El
27
tE
8D
20

FB04
F806
FIle7
F819

."' ••• "' ••• _ ••• "'~ POATAI *"'*"'~
* PRINT DATA STRING
~ REG X POINTS TO PRINT ARRAY
.. X HILL BE INCREMENTED
80 IS FBIE PDATA2 ESR
XOUTCH
CALL OUTPUT ROUTINE
08
INX
X=ADR OF OVTPVT ARRAY
A6 00
A PDATAI LDAA
0,X
GET CHAR
81 04
A
CMPA.4
EOT?

••• *•••• "'.

PtlGE

91G

LILBUG GS01 DEBUG MONITOR ••• VER 1.0 •••

007S2A FB0B 26 F7 FB04
007S3A FB0D 39

BNE
RTS

PDATA2

00755
•••••••••••••••• PDATA •••••••••••••••
007SG
CR/LF THEN PRINT DtlTtI STRING
00757A FB0E 8D 02 FB12 PDATA BSR
PCRLF
CR/LF, DATA STRING
007S8A FBt0 20 FS FB07
BRA
PDATAI

*

00760
.************** PCRLF
0071;:1
OUTPUT CR/LF
0071;:2
SAVE, RESTORE REG X
A PCRLF LDAA
.SA
007G3A FB12 86 0A
007G4A FBt4 8D 05 FBtB
BSR
XOUTCH

*

*

007GGA
007G7A
00768A
007G9A

0'1

0>

00771
00772
00773
00774
00775
01776
00777
00778A
0077SA
10780A
0078tA
00782A
00783A
00784A
01785A
0078SA
00787A
00788A
00789A
00790A
00791 A
00792A
00793A
00794A
00795A

FBtG
FBt8
F£1A
FB1B

8S 0D
A PCR
80 0t FStB
4F
7E F809 A XOUTCH

LOA A
BSR
CLRA
JMP

***************
OUTPUT LF
PR. RTN

.SD
XOl'TC!-l

PR &: RTN

DO CR

OUTCH

OUTPI)T • RTN

**"''''**.**'1<11'

PR I NT REG I STERS *.****.*_.
lIE PR REGlSTERS ACROSS PAGE
lIE PR 2NO LINE REG, READING INPUT
lIE
SPACE - PR CONTENTS REG, GO ,TO NEXT REG
•
HEX,SP - MODIFY REG, GO TO NEXT REG
HEX,CR - MODIFY REG, RTN
lIE
CR OR OT!-lER COMBINATION - NO CHG, RTN
REGSTR BSR
PREGSI
BSR
PCRLF
CR/LF AFTER REG PRINT
REGSI
LDX
"SAVSTK PSEUDO REGS
CLRB
INIT OFFSET
REGS2 PSHX
SAVE REG PNTR
LDX
CONTAINS REG NAMES
ABX
ADD OFFSET
<;I,X
LDAA
GET CURRENT REG
BSR
OUTDA
PR REG NAME, DASH
LOAA
t .. X
"BYTES FLAG
Pl'LX
REG PNTR
TST
CT
PRINT OR MOD?
8EQ
REGS3
MODIFY
TSTA
CHK • BYTES
BEQ
REGS4
PR 2 HEX DIGITS
BSR
OUT2H

*

FBtE
FB20
FB22
FB25
FB2S
FEZ7
FB2A
FB2B
FB2D
FB2F
FB31
FE32
FB35
FB37
FB38
FB3A
FB3C
FB3D

8D
8D
CE
SF
3C
CE
3A
AS
8D
AS
38
70

GG FB8S
F0 FBt2
00DD A
FFB5

A

00
A
62 FB9t
0t
A

00D0 A
?~ 0B F842
40
27 03 FB30
3D AS FAEt
08
80 9C FADB REGS4

007S6A FB3F

I~B

00797A
00798A
00799A
00300A
11801A
00S02A
00803A

FE40
FB42
FE43
FB45
FB4S
FB48
FB4A

20
37
8D
33
tB
CI
26

00804A FB4(

3'3

0080S
00807
00B08A FB4D 310
00809A FB4E 3C

ESR
ERA

OUT2HS

REGS3
08 FB4D

BSR

02
A REGSG
0C
A
DA FB25

PULB
ADDB
CflF'B
BNE
RTS

[NDAT

.2
+12

REGS2

BD
38
33
2B
27
ED
2S
50
27
3S
OC
ED
32
08
20
D6
E7
81
2S
38

JSR
PULX
PULB
lB FB7t
BMI
tD FB7S
BEQ
F9EB A
JSR
14 FB71
BNE
TSTE
09 FBS9
BEQ
PSHA
09
A
LDD
00
A
STD
PULA
INX
04 FB60
BRA
DA
A INDAT0 LDAB
00
A
STAB
0D
A INDATS CMPA
13 FB84
BNE
PRERR PULX

33

P!)LB

00833A
10834A
00835A
00336A
00837A
00838A
0083SA
00840A
0<;1841A

4F
39
81
26
5D
25
BD
20
8D
08

CLRA
RTS
20
A INDAT2 eMPA
F8 FB71
BNE
TSTB
05 FB8!
BNE
FADB A
JSR
03 FB84
BRA
FAD8 A INDAT4 JSR
INDATI lNX

00843
00844
00845A
00846A
00847A
00848A
0084SA

FB8S
FB88
FBeB
F88D
FBS0

80
7C
80
iF
39

0083~A

FA0D

A

INPUT
RESTORE
PRERR
INDAT2
TERM
PRERR

ABORT
NOT HEX
ACCEPT SP , CR
RTN T~ MAIN
CHK LENGTH FLAG

INDAT0
TE~lPA

SAVE LAST CHAR READ
GET 2 BYTE READ IN

0,;0(

RESTORE LAST CHAR
INCR REG PNTR
INDAT5
TEMPA+t

! BYTE C!-lANGE

0,;-:;

_SD
lNDAT!

.120
PRERR
INDAT4
01'T2HS
lNDATt
OUT4~S

CR - RTN
POP RTN AOR
REMOVE FLAG FROM STK
NO BELL ON RETURN
RTN TO MAlN
NO HEX, SPACE
RTN T'O MA IN
:;; OR 4 CHAR
PR

~

CHAR,SPACE

PR 4 CHAR, SPACE
ADJUST REG PNTR',

~:TS

35'

*****.********** PREGS **IIE ••• _*._***_*
lIE PRINT REGS - P,X,A,B,C,S
8A FB12 PREGS! BSP
PCRLF
00D0 A PREGS
INC
CT
SET FLAG-PRT REG
S5 FB22
BSR
REGSt
GO PRINT
RESET FLAG
00D0 A
CLR
CT
RTS

SAVE OFFSET
GO R:EAD INPUT
RETRIEVE OFFSET
I)PDATE
ALL REG CHKED
NO - LOOP

00857
00858
00859
013860

*******IIE*IIE

00aE:1

B  INSERT BRKPNT
~ B -(ADR> REMOVE BRKPNT
BPKPNT CMPA
.SD
CR?
BEQ
PRBRK
PRINT
01PA
DELETE?
BEQ
DELBRK
JSR
VALINP

lNOAT *********IIE*****
lIE INPUT FOR REG MODIFICATION
INDAT PSHA
SAVE LEN FLG
PSHX
REG PNTR ADR
**IIEWW**W*****.~

LILBUG 6801 DEBUG MONITOR ••• VER 1.0 •••

FB4F
FBS2
FB53
FBS4
FBSS
FBS8
FBSB
FB50
FE5E
FBS0
FESI
FB63
FES5
FBSS
FBS7
FBS9
FBSB
FBSD
FB6F
FB7t
FB72
FB73
F874
FB75
FB77
FB7S
FB7A
FE7C
FB7F
FB8t
FIlB4
F885

PR 2 HEX + SP_

REGS6

P5HB

917

00851
._**IIE*****._*** OUTDA _*_*~********~*
lIE PR l NT REG A,' 00852
00853A FBSI 80 02 FB95 OUTDA BSR
ZOUTCH
OUTPUT REG A
00854A FBS3 85 20
A
LDAA
OASH
00855A FB95 7E F809 A ZOUTC~ JMP
OUTC~

IW',
I!>!X

04 FB4S

PAGE
00810A
00811t1
00812A
00813A
00814A
0081SA
008lSA
00817A
00818A
00819A
00820A
00821A
00822A
00S23A
00824A
00825A
0082SA
00827A
00828A
00829t1
00830A
0083tA

.'-

lIE

lIE

• 8 ~

01'86::'

008S3A
00864A
00865A
10865A
008S7A

BRKPNT IIE*******IIE*
COME HERE AFTER RECOGNIZE B
B
DlSPLAY ALL

FB98
FB9A
FB9C
FB9E
FBA0

81
27
8t
27
SD

0D
A
20 FBC9
2D
A
4C FBEt
F9FA A

REMOVE ALL

P""GE
00868""
00869A
00870A
0087\A
00872A
00873A
00874A
00875A
00876A
00877A
00878A
00879A
00880A
00881A
00882""
00883A
00884A
00885A
00886A
00887
00888
00889A
00890A
00891A
00892A
00893A
00894A
00895A
00896A
00898
00899
.0900
08901A
00902A
00903A
00904A
00S05A
00906A
00917A
00908A
00909
019t0A
00S1tA
00913
009!4A
00915A
.0916A
00917A
009t8A
00919A
00920A
00~ZlA

00922A
00S23A
00924A
00925A

018
FB""3
FBA5
FBA7
FBA9
FBAB
FBAD
FBAF
FBBI
FBB3
FBBS
FBB8
FBBA
FBBC
FBeD
FBBE
FBCI
FBC3
FBC5
FBC7
FBC9
FECC
FBCF
FBDI
FED4
FBDS
FBD6
FBD8

LILBUG 6801 DEBUG MONITOR ••• VER 1.0 •••

PAGE

2B
26
81
27
20
81
26
8D
27
CE
EC
27
08
08
8C
26
20
DC
ED

00926A
00927
00928A
00929""
00930A
0093!A
00932A

BD
CE
C6
BD
08
SA
26
39

FBD9
FBDC
FBDE
FBEI
FBE2
FEE3
FBE4
FBE?

44 FBE9
06 FBAD
20
A
41 FBEC
3C FBE9
00
A BP02
38 FBE9
26 FBD9
14 FBC9
00E6 A
00
A BP04
09 FBCS
00EE A
FS FBB8
24 FBE9
D9
A
00
A
FBI2
00E6
04
FAD8

A
A
A

A

F9 FBDI

ABORT?
Bt1l
GOX2
HEX?
BP02
BNE
DELETE
CMPA
BEQ
DELBRK
BRA
GOX2
ERR IF NOT DEL
Ct1PA
CR
"SD
BNE
BERRTN
ERROR RTN
BSR
BRKTAB
IN TABL
BEQ
PRBRK
YES - OK RTN
"BKADR
LC'X
0,X
LDD
BEQ
BP06
AVAIL SP?
I t1;(
CHK NE;o(T POSN
INX
CF·X
.OPCODE END TABL?
BNE
BP04
BRA
BERRTN
NO AVAIL SP
BP06
LDD
TEMPA
GET ADR
STD
0,X
STORE IN TABLE
FALL THRU ""ND PR BRKPNTS
PRINT BRE""KPOINTS
PRBRK
JSR
PCRLF
LDX
"BKADR
LDAB
"4
PRBRK2 JSR
OLIT4 HS
INX
INCR PNTR TO BRKPNTS
DECB
BNE
PRBRK2

.'-

*

*

RTS

CE 00E6
A
DC D9
A
A3 00
A
27 19 FBEB
08
08
8e 00E~ A
26 F3 FBDC
FBE9 A
FBE9 86 FF
A
FBEB 39

• SEARCH BREAKPOINT TABLE
RETURN -I IF BRKPNT NOT IN TABL
OTHERWISE REG X POINT TO BRKPNT IN T""BL
BRKTAB LDX
.EKADR
TABI
LDD
TEMPA
GET PC
SUBD
0,X
BEQ
BRTN
[NX
INX
CPX
.OPCODE CMPAR TO END TABLE
BNE
TABI
GOX2
EOU
ERROR RETURN ENTRY FROM G
BERRTN LDAA
.SFF
BRTN
RTS

*
*

*

*

FBEC
FBEF
FBFl
FEF3
FBF5
FBF8
FEF8
FEFB
FBFD
FBFE
FC00
FC01

BD
2B
81
28
5D
26
CE
~~

02GF
SA
26

DELETE BRKPNT
F9FA A DELBRK JSR
VALINP
F8 FBE9
BM I
BERRTN
0D
A
#SD
01P""
F4 FBE9
BNE
8f.RRTN
TSTB
0D FC95
DBRK6
BNE
00E5
A
.. eKADR-l
LDX
0C
A
LDAB
DBRK2
I N~.
CLI<
il',:,
00
A
DECB
FA FBFD
BNE
DBRK2

ABORT OR ERR?
CR?

019

o

BRKPNT TABLE

FC05
FC07
FC09
Fe0B
FC0D

80
26
ED
6F
20

PRBRK
B~:A
• DELETE 1 BRKPNT
D2 FBD9 DERK6 BSR
ERKTAB
E0 FBE9
BNE
BERRTN
00
A
STD
0,X
08
A
eLR
8,X
BA FBC9
BR~
PRBRK

.**

FC03 20 C4 FBC9

00934
00935
00936
00937
00938
00939A FC0F 97 F7

D=0 FROM BRKT""B
CLF<: OP CODE

•••

•••

~.~** CALL *.~~
**.
CALL USER ROUTINE AS SUBR
USER RTS RETURNS TO MONITOR
STK PNTR NOT GOOD ON RETURN
!IE C 'ADR} (CR > OR C (CR >
A CALL
STAA
CALLF
SET FLAG • 0
*~

*
*
*

!'10"* •• **~:*

00941
00942
00943
00944""
00945A
00946A
00947A
00948A
00949A
009S0A
00951A
00952A
00953A
00954A
00955A
00956A
00957A

FCII
FCI3
FCIS
FCI8
FC1A
FCIC
FCtE
Fe2!
FC23
FC26
FC28
FC2A
FC2D
FCZF

0~·e58A

FC32 '09

00959A
00960A
00961A
00962
00963A
00964A
00985A
00968A

FC33 ED 00
FC35 09
FC36 DF E4

G ilfili****iIf.iIfilf
GO EXECUTE USER CODE
,. G( CR) OR G 
GOXQT CMPA
CR
BEO
GOX6
xaT FROM CURRENT PC
JSR
VALINP
BLE
GOXZ
CMPA
"SD
CR?
BNE
GOX2
ERR
CLR
E;O(ONE
SEE BRKPNT, IF ANT
STX
SAVSTK
SET USER PC
GOX6
JSR
PCRLF
LDAA
CALLF
CALL CMD?
BEQ
GOX7
NO
CLR
CALLF
LN(
SPSAV'E
GET USER STK
RTN TO MONITOR ADR
LDD
"CF~TS

*

FC38
FC3A
FC3C
FC3F

81
27
BD
2F
81
26
7F
DF
BD
96
27
7F
DE
CC

96
28
BD
20

00
A
0E FC23
F9FA A
CF FBE9
0D
A
CB FBE9
0aFS A
DD
A
FBI2 A
F7
A
0E FC38
00F7
A
E4
FC58

"

A

F5
A
03 FC3F
FD36 A
IS FC56

"'0

[JE.t'
STD

0,~.
STOR ON USER STK
ADJUST USER STK
DEX
RESAVE STK
Sf);
SPSA'iE
iIf NOW GO XQT USER SUBR
STOPPED ON BRKPNT
LDAA
EXONE
GOX7
GO;O(8
SNE
,ISR
SETB
BRA
BARMS
GOX8

00968
~.**.~.*,.*
(PERIOD) ••• ******.
00969
TRACE 1 INSTRUCTION
00970A FC41 CE 0001
A NEXT
LDX
"1
00971A FC44 20 09 FC4F
BRA
TRACE2

*

** ••••• iIf**

00973

*

0t.)974
0'97S~

HEX?
JMP iF SO

LILBUG 6801 DEBUG MONITOR ••• VER 1.0

00976A
00977A
00978A
00979A
00980A
00981A
00982A

FC46
FC4!
FC4A
FC4D
FC4F
FCSt
FCS3
FCS6

T

.*.*iIf*.~ ••

T  IN5TTR
TICRI ? - TRACE I
0D
A TRACE CMPA
F7 FC41
BEQ
[NPUT
GET < HEX>
FA0D A
JSR
RTN IF ABORT OR NOT HEX
SA FBE9
BLE
F3
A TRACE2 STX
STORE < HEX>
NTRACE
GO~:2
RTN IF TRACE = 0
~~ 98 FEE9
BEQ
EX ONE
XQT I INSTR
7C 00F5
A
INC
ARMSTK
20 62 FCBA BARMS
BRA

81
27
BD
2F
DF

PAGE
00384
00385
00986
00987
00388
99389A
99399A
99331A
00332A
09993A
00994A
00995A
00996A
00997A
00998A
00999A
01000A
91902
01003
01004
01005A
01906A
01007A
01008A
91909A

en
00

929·

FCS8
FCS9
FCSA
FCSC
FCSD
FC5F
FCS2
FC64
FC66
FC69
FC6B
FC6E

FC71
FC73
FC75
FC76
FC78

LILBUG S89t

36
07
97
32
9F
8E
DD
DF
CE
DF
BD
7E

E3
E4
00CF
El
DF
FC58
DD
FD15
FD7A

C6 18
DE 09
3A
DF 0B
39

~E8UG

HONITOR ••• VER 1.0 •••

•••••••••• CALL SUBR ••••••••••
• ENTRY AFTER C COMMAND, AFTER XQT USER RTS
• SAVE USER REGISTERS
• PRINT REGISTERS
• RETURN TO ROUTINE CALLING C COMMAND ROUTINE
CRTS
PSHA
SAVE TO GET CC
TPA
A
STAA
SAVSTK+6 CC
PULA
SPSAVE
STK PNTR
A
STS
.STACK
LDS
SAVSTK+4 A,B
STD
A
SAIiSTK+2 X
STX
_CRTS
PC PNT TO MONITOR
LDX
A
SAVSTK
A
STX
REMOVE BRKPNTS
RBRK
JSR
A·
ENDCAL
GO PR REGS, 0 EXONE
A
JMP

'"

• SETCLK - USED BY ON-CHIP CLOCK
• FOR H"'RDUARE TRACE
• SET TIMER TO COMPARE AFTER 1 CYCLE OF USER INSTR
SET .CYCLES
A SETCLK LDAB
•• f8
GET CLOCK TIME
A
LDX
CLOCK
ABX
ADD • CYCLES
ST~:
OCREG
STORE IN COMPARE REG
A
RiS

911H 1
91912
01913
01014
01915
0101S
01017
01018
01019A FC79 7C 0008 A
01020A FC7C 8D F3 FC71

•••••••••• NMI ENTRy ••••••••••
• ENTER FROM XOT 1 INSTR - TRACE OR XQT OVER BRKPNT
• MOVE REGS FROM USER STK TO MONITOR STORAGE
• REPLACE BRKPNTS HITH USER CODE
• I F NOT TRAC I NG, REPLACE CODE HI TH BRKPNTS (3F)
• IF TRACING, PRINT REGISTERS
•
EXECUTE NEXT USER INSTR
• ENTRY FOR ONCHIP CLOCK TRACE
C.NMI
[NC
TCSR
BRING LEVEL HIGH
BSR
SETCLK
NO NM I, BUT LEVEL CHG

01022
01923A
91024A
91925A
01026A
01027A
01028'"
01029A
91930A
01031A
01032A
01033'"
01034A
01035'"
01036A
01037
01038
01039
01040A
01041A

• ENTRY FOR PTM HARDUARE TRACE
M.NMI TSX
TRANSFER STK PNTR
LDS
.STACK
SAVE tJSER REGS
BSR
MOVSTK
REMOVE BRKPNT
JSR
RBRK
TRACE?
LDX
NTRACE
BNE
NM[01
CLR
EXONE
JSR
SETB
BMI
NMI03
BRA
ARMSTK
NMI01 DEX
NMI015 STX
NTRACE
BNE
NMIt'2
CLR
EXONE
• PRINT TRACE LINE:
• OP-XX P-XXXX X-XXXX A-XX B-XX C-XX S-XXXX
• CHECK IF USER HIT CONTROL X TO TERMINATE TRACE
NMI92 LDX
_t'
CLR TRACE & EXONE IF TERMINATE
JSR
CHKAET

FC7E
FC7F
FC82
FC84
FC87
FC89
FC8B
FC8E
FC9t
FC93
FC95
FC96
FC9S,
FC3A

39
8E
8D
BD
DE
26
7F
BD
28
20
09
DF
26
7F

00CF A
79 FCFD
FD15 A
F3
A
lOlA FC95
09F5 A
FD36 '"
24 FCB7
25 FCBA
F3

A
FC9D
00F5 A
~3

FC9D CE 0000
FCA0 ED FDD7

A
A

PAGE

02:1

01042A
0t043A
01044A
01045A
01046A
01047A
01048A
01049A
01050'"
01051
01052
01t'53
01054A
01055A
01056A
01057A
01058A
01059A
01060A
01061A
01062A
010&31'1
01064A
010S5A
010SSA
01067A
01068
01069A
01070A
01071
01072
01073A
01074A
01075'"
01076A
0t077A
01078A
01079
010B0A
01082
01083
01084A
01085A
01086A
010S7A
01089
91090
0109l
01092A
0t093A
01094A
11095'"
11096'"
01097A
010981'1
01099A

LILBUG 6801 DEBUG MONITOR ••• VER 1.0 •••

FCA3
FCA5
FCA8
FCAB
FCAD
FCB0
FCB3
FCB5
FCB?

27
CE
BD
DE
BD
BD
96
2&
7E

FCBA
FCBC
fCBE
FCEF
FCCI
FCC2
FCC4
FCC5
FCC6
Fecs
FCC9
FeCB
FCCD
FCCF

9E
DE
3C
DE
3C
DC
31>
37
96
36
96
27
DE
OF

Fl FC96
BEQ
NMI0t5
TERMINT IF = CNTL X
FFBI '"
LDX
_PRTOP
GET ADR OF OPFB0E A
JSR
PDATA
GET OLD PC
D9
A
LDX
TEMP'"
FADB A
JSR
OUT2HS
PR OPCODE
PR TRACE LINE
FE88 A
JSR
PREGS
F5
A
LDAA
EXONE
03 FCBA
BNE
ARMSTK
F952 '" NMI03 JHP
!'fAIN
II STACK L'SER REG I STERS
~ MOVE F~OM MONITOR STORAGE TO USER STACK
• IF TRACE - SET H"'RDHARE
E4
A ARMSTK LDS
SPSAVE
SET STK FOR RTI
DD
A
LDX
SAVSTK
PC
PSHX
DF
A
LOX
SAVSTK+! X
PSHX
El
A
LDD
SAVSTK+4 GET A, B
PSHA
MOVE TO STK
PSWB
E3
A
LOAA
SAVSTK+6 GET CC
PS~'"

F5
A
lC FeE9
DD
A
D9
A

FCDI 8D 17 FCEA
FCD3 27 0D FCEl
FCD5 86 02
A
FCD7 97 01
A
FCD9 D6 08
A
FCD~ C4 FE
A
FCDD 07 08
'"
FCDF 8D 90 FC71
FCEI A
FCEt 38

FCE2
FCE5
FCE7
FCE9

CC 0501
DE F8
ED 02
3B

LOAA
EXONE
BEQ
"'RMS04
SAVE PC PNTR FOR NXT TRACE PRT
LOX
SAVSTK
STX
TEMPA
• CHECK IF USE PT" OR ON-CHIP CLOCK
BSR
IFPTM
BEQ
SETPTM
GO USE PTM
• IF USER ISSUE TRACE COMMAND AND
II NOT USING PTM - ASSUME ON-CHIP
LO"'A
_2
SET DDR FOR OUTPUT
STA'"
P2DDR
PORT 2
LDAB
TCSR
SET UP FOR ON-CHIP CLOCK
ANDB
.SFE
CLEAR OLVL BIT
STAB
TCSR
BSR
SETCLK
SET CMPR REG, WAIT FOR CMPR
DUMMY EQV
•
INTERRUPT VECTORS USE THIS
RTf

• SET HARDHARE FOR PTM
• INITIATE COUNTER
A SETPTM LDD
•• 0501
M=5,L=1 TURN ON TRACE
A
LDX
PTM
GET ADR OF PTM
A
srD
2,X
STORE AT PTM ADR +2
ARMS"'4- RTf

FCEA CE FFF0 A
A
FCED 96 03
A
FCEF 84 E0
~CFl 81 20
A
FCF3 27 02 FCF7
FCF5 DE FE
A
A
FCF7 EE IC
FCF9 8C F800 A

II CHECK NMl VECTOR
II DETERMI NE I F LISE ON-CH I P CLOCK OR PTM
~
FOR HARDWARE TRACE
IFPTM LDX
.VECTR
GET ADR OF VECTORS
LOA'"
MODE
EXTERNAL VECTRS?
ANDA
_SE0
CHK 3 MSB
CMPA
.'20
MODE I?
BEQ
IFPTM2
LDX
VECPTR
GET VECTOR TABLE
IFPTM2 LDX
SC,X
GET NM! ADDRESS
CPX
.EX.NMI PTM ENTRY?

PAGE

022

LILBUG 6801 DEBUG MONITOR ••• VER 1.0 •••

01100A FCFC 39
01102
01103
01104
01105A
01106A
01107A
01108A
01109A
01110A
01111A
01112A
01113A
01114A
0111 SA
0111SA
01117A

()1

<0

01119
01120
01121
01122
01123A
01124A
01125A
01126A
01127A
01128A
01129A
01130A
01131 A
01132A
01133A
01134A
01135A
01136A
01137A
01138A
01139A
01140A
01141A
01142A

FCFD
FCFF
FD01
FD03
FD05
FD07
FD09
FD0B
FD0D
FD0F
FDtt
FD12
FD14

FD15
FD17
F019
FD1C
FDl E
FDl F
FD20
FD21
FD23
FD24
FD26
FD28
FD2A
Ft'2B
FD2C
FD2D
FD2E
FD30
F032
FD35

01144
01145
01146
01147A FD36
01148A FD38
01149A FD3A
01150A FD3D
01151 A FD3F
01152A FD40
01153A FD42
01154A FD44
01155A FD46
01156A FD47
01157A F049

A6
97
EC
97
07
EC
DO
EC
DO
C6
3A
OF
39

96
27
CE
C6
3C
3C
3A
A6
38
EE
27
A7
38
08

00
E3
01
E2
EI
03
OF
05
DO
06

A
A

E4

A

A

A
A

A
A
A
A
A

••••••••••••••• MOVSTK •••••••••••••••
• MOVE USER REGS FROM USER STACK TO MONITOR STORAGE
• RESET USER STACK POINTER
MOVSTK LDAA
0,X
MOVE C,B,A,X,PC
STAA
SAVSTK+6 TO PC,X,A,B,C
I ,X
LDD
STM
SAVSTK+5
SAVSTK+4
STAB
LDD
3,X
STD
SAVSTK+2
LDD
S,X
sm
SAVSTK
LDAB
.S
ABX
STX
SPSAVE
RTS

F2
A
lC FD35
00ES A
08
A

00

A

00
A
02 FD2A
00
A

••••••••••••••• RBRK •••••••••••••••
• REPLACE BRKPNTS (SWI) WITH USER CODE
• BKADR - TABLE OF 4 BRKPNT ADR
• OPCODE - TABLE OF OPCODES, CORRESPOND TO ADR
RBRK
LDAA
BRKFLG
IGNORE IF BRKPNTS NOT IN
BEQ
RBRK6
Lor.
.BKADR
GET TABLE OF ADR
LDAB
.NUMBP.2 INDEX INTO OPCODE TABLE
RBRK2 PSHX
SAVE TABLE ADR
PSHX:
ABX
LDAA
GET OPCODE
PULX
0,X
LDX
GET USER BRKPNT ADR
BEQ
RBRK3
NO ADR
STAA
RESTORE OPCODE
RBRK3 PULX
GET NXTT ADR FROM TABL
IN:>,

0S

SA
CI 04
A
2S EC FD1E
7F 00F2 A
39
RBRK6

96
2£
CE
C6

F2
A
70 FDA A
00E6 A
08
A

3(:

EE
27
AS
37
CS
BD

RETURN WITH CC SET

RTS

A
10 FD54
A

00
00

3F
FAF7

A

INX
DECB
CMPB
BNE
CLR
RTS

PAGE

023

01158A
01159A
01160A
011 Sl A
01162A
011S3A
01164A
011S5A
011S6A
01167A
01168A
011S9A
01170A
01171A
01174
01175
01176
01177
01178
01 t7!:t
01180
01Hll ..
01182A
01183A
01184A
01185A
0118SA
01187A
01188A
01189A
01190'"
011910'1
01192A

ADJUST OPCODE INDEX
END TABLE?

••••••••••••••• SETB •••••••••••••••
~ REPLACE USER CODE WITH 3F AT BRKPNT ADDRESSES
• IGNORE IF BREAKPOINTS ALREADY IN
SETB
LDAA
BRKFLG
ALREADY IN?
BNE
SHERR
SET NEG RETURN
LDX
.BKADR
LDAB
.NUMBP*2 SET INDEX INTO OPCODES
SAVE ADR PNTR
SETB2 PSHX
LOX
0,X
GET USER BRKPNT ADR
BEO
SETB4
SKIP IF NO ADR
LDAA
0,X
GET OPCODE
PSHB
SAVE OPCODE INDEX
LDAB
SET SWI
.'3F
JSR
STRCHK
STORE 8< CHK CHG

30
8E
80
DE
0:;
OF
OF
96
27
8D
BD
2S

0E FD5E
00

A
SETB4

04
A
E3 FD3F
F2
A
SETB6

00CF A
98 FCFD
DO
A
DO
A
09
A
F2
A
0A FD7A
A3 FD15
FBD9 A
03 FD7A

FD77 4C
FD78 20 04 FD7E

01196
01197
0"l19~.A

CLR BRKPNT FLAG

FD5F
FD60
FD63
FD65
FD67
FDS8
FD6A
FDSC
FDSE
FD70
FD72
FD75

33
38
2B
3C
3A
A7
38
08
08
SA
Cl
26
07
39

01t93
0'l.1.94A
@'!"195A

.NUMBP
RBRK2
BRKFLG

FD4C
FD4D
FD4E
FD50
FD51
FD52
FD54
FOSS
FOSS
FD57
FD58
FD5A
FD5C
FD5E

LILBUG 6801 DEBUG MONITOR ••• VER t.0 •••

011519A
01Z~0A

01201A
01202A
01203A

FD7A
FD7B
FD7C
FD7E
FD80
FD83

4F
SF
DO
:;7
BD
7E

FD7A

A

F3
F5
FB86
F952

A
A
A
A

01205
01202
01207
01208
012~~9

01210
012"t 1

01212
01213

01214
01215A FD86 DE D7

PULB
PULX
BMI
PSHX
ABX
STAA
PULX
INX
INX
DECB
CMPB
BNE
STAB
RTS

SETB6

.NUMBP
SETB2
BRKFLG

INDEX
ADR TABLE PNTR
3F STORED GOOD?
RESAVE TABLE PNTR
CALCLATE OP POS IN TABLE
SAVE OPCODE
GET TABLE ADR
GET NXT ADT
ADJUST OPCODE INDEX
END TABLE?
LOOP IF NOT
SET BRKPNT FLAG

•••••••••• 5WI ENTRy ••••••••••
• ENTER WITH BRKPOINT SETTING
• SAVE USER REGISTERS
• DECR PC TO POINT AT SWI
• REPLACE SWI'S WITH USER CODE
• PRINT REGISTERS
• GO TO MAIN CONTROL LOOP
M.SHI
TSX
GET USER STK
LOS
.STACK
SET TO INTERNAL STK
BSR
MOVSTK
SAVE USER REGS
DECR USER PC
LDX
SAliSTK
DEX
SAVSTK
STX
SAVE FOR BRKTAB CHK
STX
TEMPA
ERR IF NOT BRKPOINT
LDAA
BRKFLG
BKPERR
BEO
RBRK
REMOVE BRKPNT FROM CODE
BSR
~ISR
BRKPNT IN TABLE?
BRKTAB
BKPERR
BNE
• REG A
0 IF BRKTAB FIND BRKPNT
INCA
BRA
SWl3
• ENTRY FROM eRTS - PR REGS, RTN TO MAIN
ENDCAL EQU
BKPERR CLRA
CLRB
STi)
NTRACE
RESET NUM INSTR TO TRACE
CLEAR XQT 1 INSTR
STAA
EXONE
SWI3
JSR
PREGSI
~IAIN
GO TO MAIN LOOP
.IMP

=

•

*•••••••••
* 0 OR 0

DISPLAY ••••••••••
(ADR> OR 0 {ADR> 
• DISPLAY MEMORY - BLK OF MEMORY AROUND LAST
REFERENCED BYTE FROM MEM/EX
DISPLAY 16 BYTES AROUND (ADR) SPECIFIED
• OR DISPLAY FROM (ADR> TO  MOD 16
ASCII CHAR ~ILL BE PRINTED ON THE RIGHT
• MEM/EX PNTR WILL PNT TO LAST ADR REFERENCED
AT END OF DISPLAY COMMAND

*
*

*
*

11:

A DISPLY LOX

PNTR

SAVE MEMORY/EX PNTR

PAGE

0)

o

012tSA
@t217A
01218A
@I21SA
0122@A
01221A
01222A
01223A
01224A
01225A
0122SA
01227A
@1228A
01229A
0123@A
01231A
01232A
01233A
01234A
01235A
0123SA
01237A
01238A
0t239A
01240A
0124!A
01242A
0!243A
01244A
01245
01248
01247
01248A
01249A
01250A
01251A
01252A
01253A
01254A
01255A
01256A
0125714
@125BA

0&

LILBUG S80t DEBUG MONITOR

FD88 3C
FD8~ 8t
FD8B 27
FDBD 8D
FD8F 2F
FD9t DF
FD93 81
FOSS 2S
FDS7 DC
FOSS C4
FDSB 83
FDSE DD
FDA0 C3
FDA3 DD
FDA5 21l'
FDA7 38
FDA8 OF
FDA A 86
FDAC 39
FOAD 8D
FDAF 2F
FDBI DC
FOB3 C4
FDBS D7
FDB7 S3
FDBS 22
FDBB 98
FOED 84
FDBF 97

PSHX
@D
A
CMPA
@A FD~7
BEQ
SA FDE~
BSR
18 FDA?
BLE
D7
A
STK
0D
A
CMPA
18 FDAD
BNE
07
A SHOW35 LDD
F@
A
ANDB
0010 A
SUBD
D7
A
STD
0020 A
ADDD
D9
A
STD
lA FDCl
BRA
SHERR2 PULX
D7
A
STX
FF
A SHERR LOAA

VER 1.0

.fD
SHOW35
PVALlN
SI-lERR2
PNTR
#f.D
SHOW4
PNTR
"SFI
,,$10

***

CR7
NO ARG

DEFINE BLK TO DMP
MASK OUT LO~ DIGIT

TO ADR
RESET MEM/EX PNTR

PNTR
#!lFF

F:TS

*

C8

BD
311
DF
CS
8D
4F
39

CHKABT
**~~**~*~****~***
READ
NO WAIT

*
*
*

*

0128=,

FD07
FDDB
FDOA
FDDC
FDDE
FDEI
FDE2
FDE5

3S
C6
8D
84
81
26
BD
81

1l'2
A
78 FE54
7F
A
17
A
03 FDES
F8@S A
A
18

~ITH

*~**~***~******

CI-lK FOR CONTROL X - ESCAPE FROM PRINT
CHK FOR CONTROL W - WAIT DURING T OR D PRINT
ANY CHARACTER CONTINUES PRINT
ANY OTHER CHARACTER - READ & IGNORE
C4KABT PS4A
LC'AB
.CI.DTA READ A CHAR
8S~:
102
Al'WA
:ll:S7F
CLEAR PARITY
CMPA
CONTROL W?
"CNTLW
ENE
CHK2
IF SO WAIT FOR INPUT
.)SR
INCHNP
TO CONTINUE PRINT
CHK2
01PA
.CNTLX
CONTROL X"

A FVAlIN JMP

VALINP

SAVE BYTES

**************

HSDTA *~*******~*****
FROM ADR, TO ADR IN TRANSFER BLOCK
ADR ARE DIVISIBLE BY 18
ADR OF BLOCK ~HS IN REG X
X SAVED ON STK BY 10
HSDTA
TSX
GET TRANSFER PACKET
LDX
2,X
O",X
GET FROM ADR
LDD
PNTR
SAllE FOR DUMP
STD
2,X
LDD
GET TO ADR
STD
TEMPA
SHOWS JSR
PCRLF
LINE FEED
PRINT BLOCK HEADING
LOX
.SPACES PR LEADING BLANKS
JSR
PDATA
CLRA
PRTTl PSHA
CONIIERT TO DISPLAY
JSR
OUTHR
JSR
SPACE
SPACE
PR ;: SPACES
JSR
PULA
GET CNTR
INCA
CMPA
"S10
PR 0-F
BNE
PRTTL
FINISHED?
CHECK IF USER WANT TO TERMINT DISPLAY CMD
SHOWI0 BSR
CHKABT
BED
Si-lOW1S
RETURN IF CONTROL X
JSR
PCRLF
.. PNTR
GET ADR OF LINE
LDX
PRINT AOR
OUT4HS
JSR
PNTR
GET CONTENTS OF MEMORY
LDX
.16
CNTR FOR LINE
LDHB
SHOW12 JSR
OUT2HS
PR DATA
INCR ADR PNTR
INX
DEC!
LOOP
B~lE
SHOHI2
JSR
SPACE
PRINT ASCII DUMP
NUt1
CHAR/LINE
LDAB
"16
PNTR
LDX
121 .. ;(
SHOW14 LDAA
tog7F
ANDA
CHK PRINTABLE
(t1F'A
,,1120
SH<)IHS
NON-CHAR
BLT
.. 1161
CMPA
BLT
SHOI"I!!
SHOWIS LDAA
PR • FOR NON-CHAR
<

013Zf.!.A
01329A
01330A
0t331A

FE42
FE43
FE45
FE47

SA
26 EB FE30
DC OS
A
33 D7
A

[;
TST
BNE
BRA

_~.

VER 1.0

~~.

SHOW19
PNTR
PNTR+l

RETURN
SAllE FROM ADR

SHOI~10

END OF LINE
END OF BLOCK

SHNJ9

PAGE

027

.********* •• *••

• 10 CALL - TO SAVE A FEW BYTES
A 102
JMP
10

*.** ••• ** ••••••
*

01341

01394
01395

01342

01343A
01344A
01345A
01346A
01347A
01343
01349A
01350A
01351A
01352A
01353A
01354A
01355A
01356A

FE57
FE59
FE5B
FE5D
FE5F

81
27
8D
2F
DF

FESI
FES3
FES5
FEGB
FESA
FESC
FESE
FE?0

81
~~

BD
2F
81
27
86
311

01357A FE7t 39

01359
01360
01361
01362
01363
013S4

*****~*****

*
'"
*
*
*
*
*

013C5
1211387
0136.8

FE72 7F 00DG A
FE75 SD E0 FES7
FE77 ED

~B12

FE7A 86 10
0137SA FE?C 97 F6
01376A FE7E CS 12

0137 7 A

••• *

~EB0

A

A
~

A
3D D2 FE54

01378A FE8Z CE 00D6
01379A FE85 CG 14

A

A
FE87 8D CB FE 54
0D81A FE89 38
013~0A

01382A FE SA C6 16

A

01383A FESC 3D C6 FE54
01384A FE BE BD FD07

A

0138SA
013SSA
0t387A
01388A
01389A

A
A

FE9t
FE94
FESl7
FE9S
FE99

BD FDD7
7F 00FS
32

4D
39

** •••••••

PUNC~

FROM (ADRt, TO

**************.
~ADR2)

ERROR IF ; WI ADR OF TRANSFER PACKET
* JMP THRU 10 VECTOR TO BSOTA
PUNCH CLR
BBLk
SET BULK STR FCN
BSP
RD2ADR
READ 2 ADDRESSES
'" HEX STILL IN TEMPA (BBLK+31 - END ADR
PNCH4 JSR
PCRL~
* SET NO ECHO'FLAGI TAPE FLAG
LDAA
#110
# NULLS WIT APE CR
STAA
OUTSW
LDAB
#CBS.ON
TURN PUNCH ON
llSP
102
LDX
ADP OF BULK STORE BLK
"BBU':
LDAB
OFFSET TO SULK ROUTINE
""55.DTA

=

BSP

CS
D7
CE
DF
81

01
DS
0000
D9
0D

LOAD

**.

*•• **.** •••• *••

A LOAD
A LOAD2

LDAB
STAB

.. 1
BBLK

A

LD;-C:

.. 0

A

STX

BBLK+3

A

01404A FEA7 8D BC FEGS
01405A FEA9 20 CC FE77

INIT OFFSET=0

""_D

CMPA

BEG,
8SR
BRA

01403A ,"EA5 27 D0 FE77

LDAB

"BS.OFF

ES'F'

102'

JSR
JSR

CHI;
JSR
JMP

*****
•• ***
BSDTA TS;>;

01432

SAVE FOR RETURN CC
TURN OFF TAPE

01440'

CLEAR 10 BUF
DOUBLE BUF

0144:;;

TURN PR ON

SET RETURN PR

OFFSET

SET LOAD FCN =

8S0PF
.PUNOFF
PDATAt
DELAY

BSDTA

"'''''''*'''''''''10''''*'''****
TURN PUNCH OFF
OUTPUT STRG • RTN
WAIT FOR PRT SYNC

*."''''.*****

BULK STORE DATA
Z.X
GET 10 PACK VECTOR
LDAA
0.;>;
GET FCN
STAA
BBLK
USED BY VERF/LOAD
BEO
BSPUN
JUMP TO PUNCH. FCN=0
'" FALL THRU TO VERF-8BLK=-I. LOAD-BBLK=I
LD~

r02

F'::,HA

PULA
TSTA
RTS

FE9A
FE9C
FE9E
FEAl
FEA3

014-1.7

PUNC~

'" P < ADRI) 'ADR2 >

01388
013S9A
01 ~'70A
01371
01372A
01373
01374A

RD2AOR ••••••

READ (DEL 1M> < ADRI > < ADR2 >
00
A RD2ADR CMPA
.S0D
CR?
13 FE6E
BEQ
PNCHER
B5,R
8C FDE9
PVo';T ADR
04 FE6E
BLE
PNCHER
VALID ADR?
0D
A
CMPA
#SD
REQUIRE CR AFTER AOR
03 FE7t
BEQ
PNCRTN
FF
A PNCHER LD~A
.fFF
ERR RTN
PULX
REMOVE SUBR CALL ADR
PNCRTN RTS

01397

01398A
01399A
01400A
0140tA
01402A

VER 1.0

* L LOAD A TAPE FILE
* L  LOAD WITH AN OFFSET
* SET FUNCTION IN BULK STORE PACKET
* IF OFFSET - 3RD. 4TH WRDS OF PACKET
* LDX W/ ADR OF TRANSFER PACKET
* JMP THRU 10 VECTOR TO BSDTA

01392
1211393

0139£

01338
01339A FE54 7E FBDF

***

LILBUG 6801 DEBUG MONITOR

01391

01441
0144Z

VERIFY. LOAD
• GET OFFSET FROM 10 PACKET
• FIND 51 REC - DATA

'I'

a:

*
*

RE~~D

EYTE CNT

(TEMP)

01444
READ ADDRESS - SET REG X
01445
READ. STORE DATA. COMPUTE CHK SUM
01445
• COMPARE TAPE TO COMPUTED CKSUM
01447A FECC EC 03
A
LDD
3.X
GET OFFSET
PAGE 023
LrLBUG S801 DEBUG MONITOR *** VER 1.0 ***

01448A
0t449'"
01450A
01451A
01452A
01453A
01454A
01455A
01456A
@1457A
01458A
01459A
01460A
01461
01462
01463A
01464A
01465A
01466A
01487A
01468A
01469A
01470A
01471
01472A
01473A
01474A
0t475A
01476A
01477A
01478A
01479A
01480A
01481A
01482
01483
01484A
01485A
01486
01487A
11488A

FECE
FED0
FED3
FED5
FED7
FEDA
FEDC
FEDE
FEE0
FEEZ
FEES
FEE7
FEE9
FEEB
FEED
FEEE
FEF0
FEFI
FEF3
FEF4
FEF5
FEF6
FEF8
FEFB
FEFD
FF00
FF02
FF04
FF08
FF08
FF09
FF0B
FF0C
FF0E
FF10

DD
BD
81
26
BD
81
27
81
26
7F
80
C0
D7

D7
A
PNTR
STD
INCflNP
READ
F80S A LOAD3 JSR
53
A LOAD4 CMPA
GET 1ST GOOD REC
.'S
F9 FED0
LOAD3
BNE
F806 A
INCHNP
JSR
39
A
eMPA
.'9
32 FF10
BEQ
LOAD20
FINI AFTER 59
3t
A
CMPA
.'1
DATA REC
BNE
LOAD4
NO
Ft FED3
00D0 A
ClR
CKSUM
INIT CflECK SUM
2A FFll
BSR
BYTE
GET BYTE CNT
02
A
SUBB.2
DECR BYTE CNT FROM IT
DB
A
STAB
TEMP
STORAGE FOR BYTE CNT
_ READ 4 HEX DIGITS FROM INPUT
• FORM ADDRESS AND STORE IN REG X
8D 24 FFll
BSR
BYTE
1 BYTE
PSHB
SAVE 1ST BYTE
37
BYTE
2ND BYTE
80 21 FFll
BSR
32
PULA
GET 1 ST S'r'TE
D3 D7
A
ADDD
PNTR
ADD OFFSET
37
PSHB
MOllE A:B TO X
36
PSflA
38
PULX
SET REG X
ADR
• STORE DATA
e.n 19 FFt1 LOADtt BSR
BYTE
GET BYTE IN REG B
7A 000B A
DEC
TEMP
DEC BYTE CNT
END REC?
27 0E FF0B
BEQ
LOAD15
7D 0006 A
TST
BELK
SKIP STORE IF VERF
_'UST COMPARE
2B 02 FF04
BMI
LOAD12
E7 00
A
STAB
0,X
EI 00
A LOAOl2 (MFB
0,X
ERROR
26 08 FF0E
BNE
LOAD19
08
INX
20 EB FEF6
BRA
LOADII
_ CHECKSUMS GOOD?
• CKSUM IS ONE'S COMPLE
4C
LOAD15 INCA
CHKSUM ADDED INTO B
27 C2 FE00
BEQ
LOAD3
GET NEXT REC
~ CflECKSUM ERROR, VERF FAILURE, LOAD FAIL ERR
86 FF
A LOAD1S LDAA
.$FF
SET NEG FOR ER RTN
39
LOA020 RTS

=

01490
01491
01492
01493A
0149414
01495A
0149614
01497A

FFII
FFI2
FF15
FFI7
FFte.

0t498~~

FF19 SF

••

~.~~* BYTE ~~~~~_.~~~ ••• ~.
FORM A flEX BYTE FROM 2 DISPLAY BYTES
CALL INflEX TO READ
HEX DIGIT FROM INPUT
BYTE
CLRB
READ A-F AS HEX
iNHEX
A
JSR
A
LDAB
+16
LS8 IN REG 8
MUL
PSflB
SAllE
FLAG FOR INHEX
CLRB
,JSR
A
INHEX
~~~~~~.*

*
*

01499A FFIA

SF
BD FA3F
(6 10
3D
37
~D

01S'?l0H FF·1D 33
01Sf;!ltA FFtE

01 5'~2'" FFI F
0150314 FF21l
0150414 FF22
01505A FF24
PAGE 029

FA3F

FI)LE

GET 1 BYTE
ABA
SAllE IN B
TAB
16
A
98 00
AOOA
CKSUM
A
97 00
STAA
CKSUM
39
RTS
6801
DEBUG
MONITOR
•• ~ VER 1.0 •••
LILBUG

01507
01508
01509
01510
01511
01512
01513
01514
01515
01516A
01517A
01518A
01519A
01520
01521A
01522A
01523A
11524A
01525A
01528A
01527A
01528A
01529A
01530A
01531A
01532A
01533A
01534A
01535A
01536A
01537
01538A
01539A
01540A
01541
01542A
01543A
01544
01545A
01546A

MOVE FROM & TO ADDRESSES TO STORAGE
TEMPA - TO AOR
PNTR - FROM ADR
ilBLK - REUSED FOR FRAME CNT
TEMP - REUSED FOR BYTE CNT
PUNCH NULLS AS LEADER ON TAPE
• PUNCH CR/LF, NULL, SI(RECORO TYPE),
FRA~E COUNT, ADDRESS, DATA, CHECKSUM
• EOF RECORD - S9030000FC
BSPUN LOD
I,X
GET FROM ADR
srD
PNTR
LOD
3,X
GET TO AOR
STD
TEMPA
~ PUNCfl LEADER
LDAB
PNULL CLRA
OUTPUT NULL CHAR
JSR
DECB
PNULL
BNE
LOOP I~F NOT FINI
PUNll
LDD
TEMPA
SUBB
PNTR+1
TO ADR?
SBCA
FROM ADR
PNTR
BNE
PUN22
.24
CMPS
BCS
PUN23
SET FRAME CNT
PUN22 L-D~E
PUN23 ADDB
*4
STAB
BELK
51,)88
*3
TEMP
BYTE CNT TflIS REC
STAB
• PUNCfl CR/LF, NULLS,S,1
LDX
*tHAPE
PDATA
JS'"
CLRB
ZERO CflKSUM
~ PUNCfl FRAME CNT
LDX
*B8LK
BSR'
F'VNT2
PUNCH 2 flEX CflAR
PUNCfl ADDRESS
lOX
*PNTR

•
•
•
•

*

•
FFZ5
FF27
FF29
FF2B

EC
DO
EC
DO

01
D7
03
09

FF20
FF2F
FF30
FF33
FF34
FF36
FF38
FF3A
FF3C
FF3E
FF40
FF42
FF44
FF46
FF4S
FF4A

C6
4F
BD
5A
26
DC
00
92
28
Cl
25
C6
CB
07
C0
07

IS
F80S

A
A
A

A

A

F9 FF2F
D9
A
08
A
07
A
04 FF42
18
A
02 FF44
17
A
04
A
08
A
93
A
DB
A

FF4C CE FFA2
FF4F BD FB0E
FF52 5F

A
A

FF53 CE 00D6 A
FF56 80 29 FF81
FF58 CE 0007 A
FF5E 6D 24 FF8!

{;t547A FF5.i)

*

1~~3

BSR

FL'NT?

[Nt,

01548A FF5E 80 21 FF81

85'"

F'UNT2

LDX
B:5R
INX
DEC
ENE

PNTR
Pc'NT2

0'",,548

01550A
01551A
01552A
01553A
01554A
01555A
0'l556A

FF60
FF62
FF84
FFGS
FF88
FF8A
FF£C

DE D7
A
80 10 FF81 PUN32
08
714 00DB A
28 FB FF62
DF D7
A
53

01557A !='F8D 37
0155£:.A

FFGE

srx

TEMP
PUN32
PNTR

COI'18

F'SHB

30

TSY.:

01559A FF8F BD 10 FF81

BSP.

PUNT2

F:JLB

1B

01St:::tA FF72 DC 07
01582~~

FF74 9:"

1;!I15E:3A FF75

F'AGE

030

PUNCH IBYTE (2 FRAMES)
INCR X PNTR
DECR BYTE CNT

A

LDX
DE,':

PUNCH CflKSUM
RESTORE

PNTR

*_.

A
CPX
TEMPA
9C 09
LILBUG 6811 DEBUG MONITOR
VER 1.0 •• _

01564A
01565A
01S66A
01567A
01 SSSA
0151'9
0t570A
01571A

FF77
FF79
FF7C
FF7F

26 BD FF36
CE FFA5 A
BO FB0E A
4F
F1"80 39
FF81 EB 00
FF83 7E FAEt

BNE
LOX
JSR
CLRA
RTS
• PUNC~ 2 HEX
A PUNT2 A[-OB
A
JMP

PUN11
*M£OF
POATA

PLINCH EOF
CLEAR CC FOR RETURN

A
01588A
A
015891'1

A
CHAR, UPDATE CHKSUM

e,x

OUT2~

OUTPUT 2 HEX & RTN

01590A
A
01591A
A

01573
01574A FFS6
A FFS,7

A FF88
A FF89
A FFaA
0157514 FF8E

A FFac
01576A FF3D
'01577A FF8E

A
01578A
A
A

FF8F
FF90
FF91
FF92

A FF'93

A
A
A
A
A
A
015791'1
015801'1

FFB4
FF:35
FF96
FFB7
FF98
FF99
FFSA
FF9B

-A

FF9C

A FF90

ROM DATA ••••••• lIEUE
FeB
1110,1I3A,1I10,1I39,4 TURN ON PRT

• • • • • 1I0'OUOlf

10
3A
10

A PRTON
A
A

39

04
14

A

13

A

04
3F
04
4C
49
4C

A PUNOFF FCB
A

A OM ARK
A L1L
A

FF9E

43

A

F~9F

4f.

A
01581A
01582A
A
A
01583A
A
A

fFA0
FFAI
FFA2
FFA3
FFA4
FFA5
FFAS
FFA7

47

FCC

/ULBUG t .0/

A

A
A

FeB

4

A NOCHG

FCC

/1'10 CHG/

A

04

A

A MTAPE

31
~~ ..;.
53

A
A

A MEOF

FeB
FCB

4

EOF

FCC

ISB030000FC/

'5,' 1 .. 4

A
;,

A FFA9
A FFAA

30

A

30

A FFAB

30
3f'

A
A
A

48
43

A
A

FFAC
FFAO
FFAE
FFAF

.::e

FFEt.)

H FFE:::

FeB

50,4

FCC

lOP-I

~

FeB

4

A ARRAY

FCB
·P.l
ARRAY OF REG AND WRD LEN
MONITOR '"d!tllt IIER 1.0 .!llIt

A
A

,'PRTO]>

01585'" F"Bt
50
2D

A FFB3
04
01586A FFB4
50
01SB7A FFB5
PAGE 031
L1LBl'G

A

A

FCB

'X,1

A

A

FCB

A
A

FCB

A

A
A
A
A

FCB

'C,0

FCB

, S, 1

A SPACE6 FCC

/

/

6 SPACES FOR

S~OW

HEADER

A
A
A
A

FCB

134

4

.....**lIt.......

0t5~7

FFC8
Ff'CA
FFCC
FFCE
FF00
FFDZ
FFD4

FCEt
FCEI
FCEI
FCEI
FCEI
F821
F803

A
A
A
A
A
A

A

IIECTORS •••••••••••••••
• VECTOR INDEPENDENCE
• ALSO SAVE ON RAM USAGE
• IIECPTR - RAM PNTR TO VECTOR TABLE
• IIECTOR TABLE - ADR OF INTERRUPT VECTORS
• MAY BE REDEFINED BY USER TABLE IN SAME FORM
SERIAL FOB
DUMMY
NOT USED BY MONITOR
TIMOVF FOB
DUMMY
DUMM{
T I MOL'T FOB
TIMIN FOB
DUMMl'
IROI
FDB
OUt1Ml'
SWI
FOB
IN.S~I
NM I
FDB
IN.NMI
!IE DUMMY 15 AN Ril

A

'"

A FFAB

A
A
A
0t584A

01
58
01
41
00
42
00
43
00
53
01
Z0
Z0
20
20
20
20

01596
01598
01599
01600
01601
01802A
01603A
016041'1
011'05A
01606A
016071'1
01808A
01809

A

53

39

EOF
PR ?

f3F,4

A
A
A
A

H

4

FCB
FCB

A

55
47
2£
30
04
4E
4F
20

TAPE CONTROL

A

4-2

2:0
31

514,$13

01592A
A
01593A
A
A
A
A
A
01594A

FFB6
FFB7
FFS8
FFB9
FFBA
FFBB
FFBC
FFBO
FFEE
FFBF
FFC0
FFCI
FFC2
FFC3
FFC4
FFC5
FFC6
FFC7

PRT FOR TRACE LINE

A
A

68~10EBUG

01611A
01812
01613
01614
016151'1
01816",
01617A
01S18A
01619",
01620A
01 821 r~
01623
0'1624
01625
01626A
01627A
01628A
01629A
01830A
01631A
01632A

FFD6

FF06
FF07
FF08
FFDB
FFDD
FFDE
FFE'"

FFE2
FFE4
FFE6
FFE8
FFEA
FFEC
FFEE

01634
PAGE 032

32
33
83
DE
3A
EE
SE

3D
80
80
3D
80
80
80

FFE4
FE

A
A

00
00

A
A

F2
Fe
EE
EC
EA
E8
E6

FFD8
FFDS
FFD6
FF06
FFOS
FFD6
FF06

ORG
.FF06
• USE ADR ON STK TO OBTAIN INDEX
!IE USE INDEX TO GET CORRECT IIECTOR
•
ROUTINE AOR FROM IIECTOR TABLE.
VECTOR PULA
THROW AWl'll' MSB OF ADR
PULB
GET LSB
SUBO
.1.SER+2
LDX
VECPTR
ADR OF IIECTOR TABLE
ABX
ADD OFFSET
LOX
0.X
GET VECTOR ADR
JMP
0.X
GO T~RU VECTOR
• INTERRUPTS GO THRU VECTORS. THEN HERE
• BSR STORES AOR ON STACK
• ADR USED TO OBTAIN INDEX INT~ IIECTOR TABL
I.SER BSR
VECTOR
I.TOVF BSR
VECTOR
I.TOIIT BSR
VECTOR
I.TIN BSR
VECTOR
I.IROI BSR
IIECTOR
I.SWI
BSR
VECTOR
I.NMI
BSR
VECTOR

lIE lNTERRUPT VECTORS
LILBUG 6801 DEEUG MONITOR .lIt. IIER 1.0 •••

01635A
01636A
0t6;37A
01638A

FFF0
FFE2
FFE4
FFF2
FFF4
FFE6
FFE8
FFF6
01b3~A FFFB
FFEA
FFEC
01640A FFFA
01641A FFFC
FFEE
01642A FFFE
FalE
01643
F8F6
TOTAL ERRORS 00000

FCE9
FC!A
FFB5
FC56
00D6
FBE9
0~ES

FD7A
FEAD
FBBS
FEes
00F2
FB~8

FHD9
FBEB
0014
0016
0012
FEe3
FEBA
FEAF
FES7

A YECTR
A
A
A
A

FOB
FDB
FDB
FDB
FDB

I.SER
I. TOVF

r . TC·\iT
I. T IN

r. r ROt

A

FDB

I • S~Jl

A

FDB

r.tmr

~

FDB

STRT
START

A

ARMS04 01065 01087~
ARMSTK 00982 01032 01049 01054*
ARRAY
00783 01587*
BARMS
00~66 00~82~
BELK
000e3~00453 00511 01250 01347
01436 01475 01534 01S~2
BERRTN 00874 00884 00910*00915 00917
BKADR
0009S*~0368 00877 0089~ 00301
BKfERR 01189 01192 01198*
BP0Z
0086~ 00373~
BP04
00S78~00gS3
BP06
00879 00885*
ERKFLG 0009B~0t123 01141 01147 01170
ERKPNT 00147 00863*
BRKTAB 00875 00901*00~2B 01191
BRTN
00904 009tl~
BS.DTA 00207~01379
BS.OFF 00Z081e1382
BS.ON
00206*01376
PSDTA
00194 01433*
(1f?1 24 0142S~
rSOFF
BSON
00194 01421*
BSONZ 01423 014.25*

01369 01378 01399 01401

00929
00920 01125 01149

01188

01422

0008
000A
0006
F8A8
F8Dl
FBD2
F8D5
F8A7
FC58
00D0
FBFD
FC05
F8D8
FBEC
FD86
FBDB
FeEl
FD7A
FB00
00F5
F824
00FA
FeES
FC23
FC38

CO.DTA
CO.OFF
CO.ON
CODTA
COOFF
COON
COON2
CRTN
CRTS
CT
DBRK2
DBRK6
DELAY
DELBRK
DrSPLY
DLY
DUMMY
ENDCAL
EX.NMI
EXONE
FCT~S~

FCTPTR
GOX2
GOXS
GOX7

00201.00234
00202*
00200*00375
00192 90Z6~.
001~2 90299.
00192 00304*
00305*
00287*00276 00282
00557 00983*00597
00076*00077 00433 00436 00462 00789 00846 00848
Q10922JE00925

00919 00928",
00307*01430
00866 0087i 00314~
00!53 01215~
00308*00309
01079*91602 01803 01604 01605 01606
01000 01197*
001t2~01099

00'00*0e~S9 00~63 00981 01029 01~36 01048
0C14~~00361
00474
00104*00382 00454
008S3 00372 00909~00947 00949 00978 00980
00945 20852*
00954 00963*
00966~

FC3F GOX8

00964

Fett GOXQT
000E ~;.DT~
0010 ~S.OFF
000C HS.ON

0015S 00944*
00204*01251
00205*01255
00203*01248
00·133 :01285*

!="['EC

~SDYA

CALL
00F7 CALLF

01458 01463 01465 01472 01493.
00113 01013~
00150 00339.
00102~00371
00939 00953 00955

FbDl HSOFF
F8Dl HSON
FgFI HY
fFEA r.IRI)[
FFET r .Nt1I
FFE2 I.SER
FFEC 1.51J[
FFE8 l.TIN
FFE4 I .TOVF
FFE6 I.TOVT

FDES CHK2

01271 01273*

FCEA

IFPTM

FDD7
00D5
F85B
0002
0004
@000
F891
F89S

01641 01286*01305 01384 01385
00082*00272 00337
00191*00357
00198*00217 01267

FCF7
F803
F8Z1
FAS7
F873
F874
FS7G
F88S
F606
FE4D
FE6S
FB84
FS7S

[FPTH2
IN.NMI
IN.SWI
fN1HG
INCH1
INeH1S

01Q9G 01098*
00[13*00388 01G08
00123*01607
00593 00601*
00114 00218*
00217*00219 00221 00223
rNC~2
00218*
INC~4
00225 00227*
INCHNF 00114*00589 01272 0144~ 0145Z
[NDAT
00799 00~0~~
INDAT0 00813 00~25*
INDAT1 0082e 00838 00840*
rND~TZ 00814 00B33*

FE~.l

I NDAT4 fH.1036

FFZ5 E::.PUt~
FFll EYTE
Fe7S' C.~n1r
FC~F

CHKABT
CHRNL
CI
CI.DTA
CI .OFF
CI.ON
crDTA
eIDTAt

01437

~q5t6*

0019~*

001e7*
00191 00243*
00245 00249*

F89C CiDTA2 00247

00252~

F8DI crOFF
F8C& CION

00191 00296*
01;'291;t.(

(~0D0

00077.01457 01503 01594

00')9

CI~T
00D3

~~E~:TX

00851 00859*
00b2f;¥00r;42
')0640 ,'064::;*
00162 00618*
00425 00660*00692
01565 01583*
00440 00443 00481.00513
00619 00£24 00657 1210666.00684 00686 00742
00067*0'093
01025 01105*01183
01538 01582*
(~027'1
1210273*
00274. 00279.
00278 00281*00287
00~22 00970*0097£
00079.00455 00458 004S0 00475

f2t1 (;'08;;:
FFD4 NMI
FC95 NM[0t
01028 01033*
FC36 NMf015 01034*01042
PAGE
035
LILBUG 6801 DEBUG MONITOR •• ~ \lER 1.0 •••

FCSD
FCB7
FF,9B
FA37
00F3
0004
000B
FAC7
FACB
FAB4

NMI02
NMI03
NOCHG
NOTHEX
NTRACE
NUMBP
OCREG
OFF4
OFF8
OFFSET

01035 01040*
01031 01050.
00740 01580.
00577*005~1

005~5

005~7

005~~

00099.00979 010Z7 01034 01Z00
00095*000~6 00097 01126 01t3~
00060*01008
00681 00685*
00883 00887*
00165 00676~
0~EE OPCODE 00097.008B2 00907
FAEI OUT2H 00625 00698 00705 0071Z.80793
FADB OUT2HS 00118 00690 00705.00795 00837
FAD8 OUT4HS 0011~ 00662 00698*00839 00892
F89D OUTe
00261.00263 00285
F85E OUTCI
00262*00264
F80S DUTCH 00115.00412 00769 00855 01328
0022~

01150 01168

81571
01046 0131Z
01309
01425 01523

F8,~A

OUTCH1

00115

FE91
FAE9
FAED
00F6
0"DC
000\
FBI6
FEt2

OUTDA
OUTHL
OUTHR
OUTSW
O\lFL
P2DDR
PCR

~078b 00853*
0121714 012172121*
00716 00727*01237
00101.00224 00270 00409 01375 01386
00088*00541 00588

~·C:R!...F

00691 00757

FB0E
FB07
FB04
FE65
FE??
FESE
FE71
1107
FF2F
FBC9
FEDI

00233*

0~057*01074

0 f2'6512' 0121768*
00121 00410 00658 00688
00952 91291 01307 01372
PDATA
001t7 00378 0048! 00741
PDATAt 00118 00305 09750.00758
PDATA2 00748~00752
PNCH3 01351*01404
PNCH4
01372.01403 01405
PNCHER 01344 01346 11350 01352
PNCRTN 01354 01357.
PNTR
00084*01626 00855 00661
01232 01237 01239 01254
01334 01448 01487 01517
PNULL 01S22~0t525
PRBRK
00864 00876 09889.00926
PRBRK2 01892*008S5

FEe.e FREG5

C'oe.46:tt~'1

F888
FB7 j
FF86
FFE>.1
FE01
00F8
E000
FF36
FF4.2
FF44
FF62
FE72

00778 00845*@1202
008 t 3 "}Q816 0@829*12'0'8/34

PREGSt
PFi:ERR
PRTON
PRTOP
PRTTL
PTH
PTHADR
PUNll
PUN22
PUNZ3
FUN32
Ft)NCH

00763*0077~

00757.01044 01Z94 01539 01586
0142S

01355.
00683 008 S 01215 01ZZ1 01ZZ4 01ZZ7
01288 013 8 0131e 01318 01331 01333
0\527 015 8 11545 01550 01555 01581
09932

O(l--:

0l}304 01574*
01043 01585*
')1236*')1303
00103.00364 00395 01085
00069*00363
01526*01564
GH529

f2l1532~

01531 01533*
(2'1 55t *0t 554
0t~t

Be-

FF2.B

pur~OFF

0t42B

FF 8E

Glt1ARK

00481

00845 00889

01369~

01575*
FF81 F'l'tH2
01543 01546 01548 01551 01559 01570.
FC'E9 F'\lALl N 01219 01235 0127B~01345 01351
l:!11577;tE

FD15 RBRK
00339 01026 01123~01190
PAGE
')3E;
LfLEUG 6801 DEBUG MONITOR .~. \lER 1.0

~ ••

FolE
FoZA
F035
FE57
0012
FB22
FIl26
FB42
FB3D
FB4';
FBIE
FAE;3
01;)10

RBRK2

0112711E01140

RBR~:3

801133 0113511E
IH 124 01142*

RBRK6
RD2ADR
RECEV
REGSI
REGS2
REGS3
REGS4
REGS';
REGSTR
":ETRN

F9EB
F9F9
FFCE
FFCC
FFCA
FC46
FC4F

00676 O1343*01370
00064!H~0249

00780!f.:00e.47
00782lk00f.!!)3

00751(2- 12'0798*
00752 1219795*

0013
0(H 1
F:3FC

00797 0080l:f
00171 t-)077 e,:.:
00631

006'35

F9~A

00637 00667i1<00739

FA'l'S

(~(2'062;tE0033;:,

Rr1CR

SETB2
F054 SETB4
FD5E SETB6
Fe?t 5ETCLK
FCE2 SETPTM
FDAA SHERR
FoA7 SHERR2
FEll SHOI,Jt
FE::OZ SHOfl12
FE30 SHOt.-tt4
FE3C SHOW1;;
""E3E SHOW12,
FD3F

011S1:4"I2Il1G9

01153 011E:4*
(~q

160 f)1171;;:

811

O!!;'5*,~)1

FDE8 SHOI·H 9

01078

('114.'3.

01233*

0122'(" O1231*01236 01241

° Ie

0)
0)

(..)2!)

01070 01084*

13{~5*01335

(')1312-.01315
0131Bt;0'l329

01325*
01324 0132E.*

0-1322
i~H

27S!«(!.i13GH; 01332

F097 SHOI,J35 01218 01224*
FDAD SHOl·J4 0t223 01235*
FC'C1 SHNI8 01230 01248*
0129-1¥0133G
~DF7 SHOW9
FADD SPACE 0012'i 00708*01298 01299 01316
FFCI SPACE6 (HZ93 01593*
12'1~E4 SPSAVE 0')1)94*00366 12'12'956 00961 12'0993 01054 12'1116
00435 00453*
F29B SF:CH
FSA1 SRCH0-! 0045GiIl00477 00'498
F9B9 SRCHI)2 01M72 ')0476*
F9C5 SRCH03 00463 0048iH(
F9C9 SRCH04 00490*00503
F9D7 SF:CH05 O0496 005!~0)11;
00CF STACK
00074*00356 00385 00367 00408 00994 01024
0(~t 22 00356*01643
F8,F6 sTART
FAF7 STRCHK 12'0634 00737*01157
F81E STRT
0t~122.01 S42
0001 STRTX (!}0(.)78lt0{~432 00488 00509
FF02 SWI
O1607*
(~tt95 @1201*
FD7E SI·H3
0()902*0090S
FE:DC TABI
0(112159*0121390
01019 12'1075 0112'77
0121'2113. TCSR
';;01)8 TEMF'
'2100'88*00580 00573 00581 00687 00689 01460
0(.)D8 TEMPA
00';)85*00489 00494 00501 00559 00561 012'5812'
00820 00825 00885 00912'2 12'1045 01067 01187
91244 01290 01330 01519 91526 01563
PAGE 037
LILBUG 6801 DEBUG MONITOR 110'* VER 1.0 1,,**

01182

01473 01536 01553
12'0620 00633 00677
12'1229 01240 12'1242

00434 00523l1<00815
00524 0052G 020252:>
TIMIN 011:;O5*
TIMOUT 12'1604*
TERI~02

T I~1t)VF (.)1603lJ.

TRACE
TRACE2
TRANS
TRCS
liALIN
VALINP
VALF:TN
IIECPTR
IIECTOR:
VECTR.

00180

00975W

00971

~0979*

12>00G5!W021:;5
0012'E.3:t:l)0243 001'62 001'94
1Z,1~4t 7
r2'053e.*
(~I)S37:f(~061

e·

00e67 00914 00946 01278

00538 00544*

01097 1:.1618
F"FDG
0"1 £1 5~~·~ G2G e· ~ 627 01823 01S29 01830 01631 01632
FFF0
1)1 OS::: 0"1835*
('{~; t :;.:3
('1,+14*
FEAB VER~
FBUJ ;o\Ot)TC~ 007i)7" i}Q73? OC0748
FB95 ZOUTCH {)I)BS:i 00e.S5*

00FE

00174 00336*
F2.E9 5120
F8.EC 51205
00292 121121337*00345
1~0DD SAVSTK 000S-9*(~0330 00?;?QI 12'0951
012'991 00995 00996 00998 0112'55 01057
liH059 010E." 010E.6 01106 12'1112'8 01109 01111 01113 01184 01186
FFCa SERIAL 003~9 01 £.(\2*
F036 SETB
009GS 0103121 01147*

TERM

()Qit

0S*Q1036 1)

®

MOTOROLA Semiconductor Products Inc.
3501 ED BLUESTEIN BLVD., AUSTIN, TEXAS 78721 • A SUBSIDIARY OF MOTOROLA INC.

12007-1

PRINTED IN USA

8/80

IMPERIAL LITHO 888625



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37
Create Date                     : 2011:01:15 17:49:08-08:00
Modify Date                     : 2011:01:15 21:25:42-08:00
Metadata Date                   : 2011:01:15 21:25:42-08:00
Producer                        : Adobe Acrobat 9.4 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:f74c2d99-a79e-44c9-b49a-3fbec0cc1501
Instance ID                     : uuid:8dc0326a-3c9d-4dab-8e3b-90e6bcc1e844
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 71
EXIF Metadata provided by EXIF.tools

Navigation menu