Digital PDFs
Documents
Guest
Register
Log In
EK-DCTEM-UG-1
September 1983
222 pages
Original
5.3MB
view
download
Document:
DCT11-EM Evaluation Module User's Guide
Order Number:
EK-DCTEM-UG
Revision:
1
Pages:
222
Original Filename:
EK-DCTEM-UG-001_DCT-EM_Users_Guide_Sep1983.pdf
OCR Text
EK-DCTEM-UG-001 DCTl 1-EM Evaluation Module User's Guide mamaama EK-DCTEM-UG-00 l DCTl 1-EM Evaluation Module User's Guide Prepared by Educational Services of Digital Equipment Corporation !st Edition, September 1983 <D Digital Equipment Corporation 1983. All Rights Reserved. Printed in U.S.A. The material in this manual is for informational purposes and is subject to change without notice. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this manual. The manuscript for this book was created on a DIGITAL Word Processing System and, via a translation program, was automatically typeset on DIGITAL's DECset Integrated Publishing System. Book production was done by Educational Services Development and Publishing in Marlboro, MA. The following are trademarks of Digital Equipment Corporation: mo~oomo MASSBUS DEC PDP DECmate P/OS DECsystem- I 0 Professional DECSYSTEM-20 Rainbow RSTS DEC US DECwriter RSX DIBOL TOPS-JO TOPS-20 UNIBUS VAX VMS VT Work Processor CONTENTS Page PREFACE CHAPTER I OVERVIEW II 1.2 INTRODUCTION...... .. ............................................................................... 1-1 THE DCTl 1-EM AT A GLANCE ....................................................................... 1-1 CHAPTER 2 INST ALLA TI01' ~.I ' , INTRODUCTION....... .. ................................................................................. 2-1 POWER SUPPLY REQUIREMENTS .................................................................... 2-1 CONSTRUCTING A POWER SUPPLY CABLE ................................................. 2-1 POWERING UP AND VERIFYING CORRECT OPERATION ........................ 2-3 .JGMPERl!';G ............................................................................................................. 2-4 CHAPTER 3 KEYPAD OPERATION 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.8.1 3.8.2 3.8.3 3.9 3.10 3.11 3.12 3.12.1 3.12.2 3.12.3 3.12.4 3.12.5 3.13 INTRODUCTION ................................................................................................... 3-1 NUMBER SYSTEM .............................................................................................. 3-2 EXAMINING REGISTERS .................................................................................... 3-2 AL TERI NG REGISTERS ........................................................................................ 3-4 EXAMINING MEMORY LOCATIONS ................................................................ 3-7 ALTERING ME.\10RY LOCATIONS ........................................................... 3-10 ENTERING AND EXECCTING A SIMPLE PROGRAM ............................... 3-12 WORKING WITH A LONGER PROGRAM ...................................................... 3-16 Using the Single-Step Function ........................................................................ 3-17 Using Breakpoints............................................................... .. ..... 3-19 Using the Watchpoint ...................................................................................... 3-22 USING THE HALT SWITCH ............................................................................... 3-24 THE INT SWITCH ................................................................................................. 3-25 THE GSER LED ..................................................................................................... 3-25 PERFORMING KEYPAD SPECIAL FUNCTIONS ........................................... 3-26 Function 0 - Cancel Breakpoints ..................................................................... 3-27 Function 1 - Go With LEDs ........................................................................... 3-27 Function 2 - Start Console ............................................................................. 3-28 Function 3 - Set Baud Rates .......................................................................... 3-28 Function 4 - Release Protection ...................................................................... 3-30 KEYPAD COMMAND SUMMARY ................................................................... 3-32 CHAPTER 4 CONSOLE OPERATION 4.1 4.2 INTRODUCTION ........................................................................................... 4-1 TRANSFERRING CONTROL BETWEE'\i THE CONSOLE TERMINAL AND THE KEYPAD ................................................................................................ 4-2 CONTENTS (Cont) 4.8.1 4.8.2 4.9 4.10 4.11 4.12 4.13 4.13.1 4.13.2 4.14 4.14.1 4.14.2 4.14.3 4.15 4.16 4.17 4.17.1 4.17.2 4.17.3 4.17.4 4.17.5 4.17.6 4.18 4.19 GE~ERAL RULES FOR CO'.\ISOLE INPUT ....................................................... 4-2 CONSOLE CONTROL COM\1ANDS ................................................................... 4-3 EXPRESSIONS ......................................................................................................... 4-3 EXAMINING REGISTERS .................................................................................. 4-5 ALTERI NG REGISTERS .................................................................................. 4-5 EXAMINING AND ALTERING MEMORY LOCATIONS INTRODUCTORY CONCEPTS ............................................................................. 4-5 The Address Pointer ........................................................................................ 4-6 Output Formatting Modes ................................................................................. 4-6 EXAMINING MEMORY LOCATIONS ............................................................. 4-7 ALTERING \1EMOR Y LOCA TIOJ\'S ................................................................. 4-10 INSTRUCTION FORMAT......................... . ..................................................... 4-11 TYPING 11\' A PROGRAM........................ .. ..................................................... 4-12 USING SYMBOLS .................................................................................................. 4-13 Symbol Names ................................................................................................. 4-13 Commands That Define and Manipulate Symbols .......................................... 4-14 EXECUTIJ\'G A ND DEBLGGING PROGRAMS ............................................... 4-15 Using the Watchpoint.. ................................................................................. 4-16 Using the Single-Step Function................... . ................................................ 4-17 Using Breakpoints. .. .......................................................................... 4-19 DCTl I-EM DIRECTIVES...... ................... . .............................................. 4-20 MISCELLANEOUS CONSOLE FUNCTIONS ................................................... 4-21 LOADING THE DCTl I-EM FROM A HOST COMPUTER ............................. 4-22 Configuring the DCTl I-EM for Host Loading ............................................... 4-22 The HOST Command.. . .. ........................................................................ 4-23 The TALK Command .................................................................................... 4-23 The LOAD Command.... . .................................................................... 4-24 Preparing DCTI I-EM Loadable Programs on a Host.. .................................. 4-25 An Illustration of the Host Loading Process ................................................... 4-28 CONSOLE COMMA ND SUMMARY............. .. ................................................ 4-29 CONTROL COMMAJ\'D SUMMARY ................................................................ 4-32 CHAPTER 5 SOFTWARE 5.1 5.2 5.2.1 5.3 5.3.1 5.3.1.1 5.3.1.2 5.3.2 5.3.2.1 5.3.2.2 5.4 5.4.1 5.4.2 5.4.3 5.4.4 INTRODUCTION ............................................................................. .. ................. 5-1 THE MONITOR ..................................................................................................... 5-1 The Stack Pointer .............................................................................................. 5-2 MONITOR SUBROUTINES .................................................................................... 5-2 Keypad/LED Subroutines .................................................................................. 5-2 Using the LEDs and Keypad ..................................................................... 5-4 Using Keypad/LED Subroutines - Example Programs .......................... 5-5 Console Subroutines ........................................................................................... 5-8 Console Character \1anipulation ............................................................ 5-10 Using Console Subroutines - Sample Program ....................................... 5-10 DCT 1 I -EM ADDRESS SPACE ..............................................................................5-13 Standard RAM Space.............. .. .................................................................. 5-15 Expansion RAM Space.... .. ................................................................... 5-15 Monitor Space .................................................................................................. 5-15 1/0 Space.................................... .. ................................................................. 5-1 5 Space Available for External Hardware .......................................................... 5-16 Reserved Space ................................................................................................ 5-1 6 4.3 4.4 4.5 4.6 4.7 4.8 5.4.5 5.4.6 !V CONTENTS (Cont) CH.\PTER 6 HARDWARE t-, t>.14 t>.15 t>.16 b.17 INTRODUCTION ..................................................................................................... 6-1 DCTJ l-AA MJCROPROCESSOR ........................................................................... 6-3 RAM ........................................................................................................................... 6-3 MONITOR EPROM ................................................................................................. 6-4 PERIPHERAL CHIPS AND DRIVERS ................................................................. 6-4 Parallel Port (8255A) ......................................................................................... 6-4 DLART Console Serial Line .............................................................................. 6-5 Auxiliary Serial Line ( 8251 A) ........................................................................... 6-5 INTERNAL DATA BUS BUFFER ......................................................................... 6-5 USER BUFFERS ..................................................................................................... 6-5 PROCESSOR CYCLE DECODING ........................................................................ 6-5 ADDRESS LATCHING AND RANGE DECODil\G ........................................... 6-5 PERIPHERAL CHIP ADDRESS DECODING .................................................... 6-6 INTERRUPTS AND TRAPS .................................................................................. 6-6 TIMING ..................................................................................................................... 6-7 MISCELLAl\EOUS CONTROL LOGIC ................................................................ 6-7 KEYPAD/LEDS ........................................................................................................ 6-7 HALT AND INT SWITCHES ................................................................................. 6-7 CONNECTORS ......................................................................................................... 6-8 HARDWARE EXPANSION - EXAMPLE ......................................................... 6-11 APPENDIX A MONITOR LISTING .\PPEl'iDIX B SCHEMATIC DRAWINGS APPENDIX C ERROR MESSAGES ti.~ to ~ t- ~ t- 5 t- 51 t- 5.2 t- 5 3 t-6 t- ~ ~ t- 9 t- 10 6 II t- 12 6 13 FIGURES Figure No. 2-1 2-2 2-3 2-4 3-1 4-1 4-2 5-1 5-2 5-3 5-4 6-1 6-2 6-3 6-4 Title Page Attaching Pin to Wire.................................................................... ....................... 2-1 Inserting Pin into Connector ...................................................................................... 2-2 Power Supply Connector Pin Assignments ................................................................ 2-2 Power Supply Connector ............................................................................................ 2-3 DCTI I-EM Keypad, Switches, and Displays ............................................................ 3-1 Connecting a Console Terminal to the DCTI I-EM .................................................. 4-1 Connecting a Host Computer to the DCTI I-EM ................................................... 4-22 LED Segment Assignments ........................................................................................ 5-4 SEGBUF Assignments ............................................................................................... 5-4 DCT I I -EM Memory Map ....................................................................................... 5-14 Map of 1/0 Space .................................................................................................5-16 DCTI I-EM System Block Diagram .......................................................................... 6-2 Address Range Decoding .......................................................................................... 6-6 60-Pin Connector Pin Assignments .......................................................................... 6-11 16 KB Memory Module .......................................................................................... 6-12 v TABLES Table No. 4-1 4-2 6-1 6-2 6-3 C-1 Title Page Control Command Summary. ............... .. . ............... .... 4-3 DCTI I-EM Directives.................. .. ......................................................... 4-21 Reserved 1/0 Locations for Peripheral Chips................ .. ......... 6-4 Interrupt Vector Locations.................................................. . ............................. 6-7 DCT I I-EM Connector Pin Assignments............... ..................... .. ..................... 6-8 Console Messages... ............. ............. ... ............. ................... .................. C-3 vi PREFACE This book explains how to use the DCTI I-EM evaluation module. Although the book presents many topics in simplified form, some technical background is assumed on your part. It is assumed, for example, that you are familiar with the basics of microprocessor software and hardware. However, you need not be familiar with microprocessors manufactured by Digital Equipment Corporation. To understand software details such as those contained in the monitor listing (Appendix A), you should be familiar with the MACRO-I I language. To understand hardware details, you should be able to read and interpret schematic diagrams and data sheets. The book is organized as follows. Chapter I is an introduction to the DCTI I-EM and contains a specification summary for your reference. Chapter 2 explains how to install and power up your DCTI I-EM. Chapter 3 shows you how to operate your DCTI I-EM using the on-board keypad and switches. Chapter 4 shows you how to operate your DCTI I -EM using a console terminal. Chapter 5 provides software information and describes the use of monitor subroutines. Chapter 6 gives an overview of the DCTl I-EM hardware and contains information you will find useful if you plan to design external circuitry. Appendices A and B contain the DCTI I-EM monitor listing and schematics, respectively. Appendix C contains a summary of error messages. You will find that this book requires a high degree of interaction between you and the DCTl l-EM. Chapters 3 and 4, in particular, are structured so that examples are an integral part of the text. vii CHAPTER 1 OVERVIEW I.I INTRODUCTION The OCT! I-EM is a standalone, single-board computer. It is designed as a tool to introduce you to the OCT I I-AA microprocessor CPU chip and the PDP- I I architecture. It contains supporting hardware and software which greatly simplify the task of evaluating the DCTI I-AA for your application. The OCT! I-EM gives you considerable flexibility in designing your own software and hardware. You can write programs to run on the DCTl 1-EM which are substantially.the same as those written in the versatile PDP-I I assembly language. You can also design your own hardware interfaces to use with the DCTI 1EM. In fact, your hardware can connect directly to the DCTl 1-EM's internal data paths through an onboard, 60-pin male connector. This chapter summarizes the features of the DCTl 1-EM. You will find more detail in the chapters that follow. 1.2 THE DCTll-EM AT A GLANCE Central Processor • • OCTl 1-AA microprocessor 133 ns cycle time (standard) Memory • • 4 K bytes of RAM, expandable to 8 K bytes 16 K bytes of EPROM which contains the DCTI I-EM monitor Input/Output • • • Two serial ports, one for a console terminal and the other for an auxiliary RS232-C device One 8-bit parallel port One 60-pin connector for use by expansion hardware; allows access to DCT I I-EM internal data paths Host Communication • • • Host computer can be connected to the auxiliary serial port for downline loading of programs Character format is asynchronous, 8 bits, ASCII, no parity, one stop bit Available baud rates are: 300, 600, 1200, 2400, 4800, 9600, 19200 Software • • • Software is EPROM resident Keypad monitor for performing operations with the on-board keypad Console monitor for performing operations with a console terminal and with a host computer 1-1 On-Board Control Hardware • • 20-key keypad ( 4 x 5 array) HALT push-button switch On-Board Displays • • Two rows of 6-digit octal LEDs User LED Interrupts • • Four levels of interrupt priorities On-board interrupt push-button switch Diagnostics • Contained in EPROM, automatically run at power-up time Documentation (provided with DCTll-EM) • • • DCTI /-EM User's Guide DCT//-AA (MJCRO/T-11) User's Guide DC3f9-AA DLART Data Sheet Physical • • • • Width: 20.3 cm (8 in) Length (including connectors): 27.9 cm (l l in) Height: 3.8 cm (l.5 in) Weight: 450 gm (l 5 oz) Environment • • • • Noncaustic environment required Operating temperature: 10 to 40 degrees C Relative humidity: 10% to 90% (noncondensing) Altitude: Up to 2.4 km (8000 ft) DC Power Requirements • For keypad operation only: +5 V (±5%) ®· 2 A • For console terminal operation: +5 V (±5%) ® 2 A +12 V (±10%) ® 50 mA -12 V (±10%) ® 50 mA 1-2 CHAPTER2 INSTALLATION 2.1 INTRODUCTION DCTl 1-EM installation consists of attaching a power supply, powering up, and verifying that the board is operating properly. 2.2 POWER SUPPLY REQUIREMENTS The DCTI I-EM requires a +5 Vdc supply (±5%) capable of delivering up to 2 A. If you plan to use the console or auxiliary serial ports, you also need a +12 Vdc supply (±10%) and a -12 Vdc supply (±10%) each capable of delivering up to 50 mA. WARNING To protect yourself against injury from contact with circuits that carry high energy, we suggest your power supply outputs be limited to no more than 240 VA. This is in accordance with standards for data processing equipment. CAUTION We recommend that you fuse your power supply outputs at 5 A or less to provide overcurrent protection to circuits and remote wiring. 2.3 CONSTRUCTING A POWER SUPPLY CABLE The DCTI I-EM is packaged with a power supply connector and pins with which you can assemble a power supply cable. To do this, perform the following steps. I. Select a I foot length of medium gauge (IO to 14 gauge) wire and strip the wire about 1/4 inch from each end. If you are using multiple-strand wire, twist the strands together at each stripped end. 2. Insert one end of the wire into a pin as shown in Figure 2-1. Crimp the pin to the wire with a pair of pliers or a crimping tool and solder the wire. ( I WJHE = : PIN /I lRIMPPIN HERE THEN SOLDER WIRE Figure 2-1 Attaching Pin to Wire 2-1 3. Insert the pin in the connector as shown in Figure 2-2. MR 10342 Figure 2~2 Inserting Pin into Connector 4. Repeat steps I, 2, and 3 for each wire in your connector. (Use different colored wires for easy identification.) 5. Attach the wires to a power supply, making sure they correspond to the correct voltages as shown in Figure 2-3. KEY M>< 10:l43 Figure 2·3 Power Supply Connector Pin Assig111nents 6. Turn on the power supply and use a voltmeter to check that the correct voltages appear at the connector pins. 7. Turn off the power supply and attach the connector to the DCTl I-EM as shown in Figure 2-4. 2-2 POWER SUPPLY INSERT 0 POWER SUPPLY CABLE CJTTTl~ DODOO CIIIJ DODOO 00000 CD DOD DCT11-EM M~ Figure 2-4 !0144 Power Supply Connector You are now ready to power up your DCT! I-EM. 2.4 POWERING UP AND VERIFYING CORRECT OPERATION Make sure your DCTI I-EM is on a nonmetallic surface and positioned so that it does not come in contact with any conducting objects. Then turn on your power supply. When you apply power, the DCTI I-EM runs its diagnostics automatically. The diagnostics: (I) perform checksum tests for the on-board RAM and PROM, and (2) write and read back data to and from the DLART. If the diagnostics run successfully, the LEDs display the following. This shows that the keypad monitor is active and ready to accept your input. Further information on using the keypad is given in Chapter 3. In addition to activating the keypad monitor, the DCTI I-EM also sets these initial conditions: • • • • All user RAM is cleared The symbol table is cleared The stack pointer is set to 7400 Both serial port baud rates are set to 9600. You will learn more about what these initial conditions mean in later chapters. 2-3 If the two rows of LEDs are blank after you power up, your DCTI I-EM probably has major problems. The LEDs may display a flashing diagnostic error message after you power up. The meaning of the error messages is summarized below. UPPER DISPLAY LOWER LJISPLAY I I I,I I I I I I I·I' I I·I II I I I II I IEl'l'l l'I 2 MEANING 0 0 I I I,I I I I I IEI·I I I·I I I I I I I I I·I·I I·I 2 1 E ROM checksum test failed_ Try replacing ROM chips. 0 RAM and ROM checksum tests failed Board may have major problems. 0 DLART feedback tesl failed. Board may !lave major problems. i 3 1 RAM checksum test failed_ Try replacing RAM chips. E If you suspect your board has major problems, contact Digital Equipment Corporation or the authorized distributor from whom you purchased your DCTl 1-EM. The DCTI I-EM is warranted against defects in workmanship for a period of ninety (90) days from the date of delivery. 2.5 JUMPERING There are two metal posts located above the upper left corner of the DCTI I-EM keypad. Install a jumper between these posts if you want to disable the generation of OCT! I-AA microprocessor cycle slips. If you do this, you must also change the OCT! 1-AA's 7.5 MHz clock frequency to a frequency between 3 MHz and 6 MHz. To change the clock frequency, remove the 7.5 MHz crystal from the board and install a crystal of the desired frequency. This is the only jumper that may be installed on the DCTI I-EM. 2-4 CHAPTER3 KEYPAD OPERATION 3.1 INTRODUCTION This chapter explains how to operate the DCTll-EM using the DCTll-EM's on-board keypad and switches. When you complete this chapter, you will be able to do the following. • • • • • • Examine and alter the contents of registers in the DCTl I-AA register file. Examine and alter the contents of memory locations. Enter and execute programs. Debug your programs through the use of single steps, breakpoints, and watchpoints. Perform halts and interrupts. Perform a number of other functions. The DCTI I-EM keypad, switches, and displays are arranged as shown in Figure 3-1. ~ LED DIGITS (UPPER ROW) _\J -, ' KEYPAD HALT SWITCH LED DIGITS I _INT SWllCH \ (LOWER ROW) H A L T l PC PS SP D B B 8 D D B B B G B B B [] D I • N T -=- -=- 000 000 WP D 8 GJ B B PROTEC 0LED~~ D _J GO LED CONSOL BAUD CANCEL ENTER '---- """ 1034~ Figure 3-1 DCTI I-EM Keypad. Switch<:>, and Displays 3-1 Figure 3- l shows two rows of six LED digits which display data, addresses, and other information. Below the two rows of LED digits is a single LED (called the user LED) which you can use as an indicator in your programs. To the right of the LEDs are the HALT and INT push-button switches. These switches perform the functions their names imply; that is, they can halt and interrupt DCTI I-EM operation. To the extreme right is a 4 X 5 array of switches called the keypad. The keypad is used to enter commands, instructions, and other information to the DCTI I-EM. Pressing keys will generally cause responses to appear on the LED displays. 3.2 NUMBER SYSTEM Information that is input or output via the keypad/LED combination must be represented in octal notation. Since the DCTI I-AA is a 16-bit processor, the acceptable range of octal inputs and outputs is 000000 through 177777. 3.3 EXAMINING REGISTERS To examine the contents of a DCTI I-AA internal register, you must first place the OCT! I-EM in register mode. Do this by pressing the REG key. The LEDs display: I I I·IE IGI I I I I I I 11 Now you may examine a register by pressing any of the following keys: 0 through 9 or CLR, which is equivalent to key 0. In general, the name of the register being examined appears on the upper row of LEDs, and the contents of the register appears on the lower row of LEDs. The exception to this is when the watchpoint (WP) is examined. In that case, an address called the watchpoint (WP) address is displayed on the upper row of LEDs, and the WP contents are displ,ayed on the lower row. Keys 0 through 7 select RO through R7, the eight registers in the OCT! I-AA register file. Registers 6 and 7 are dedicated and are referred to as the stack pointer (SP) and program counter (PC), respectively. Key 8 selects the processor status (PS) word. Only the lower 8 bits of the PS word are meaningful. The PS word contains the current processor priority, the processor condition codes (N, Z, V, and C), and the T-bit. Key 9 selects the watchpoint (WP). The WP is useful in connection with program debugging and is discussed in Paragraph 3.8.3. 3-2 NOTE If you have just powered up your DCTil-EM or if you ha"e halted its operation, it is not necessary to press the REG key to get into register mode. The upper row of LEDs will display: The lower row of LEDs will display the current value of the PC, and you can simply press one of the keys 0 through 9 or CLR to select a register. Examining Registers - Example 1 You want to examine the contents of various registers. It is assumed that the registers still contain their initial (power-up) values. UPPER LOWER KEY DISPLAY DISPLAY IREGI I I I 'IE I 11 IIIII G I I I, I I 11 lololololo[ol [] I 11 ple I I I l l l l l lI GJ I 11 sIpl I I l l l•ls1olol lcLRI I I I ,I I I I l l l li lI 0 I I IpIs I I I l l l l l lI 0 l l l ll l I G 0 0 0 0 0 0 0 0 0 0 0 0 COMMENTS Get mto register mode 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Jolololololol The ADV and BAC keys allow you to examine register contents sequentially. Pressing the ADV key allows you to examine registers in ascending order. You cannot advance beyond the WP. Pressing the l'iAC key allows you to examine registers in descending order. You cannot back up beyond RO. If you want to examine registers nonsequentially after you have pressed ADV or BAC, you must first press the REG key to reinitialize register mode. Otherwise, you will alter the contents of the register you arc currently examining. 3-3 Examining Registers - Example 2 You want to examine more registers. You begin by examining them sequentially. It is assumed that the registers still contain their initial (power-up) values. KEY UPPER DISPLAY LOWER DISPLAY COMMENTS I IIIIII Get into register mode. loJolololoJoJ /olololololo/ You warned to examine R4 but you altered RO instead. Jololo/oJol o/ I IIIIII Clear the incorrect entry. This is how to examine A4 Now you're sequentially examining again. 3.4 ALTERING REGISTERS To alter the contents of a DCTI I-AA internal register, you must first examine the register as described in Paragraph 3.3. To review, this means you must place the DCTl l-EM in register mode by pre~sing the REG key and examine the desired register by pressing one of the keys 0 through 9. Once you have done this, press the EXA key and alter the contents of the selected register by pressing keys 0 through 7 in the desired order. 3-4 The previous contents of the register will be cleared and you will see the new contents being shifted in from the right side of the lower row of LEDs as you press keys. If you wish to clear the contents of a register, press the CLR key after you have pressed the EXA key. Pressing the CLR key also clears a register while you are entering data. Altering Registers - Example 1 You want to set register R3 to 000232 and the SP to 6000. It is assumed that the registers still contain their initial (power-up) values. UPPER KEY LOWER DISPLAY DISPLAY COMMENTS II I I I I I IREGI I I I · IE IGI I 0 I I· I I I· I [olo[oio1olol B [] I 3 1 1 I i I· 1 0 I I I· 1 0 I lcLRI IRea] I I I I lolololololol 1 I I lolo[of olol2I 1 I I l l l l 1 11 3 1 1 3 3 3 I · 1 0 0 0 0 1 0 0 2 3 2 lolololololol 11 l l i1i•l 0 l 0 I 0 I I Is I· I I I B I I Is I· I I jo[ol1l•lolol 0 I G I I Is I· i I I 0 0 I I· I l l l l l lsl Is I I Ente1 232 23 l I I I I· I' I I I I· IE IGI I I I I l I I E1::amine R3 llllllI 0 11 Get into register mode 0 0 0 0 0 l l l l l•l I 0 0 0 0 0 3-5 You change your mind. and clear R3 instead Get back into register mode to change another register. Examine R6 !the SP). It currently= 7400. Set SP = 6000. The ADV and BAC keys allow you to alter register contents sequentially. Pressing the ADV key allows you to alter registers in ascending order. You cannot advance beyond the WP. Pressing the BAC key allows you to alter registers in descending order. You cannot back up beyond RO. Press the ADV or BAC keys until you arrive at the register you want to alter, then press the desired sequence of keys 0 through 7 to enter the data. If you want to clear the register, press CLR. If you want to alter registers nonsequentially after you have pressed the ADV or BAC keys, you must first press the REG key to reinitialize register mode. Then press 0 through 9 to select the desired register, followed by EXA, followed by the data you wish to enter. It is generally easier to stay in sequential mode and step forward or backward to the desired register than to perform nonsequential alterations. Altering Registers - Example 2 You have just completed example KEY and now want to sequentially change some registers. LOWER UPPER DISPLAY COMMENTS D\SPtAY lsAcl I I I ·I· I I I l l l l l l I 8 0 I I I·I·I I I jojoioioiol•I 0 0 0 0 0 0 leAc! I I I·I·I 11 l l l l l•l I I I I ·I· I 11 l l l l l l I jsAc! I I I· 1 1 11 lolololololol D I I I· 1 1 I I lololololol1l I I I·I·I I I lolololololol I I I · 1 1 I I l l l l l l1I IAovj lsAcl 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 Enter 43. 3 3 3 R5 1s now alterable. 0 3-6 R4 is now alterable, R3 is now alterable. Enter 1. R4 is now alterable. But now you want to clear R3 and alter RO. lcLRI I I I •1 1 I I leAcl I I I, I I I I l l l l l l l jeAcl I I I , I· I I I leAcj 8 3 2 0 I I I,I I I 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 l l l l l l I I lllllll I I I, I I I I 0 0 l l l l l l I 0 0 0 0 0 0 RO is now alterable. 0 0 0 0 0 1 Enter 1. l l l l l l l 3.5 EXAMINING MEMORY LOCATIONS To examine a memory location, you must first place the OCT 11-EM in address mode. Do this by pressing the ADR key. The first time you do this, the LEDs display: Subsequently, when you press the ADR key, the upper row of LEDs displays: and the lower row of LEDs displays the most recently examined address. Enter the address of the memory location you wish to examine by pressing the appropriate sequence of keys 0 through 7 . The previous address will be cleared and you will see the address you are entering being shifted in from the right side of the lower row of LEDs as you press keys. If you make a mistake entering your address, you can press the CLR key to clear your entry and try again. Once you are satisfied with the address you have entered, press the EXA key. The address of the location you are examining (the address you just entered) appears on the upper row of LEDs, and the contents of this location appear on the lower row of LEDs. Only even addresses can be examined. If you enter an odd address, it is rounded down when you press the EXA key. 3-7 Examining Memory Locations - Example I You have just powered up your DCTl I-EM and want to examine some memory locations. There is a program that resides in the OCT! 1-EM called the monitor which begins at address 140000. You will learn more about the monitor later, but for now, all we want to do is examine some of its locations. UPPER KEY LO\r\lER DISPLAY DISPLAY COMMENTS G I IAId Id I· I I l l ! l l ! ! I IAId Id I·I I lololo!oiol1 I I IAId Id I· I I Jolololo!1!•I I IAId Id I· I I lololo!1!•iol G I IAldi dI' i I ~ I IAId Id I· I I l l•i•l l ! I G I I Id Id I· I I l l•l l l ! ! I IAId Id I·I I l l ! ! l•l ! IADRI 8 8 B 0 0 0 0 0 0 11 4 0 0 Get into address mode E111er 140000. 0 l ! ! l 1°! 1 0 0 1 A 0 0 0 0 0 1 0 0 0 0 1 The ADV and BAC keys allow you to examine memory locations sequentially. Pressing the ADV key allows you to examine memory locations in ascending order. Advancing beyond address 177776 results in examining locations starting at 000000. Pressing the BAC key allows you to alter registers in descending order. Backing up beyond 000000 results in examining locations starting at 177776. If you want to examine memory locations nonsequentially after you have pressed ADV or BAC, you must first press the ADR key to reinitialize address mode. Otherwise, you will change the contents of the memory location you are currently examining. Examining Memory Locations - Example 2 You have just finished example l and now want to examine more locations in the monitor. You start by examining them sequentially. 3-8 UPPER DISPLAY LOWER DISPLAY IAovj 1 0 0 0 2 l l•l l l l I Jo[1[s[3[3[0[ !Aovl I• l•lololol•I lololol1lel1I ]Aovl 1 0 00 l l•l l l l•I J1l,l·i,l·!2I jeAcj [•[•[o[o[o[•[ Jo[oiol1 [•171 \AoRI I IA Id Id I 'I I [ 1!•[o[oloi•I Reinitialize address mode for norisequcnl!a! examine ['.] I I d!dI ·I I lololololo!1I You try to ex<1rn1ne 140101 8 I IA Id Id I' I I l l0!0l !•[•[ G I I Id Id I' I I !0[0[0[1[•[0[ 8 I IA Id Id I·I I lo[ol1[•[0[1I G I IAl Id I ·I I Jo[• [•[0!1 [ol ['.] I I Id Id I· I I l1l•l 0l1l0l1l lexAI !1[•[0[1[0[0[ !0[0[0[1[•[11 J1[•[0[0[1[el l•l1!3l3io[e[ KEY fsAcl Al A 0 COMMENTS 0 d A 3-9 The address 1s rounded down ancl you examine 140100 Now you're sequentially examining again. 3.6 ALTERING MEMORY LOCATIONS To alter the contents of a memory location, you must first examine the memory location as described in Paragraph 3.5. To review, this means you must place the DCTl 1-EM in address mode by pressing the ADR key and examine the desired location by pressing the appropriate sequence of keys 0 through 7. Then press the EXA key. The contents of the location you are examining can now be changed by pressing keys 0 through 7 in the desired sequence. The previous contents of the location will be cleared and you will see the new contents being shifted in from the right side of the lower row of LEDs as you press keys. Pressing the CLR key will clear the location before or during data entry. Altering Memory Locations - Example I You have just powered up your DCTI I-EM and want to alter some memory locations. Locations 2000 through 2006 are in the user RAM area and will be used in the following examples. Later on, you will learn more about the availability of DCTI I-EM memory and address space, but for now the discussion will be limited to these locations only. UPPER DISPLAY LOWER DISPLAY I I Id :dI ' I I lolololololol KEY \Ao RI A COMMENTS Get into address mode. I IA Id id i' I I l 0l l0l l i I I IAId id, , i I loloio!ol2!1! I IA Id Id,, I I lo lo lo l l l I You made a mistake and entered 1 instead of 0. 0 I IA Id Id,, I I l l l l l l I lry again - enter 2004. ~ I IAId Id, , I I lolololof 2lol ~ I IAid id I 'I I l 0l0l l2l l0I I i Id Id i ' I I jolol2!olol4I 0 [2J jcLRI ~ 0 0 0 0 0 0 0 0 0 0 0 2 0 2 En,er 2004 Clear entry. 0 A jexAI 00 20 04 l l l l l l I G jofof 2[0[0[41 l l l l 0l l0I 0 0 0 0 0 00 0 0 3 l l l l l 11 3-10 2004 is currently empty. Enter 32 0 l0l 0!2i 0!0l•I jojojojoj3j2j \AoR\ I I Id Id,, I I lojoj2jojol•I 0 G I I Id I d, , I I l0l l 0l l 0l2I I I Id Id I ' I I jojo[o[o[2[0[ I I Id Id I' I I jo[o[o[2[o[ol I I Id Id, , I I l0l 0l 2l 0l 0l I jexA\ \ojoj2jojojoj jojojojojojoj 8 \ojoj2jololol ll l l l l I 0 0 A 0 A 0 Back to address mode to al1er another !ocatic.n Note - most recent address examined is displayed. Enter 2000. A A 0 A 0 0 0 0 0 1 2000 is currently empty. Enter 1. The ADV and BAC keys allow you to alter memory locations sequentially. Pressing the ADV key allows you to alter memory locations in ascending order. Pressing the BAC key allows you to alter memory locations in descending order. Press the ADV or BAC keys until you arrive at the memory location you want to alter and press the desired sequence of keys 0 through 7 to enter the data. If you want to clear the memory location, press CLR. Altering Memory Locations - Example 2 You have just completed example I and now want to sequentially alter memory locations. UPPER KEY DISPLAY LOWER DISPLAY IAovj iojoj2jo[o[2j jojojojojoiol 0 jojoj2[ojoj2j l l l l l l•I 0 lolol2lolol2! l l l l l•l I IAov) jojo[2folol•I jojojojoj3j2j 0 0 0 0 0 0 0 0 COMMENTS 0 Location 2002 is now alterable. Enter 47. 1 3-11 locarion 2004 is now alterable GJ l l l l l lsl l l l2l l l•I l l l l l l l l l l2l l l•I l l l l l l2l 0 2 l l l l l l•I )sAcl l l l2l l l•I l l l l l l•I !cLR) lo l l2l l l• I lolololololol 0 !Aovj 2 l l l l l l•I 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Location 2006 is now alterable. Enter 22 lolololol2l2I 0 0 0 Enter 5. 0 0 0 0 0 0 Location 2004 is now alterable Clear 11 3.7 ENTERING AND EXECUTING A SIMPLE PROGRAM In this paragraph, we will tie together the material presented thus far by entering and running a simple program. It is assumed you are familiar with an assembly language instruction set. A full description of the instruction set used in the following example is found in Chapter 6 of the DCTJ I-AA User's Guide (EKDCTl 1-UG). The following program takes a number in register R 1, adds it to a number in register R2, and puts the result in register R3. Octal Code Instruction Comments 010103 060203 000000 MOY Ri,R3 ADD R2,R3 HALT Get first term. Add second term. Halt program execution. We will place this program in user RAM, starting at address 2000. UPPER KEY LOWER DISPLAY DISPLAY COMMENTS Most recently exam· ined address shown JAoRJ I IAId IdIrI I ~ G I IAl did I ·I I l l l l l l2l I I Id Id I·I I l l l l l2l l G I IAId Id Ir I I l l l l2l l l on lower LEDs. 0 0 0 0 0 0 0 0 A 0 0 0 0 0 0 0 3-12 E)(amme 2000. 0 I IA Id I dI'I I Iolol2lololol El l 002000 l i l l I Current con ten rs of [] lo!o[2[0[0[0[ [a[o[ololol1I G [o[oi2!oioloi [0[0[0[0[110! [] Jalol2lolo:o1 I0I0I0;,: 0I, I ~ jo[o[2[o[o[oi I i 0i' I0i ' i 0I 0 la[of2[o!olol lo[1[0[1io!3I jAovj [ofo[2io[ol2[ 0 jo[o[2!0[0[2I [o/o[o[o[of 61 ~ [o[oj2[oio[2I !a[o[ojoiGlo[ [] [alo[2[0[0[2[ [o[oiolGl0[2[ ~ [0[0[2loloi2I [oio[G[o[2[ol 0 [0[0[2[0[0[2! Jo[G[o[2lol3I [Ao vi 002004 l l l l l 1 1 Current contents of 2004 are shown on lower LEDs. lcLRI jojo[2[o[ol4I l locat1un 2000 are shown on lower LEDs. Enter first instruction You don·t neerJ 10 enter leading zeroes 0 Current contents of 2002 are shown on lowt!r LEDs Io[o [a [o[o lo I 3-13 Ex.amine next address Enter second 1nstruct1on. E~amine next address. Enter third instruction. HALT IS entered by clearmg the location. Now place some numbers in RI and R2 that the program can work with. Also make sure R3 is cleared. I I I·I I ! I Current contents of I I I·I1I I I Current contents of 1 R 1 shown on lower LEDs R 1 remain on lower LEDs. I I I·I I I I 1 I I I·I I I I Current contents of 2 R2 shown ori lov;er LEDs. IAovl I I I • 13 1 I I ff~:~'.,~o~;e~o':;; B I I I• 131 i I I OIO IO IO l OIO I 3 Cleo< " Now go back and check what you have just entered. B I I AI d I dI •I I 0 I IAI dI •I I I0I I2l I I2I ~ I IAldldl·l I l l 0l 0l 0l 2l0I ~ I IAldldl•l I Jol0Jo]2Jolol 0 EJ I OIOl 2IOIO14 1 0 d [ 0 0 0 IAldldl·l l l 0 l 0l 2 l 0l 0l 0 I Jolo!2lololol Jol1lol1lol31 J 3-14 Getonto add'<» mode E<amloe 2000 JAov! Jolol2lolol2I jAovj l!l l l l I I I I' IE IG I I I I I I ! I I 0 l IReGj Jolslol2lol3l 0 20 0 4 l l l l 11 I 0 0 0 0 0 0 D I I I,I, I I I [] I I I , I2I I I loloioloiolJI 0 I I I, 1 1 I I l l l l l l I lololololol2I 3 0 0 0 0 0 0 Examine 2002. Examine 2004. Get into register mode. Examine registers Everything 0.K Now run the program. Set the PC to the starting address of the program (2000) and press the GO key to begin program execution. Since you are currently in register mode, press the ADV key until you get to the PC. Current contents of PC shown on lower LEDs. !0 l 0 l0 l 0 l 2I 0 I I !Piel 11 G G ! 11IPlcl11 l l l l 2! ! I 11IPlcl11 l ! l 2! l l I E] I I I IC I I I I I I I I I•I G 11 IPlcl 11 P l l 0 0 l0 l 0 l0 ( 2(0 0 0 0 0 0 '"'" 2000 0 0 0 2 0 0 0 0 0 0 Emote thopcog"m The program is now halted. The current PC (2006) is displayed on the lower row of LEDs. 3-15 Check R3 to find out if the program executed properly. Since you are in register mode, press the BAC key until you get to R3: and the result is correct. 3.8 WORKING WITH A LONGER PROGRAM Consider a program that calculates the sum of all the numbers from 0 to n, where you specify n. That is, the program determines: n X=O You place the value of n in RO, and the program deposits the sum it calculates in memory location 2044. Use the keypad to enter the following summation program starting at location 2000. Location Octal Code 2000 2002 2004 2006 2010 2012 2014 2016 2020 2022 2024 2026 2030 2032 2034 2036 2040 2042 2044 005001 020001 003413 005037 002044 010037 002044 005300 060037 002044 102404 020001 003372 000000 005000 005037 002044 000000 xxxxxx Instruction Comments CLR RI CMP RO.RI BLE 2034 C LR <Z> # 2044 Set RI = 0. RO contains n. Illegal input (n :S O)" No, start operation by clearing 2044. MOY RO.<iJ #2044 Place first value of n in 2044. DEC RO ADD RO,(a,#2044 n ~ n-1 Add next value (n--1) to 2044. BYS 2036 CMP RO.RI BGT 2016 HALT CLR RO CL.R <Z>#2044 Overflow'' No overflow. Continue operation if n > 0. Operation complete if n = 0. Illegal input. Clear RO, 2044. Overflow. Clear 2044. HALT Illegal input or overflow occurred. Initial contents of 2044 irrelevant. 3-16 To test the operation of the program, deposit a value of 10 (octal) into RO. The program should sum I 0 + 7 + 6 + 5 + 4 + 3 + 2 + l (octal) in memory location 2044 to produce 44 (octal). Note that this is equivalent to having a value of 8 (decimal) in RO and letting the program sum 8 + 7 + 6 + 5 + 4 + 3 + 2 + I (decimal) to produce 36 (decimal). Set RO= JO SP= 7400 PC= 2000 Press the GO key. The result should be: The program halted at location 2032. Now examine location 2044. The result should be: 3.8. I Using the Single-Step Function The single-step function is a powerful program analysis tool. It allows you to execute your program one instruction at a time. At the end of each instruction, you may examine various registers and memory locations to determine how the program has affected them. To perform the single-step function, press the SST key. Result: the instruction currently pointed to by the PC is executed. Let us now single step through the preceding summation program. First set up your initial conditions: Set RO= 10 SP= 7400 PC= 2000 3-17 Then key in the following. UPPER OISPlAY KEY LOWER DISPlAY COMMENTS jss1I I I I·I i I I l l ! 2! ! !2I lssTj I I Ip le I I I ssrj I i Ip I I I I l l l2 l0 I I i I lolol2lol1!2! I l I I l l0 2 i1i ! I i Id Id I'I I I I Id id I 'I I loloiololol2! f Jssrl jssr! c e 0 0 0 0 l l l2l l 0 0 0 0 0 0 2002 executed. l•I 0 l 0 2004 executed l•I l•!el !Piel 2000 executed 0 6 2006 executed. 2012 executed. l l Most recently exam· jAoRi 0 G 0 8 ined address shown A on lower LE Os. A I IAl dId I 'I I l0l l0l l l ! I IAId Id I ' I I l0l0 l2l l•I I IAId Id I 'I I j0Jol2Jol4l4! 0 0 2 0 0 0 l jexA! l l0l 2l l•l•I l0 0!0l0l1 0! jssrj I I I I l 0l !2 0l2l ! I I I, I· 1° I I I I I I I I I I I I, I I I I l l !0!0l i l IREGI GJ Has RO been moved to 2044J 0 0 l 0 !Piel 0 Yes. l 0 2016 executed. l 0 0 0 1 3-18 Did RO get decremented? Yes. 2020 executed. Has RO been added to 20441 Yes 2024 executed 2026 executed Program branched correctly 2016 executed IIIIIII Did RO get decremented? 2020 executed Did RO get added to 2044' You can continue executing the program one instruction at a time by repetitively pressing the SST key. 3..8.2 Using Breakpoints Tbe use of breakpoints is another means of analyzing and debugging your programs. Breakpoints cause •0t1r program to halt whenever they arc encountered. When the program is halted, you can then examine ··inous registers and memory locations to determine how the program has affected them. I' there were no debugging aids, you would have to insert breakpoint (BPT) instructions in your program ._cd write a breakpoint trap handling routine if you desired breakpoints. The DCTI I -EM, however, does ,,Jllain debugging aids and provides a convenient means of inserting up to four breakpoints via the •:. '.'Jd. Do not attempt to set breakpoints by inserting BPT instructions in your program. If you do this, _ ... ill get an error message when you try to execute the program (see Appendix C). 3-19 To insert breakpoints, press the BPT key. The upper row of LEDs displays: and the lower row of LEDs displays the current address of breakpoint 1. If breakpoint 1 is not currently set, the lower row of LEDs displays: You can then press the appropriate sequence of keys 0 through 7 to enter the address of breakpoint I. You can set up to four breakpoints in this way. Use the ADV and BAC keys to examine breakpoints I through 4 and press the appropriate sequence of keys 0 through 7 to enter an address for each breakpoint. If you press BAC while you are examining breakpoint I, you are examining something called the watchpoint address. The use of the watchpoint is explained in Paragraph 3.8.3. Breakpoints are recognized only if you use the GO key or the "Go With LEDs" special function (Paragraph 3.12.2) to execute your program from the keypad. Breakpoints are disabled when you single step through a program. When you execute a program with breakpoints in it (by pressing the GO key, for example), your program halts at the address of your first breakpoint without executing the instruction at that address. The instruction at the breakpoint address is executed when you resume program execution (e.g., by pressing the GO or SST keys). Using Breakpoints - Example We want to set two breakpoints in the summation program shown in Paragraph 3.8. Set the first breakpoint at address 2020 to make sure RO has been decremented properly. Then set the second breakpoint at address 2024 to check the results of the cumulative addition. UPPER KEY LOWER DISPLAY DISPLAY COMMENTS \sPTj lb\,l·i"i'i'I Joiolo!oioioi [] lbi,l•lnltiil lllli lI G lbl,l•lnltill llllilI 0 lbi,l•lnltill lllllll 0 0 0 0 0 0 0 0 0 0 0 2 0 2 0 2 0 2 3-20 Assume no breakpoints have been previously set Enter 2020 G IAovl lb:,i·l·l·l·I l l l l l l I lbl,l·l·l·l I l l l l l l I 2 0 0 2 0 2 0 0 0 0 0 0 0 0 lbl,i·i·l·l I l l l l l l I 0 l·l,l·l·l·l I l l l l l i I D l·l,l·l·l'l I l l l l l l I 8 l·l,i·l·l'l I l l l l l l•I 2 0 2 0 2 0 2 0 0 0 0 0 0 0 0 2 0 0 2 0 0 2 0 2 Set breakpoint 2. Enter 2024 0 2 2 Set your initial conditions as before (RO = I 0, SP = 7400, PC = 2000) and execute the program. EJ 11 I· lei I I l l l l l l I !REG/ I G I I I,i I I I l l i l l l I Yes B I ·le Resume execul!on 0 I i' iE IG I I 11 11 0 2 0 0 0 0 0 1 l l l l l l•I 0 I 2 I I i ~ I 11 0 0 0 0 2 0 2 First breakpoint encountered. Did RO get decremented> Examine address 2044 to see if the first addition was performed correctly. Most rccef'ltly exmnined address sl iown on lower LE Os G I IA I d Id, , I I G I IAl•l•['I I l l l l l l GJ I IA!•l•l,11 l l l l l l•I I O IO IO IO IO i 2 1 0 0 0 0 0 0 0 2 2 0 0 3-2 I [ h•mme 2044. G I IAi di ·I 'I I l l l i l•l•I !exAj l l l l l•l•I l llll l I B I I !•le: I I /olo>iol2lo/ IREGI I I I' IE IGI I I : I I I I I ~ I I i · I I I I lolo!oloiol61 /Go/ I I I· I< i I /olol2/ol2l•I 0 0 2 0 0 0 2 0 0 0 0 0 1 1 Adrhtion perlormed correctly Resume e)(eCLltion 0 Resunie execu1•on 3.8.3 Using the Watchpoinl In Paragraph 3.3 we identified the watchpoint (WP) and showed how it could be examined. In this section, you will learn how to use the WP for program analysis and debugging. The watchpoint is a convenient means of monitoring and altering a memory location. Once you set the watchpoint address to the address of a memory location, you can examine and alter that location just as you would a register. To set a watchpoint address, press the BPT key, then the BAC key. The upper row of LEDs displays: and the lower row of LEDs displays the current WP address. If the WP is not set, the lower row of LEDs displays: You may now enter the new WP address by pressing the desired sequence of keys 0 through 7. You can clear the WP by setting its address to zero. 3-22 Using the Watchpoint - Example I In our summation program in Paragraph 3.8, we used location 2044 to deposit our accumulated result. Since we would like to examine (and possibly alter) this location frequently, we set our watchpoint address at 2044. UPPER KEY DISPLAY LOWER DISPLAY IBPTI l·l'IPlnlt!ll lalal2lalaJ2I jaAcl IPlnJtlAldl'I Jalaiaialalal [] IPlnltlAldl'I Ja;0Jola1ol2I 0 IP!nltlAldl'I l0l 0l l l 2l0l 8 IPln!tiAldl' I JaJa)aJ2JoJ•I 0 IPlnlt IAldi' 0 COMMENTS Current value of BPl displayed 011 lower LEDS. Enter watchpoint address of 2044. 0 I l i l2l 1•l•I 0 0 0 "ow we can examine and alter the contents of location 2044 just as we would a register. If you run the summation program in Paragraph 3.8 and want to inspect the result, do the following. IIIIIII Current contents of 2044 shown on lower LEDs. l l l ! l•l•I 0 0 2 0 Gi>t mto register mode Examine WP. Current contents of 2004 shown on lower LE Os. JaJaJ2Joi•l•I Clear 11 You have just cleared the contents of location 2044. The watchpoint can be used in conjunction with the single-step function to continuously monitor the ,<1ntents of a memory location. When this is done, the contents of the watchpoint appear on the upper row .:if LEDs, and the current PC appears on the lower row of LEDs. 3-23 Using the Watchpoint - Example 2 You are still working with the summation program in Paragraph 3.8. You have established a watchpoint at location 2044, as shown in the previous example, and want to continuously monitor the contents of this location as you single step through the program. Set your initial conditions as before (RO = I 0, SP = 7400, PC = 2000) and key in the following. UPPER KEY DISPLAY LOWER DISPLAY lss1j l l l l0l0 i 0! l0l0l2i0l0l2I Jss1j l0l0l0l0l0l0I l0l0l2l0l0l•I !ss1j lolo!olololol lolol2lolol6! 2004 executed ssrl I 0I0l I0! Iol lolol2[0!1[2I 2006 el(ecuicd lss1j lololo:o!1lol lo[ol2lol1!6! jssrl lololoio!1lol lolol2!0!2lol 2016 executed \ssr[ 000 011 l l l l l i I l0l l l l2l•I 2020 execl1ted 2044 has changed. j 0 0 0 0 0 0 2 0 COMMENTS 2000 executed: 2044 contents shown on upper LEDs. 2002 executed. 2012 executed. 2044 has changed. And so on. When you finish executing the program (e.g., after you have executed instruction 2032 in the example above), the upper row of LEDs displays: and the lower row of LEDs displays the current PC. 3.9 USING THE HALT SWITCH Pressing the HALT switch causes you to unconditionally halt the operation of your program and return control to the DCTl I-EM keypad. When you press the HALT switch, the upper row of LEDs displays: and the lower row of LEDs displays the current PC. 3-24 You can use the HALT switch, for example, to escape from an infinite loop your program is executing or to inhibit hardware problems which are interrupting the proper operation of the DCTI 1-EM. After pressing HALT, you are in register mode and can readily examine the contents of the DCTI I-EM registers as described in Paragraph 3.3. 3.10 THE INT SWITCH Pressing the INT switch causes you to generate a power-fail (PF) nonmaskable interrupt. Pressing this switch will have no effect on the operation of the DCTI I-EM unless you specifically write a program that recognizes input from it. The program in the following example shows you how to use this switch to experiment with interrupts. Also refer to Chapter 6 for more information on interrupts. Using the INT Switch - F'.xample This program simply loops on itself at location 1510 until you press the INT switch. Then the current PC and PS are pushed onto the hardware stack and the DCTl 1-EM goes to locations 24 and 26 for its new PC and PS, respectively. Location 24 is called the power-fail vector and usually points to a power-fail service routine. The first line of your program, however, changes location 24 to point to your own "power-fail service routine." This routine, which you specify to start at location 1514, is not a power-fail service routine at all, but a routine that sets RO to the number of times (in octal) that the interrupt switch has been pressed. Enter the following. Location Octal Code 1500 1502 012737 001514 1504 1506 1510 1512 1514 1516 000024 005000 000777 000000 005200 000002 Instruction Comments MOY #1514.®#24 Set power-fail vector to "service routine." Initialize RO. Await interrupt. CLR RO BR 1510 HALT INC RO RTI Start of "service routine." Restore old PC and PS. Start the program at 1500 and press the INT switch a number of times. The upper and lower row of LEDs ,.ill be blank while you are pressing the INT switch. Each time you press INT, you execute the "service routine" which increments RO. When the routine is done, it returns to 1510 to await another INT switch press. Press the HALT switch to suspend operation and examine RO. 3.11 THE USER LED The user LED is a general-purpose indicator lamp that your program can use to indicate the status of some condition. You can turn on the user LED by writing 00001 l to port C of the 8255A parallel port chip (see Paragraph 6.5.1). Port C of the 8255A chip has an address of 177444. Writing 000010 to port C of the 8255A chip turns off the user LED once it has been turned on by your program. 3-25 User LED - Example The following is a short program that turns the user LED on and off. Use the keypad to enter this program starting at location !000. Location Octal Code !000 1002 1004 1006 1010 1012 1014 1016 1020 1022 1024 1026 1030 1032 012737 000011 177444 012700 100000 077001 012737 000010 177444 012700 100000 077001 000137 001000 Instruction Comments MOY #ll,®#177444 Write I I to port C. MOY #I 00000,RO Put a large number in RO. SOB R0,1012 MOY # 1O,<&#I77444 Loop for a while. Write 10 to port C. MOY #100000,RO Put a large number in RO. SOB R0,1026 JMP @#1000 Loop for a while. Loop infinitely. 3.12 PERFORMING KEYPAD SPECIAL FUNCTIONS There are five types of special functions you can perform through the use of the DCTl l-EM keypad. Function Number Function Name 0 l Cancel breakpoints Go with LEDs Start console Set baud rates Release protection 2 3 4 To perform one of these special functions. you must first place the DCTJ I-EM in function mode. To do this, press the FNC key. The LEDs display: I IF I In IcI I u IIIIIII and you can now select a function by pressing any of the keys 0 through 4 or CLR, which is equivalent to 0. When you have done this, the number of the selected function appears on the bottom row of LEDs. The selected special function is then activated by pressing the EXA key. The following paragraphs describe the operation of these special functions. 3-26 J. 12.1 Function 0 - Cancel Breakpoints Function 0 clears all four breakpoint addresses and the watchpoint address. When function 0 is activated, the upper row of LEDs displays: ind the lower row of LEDs displays the current value of the PC. The DCT I I-EM is left in register mode. fmction 0 - Example You are debugging a program you just entered and want to clear all the breakpoints and watchpoints is.sociated with an old program. UPPER LOWER DISPLAY KEY DISPLAY IFNCI I I F I " I nI ' I I I I I I I G I I FI uI n,, I I I I I 1° I I I [EXA[ I l•lc :11 COMMENTS Get into functoon mode Select function 0. Current PC sl1ow11 on lower LEDs. I [ePrl jeAc] I bI , I·I nI, I , I 0 0 0 0 0 0 i l·l"l':A:dl,i l l i 1°l l I 0 jAovl or \sPTI lbl,l<<'l 1 I )Aovj lll llI 0 0 0 0 lolo oololol lbl,l•!nltl 1 loloioiololol 2 Verify breakpoint 1 clccircd Verify watchpo1nt address cleared Breakpoint 1 again Vcnfy Urc<Jkpoin: 2 cleared l.12.2 Function I - Go With LEDs 1lo11hin the DCTI I-EM arc a number of routines your program can call to display values on the LEDs (see Pir.igraph 5.3.1). For these routines to operate correctly, you must explicitly turn on the LEDs before you all a routine. One way to turn on the LEDs is to include a MOY #7,@#177444 instruction in your ;ir.:igram (see Paragraph 5.3.1.1). Another way is to execute your program by activating function I rather :Un by pressing the GO key. Activating function 1 turns on the LEDs and starts your program. 3-27 3.12.3 Function 2 - Start Console If you connect a console terminal to your DCTI I-EM, you will use function 2 frequently. Activating function 2 starts a program called the console monitor. The console monitor resides in the on-board PROMs and allows you to enter, execute, and debug programs through the use of a console terminal rather than the keypad. The console monitor also allows you to perform other operations and is described in more detail in Chapter 4. Before activating function 2, connect a console terminal to the OCT! I-EM and select an appropriate baud rate by activating function 3 (see Paragraph 3.12.4). When function 2 is activated, the upper and lower LEDs are blank and the message: TEM CONSOLE MONITOR Vl.O TEM> appears on the console terminal. 3.12.4 Function 3 - Set Baud Rates The DCTI I-EM has two serial ports: a console terminal port and an auxiliary serial port. Activating function 3 allows you to select baud rates for these ports. When the DCTI I-EM is powered up, it automatically sets both baud rates to 9600. When you first activate function 3, the upper row of LEDs displays: and the lower row of LEDs displays: This tells us that the console terminal port is currently set at 9600 baud. Note that the baud rate is displayed as a decimal number. Pressing the ADV and BAC keys steps you backward and forward among the various baud rate values available for the console terminal port. The available baud rates for the console terminal port are: 300, 600, 1200, 2400, 4800, 9600, and 19200. You can now set the baud rate of the auxiliary serial port by pressing the EXA key. The first time you do this, the upper row of LEDs displays: and the lower row of LEDs displays: 3-28 This tells us that the auxiliary serial port is currently set at 9600 baud. Repetitively pressing any of the keys CLR, 0 through 9, ADV, or BAC causes you to alternate between two available baud rates. The two available baud rates for the auxiliary serial port are: the current baud rate of the console terminal port and one-fourth the current baud rate of the console terminal port. Pressing EXA again puts you into register mode. Fmction 3 - Example You want to use function 3 to experiment with setting baud rates for the console terminal serial port and the auxiliary serial port. You have not altered these baud rates since powering up. KEY UPPER DISPLAY LOWER DISPLAY COMMENTS I IIIIi I Get into function mode. Select function 3 Baud rate for console terminal pan = 9600 I l l l•l l I 0 4 0 0 I l l l•J i I 0 2 0 0 Band rate for auxiliary port= terminal port. 300 = one fourth of 1 200 1 0 Il llllI 0 2 0 IAI IPlol'l'I Ii l l l l I I I i Ic I I I Current PC sl1own on lower LEDs. p 0 0 3 0 0 Back to 1200 Back to 300 Now 1n register mode 3-29 Console port= 1200 Auxiliary port = 300. 3.12.S Function 4 - Release Protection There is an area of RAM that the DCTI l-EM normally prevents you from directly altering from the keypad. This area is called the keypad monitor scratchpad and occupies the memory space from addresses 7400 to 7777. Refer to Paragraphs 5.2 and 5.4.l for more information about the keypad monitor and this protected area. Additionally, if you have a console terminal connected to your DCT l 1-EM, there are two other areas of RAM that are protected. These areas are the console monitor scratchpad and the symbol table. They occupy the memory space from addresses 6500 to 7377. Again, more information is provided in Chapter 5. Activating function 4 releases the protection associated with these memory spaces. Note that "protection" refers to protection from direct alteration via the keypad or console terminal. Programs that you write can and will alter these locations. Therefore, when you write your programs make sure these spaces are not inadvertantly violated. Protection is restored when you press the HALT switch, when a HALT instruction is encountered, or whenever you restart the DCTl I-EM. When you activate function 4, the upper row of LEDs displays: and the lower row of LEDs displays the current value of the PC. Function 4 - Example You want to alter location 7400, a normally protected location. KEY IFNCI [] fExAI UPPER LOWER DISPLAY DISPLAY I IF I In I I I I I I i I I I I IFI " InI I I I ~ : I· I I I I i ! ·I I I I u COMMENTS Get into functron mode. c Select !urict10n 4. c c Current PC shown on lower LEDs' Protection off. Alter the location. I I Id Id I'I I I IAid id i ' I I A Most recently exam· ined <1ddress shown on lower LE Os. Alte1 7400 3-30 G ~ I dId ! I l0!0l0l lol I Id! dl · i I 0l0l'l•i 0l 0I 1 : Al 1 · :A 4 J l jexAI l0l0l l•l 0l0I l0l0l0l0l i 0! D 001 00 l i ! l•! l I 1 0 lofol0Joloi2I Enter 2 Restore protection by pressing the HALT switch. 0 I I i •i cl I I Current PC sliown on lower LEDs Protection res1ored 'ow try to alter location 7 400. jAoRI I i dId i ': I Joiol1l•iof ol jexAj l0!0i l•i 0i0I Ioloi oloj o: 21 le LAI I : I" I· i : I I IE I· !' i I · I you get a flashing error rni:ssage \exA\ I I I· Ici : I Now 1n register mode Al 1 0 Current PC shown on lower LEDs. See Appendix C for more information on error messages. 3-31 When you try to clear 7400 3.13 KEYPAD COMMAND SUMMARY OPERATION PRESS ENTER PRESS ENTER REFERENCE ALTER MEMORY IAoRj LOCATION ADDRESS IExAj NEW CONTENTS 3.6 ALTER REGISTER IREGI REGISTER NUMBER IExAI NEW CONTENTS 3.4 CANCEL BREAKPOINTS IFNcl G IExAI 3.12.1 EXAMINE MEMORY IAo RI LOCATION ADDRESS IExAI 3.5 EXAMINE REGISTER IREGI REGISTER NUMBER EXECUTE PROGRAM EJ GO WITH LEDs IFNcl D IExAI 3.12.2 RELEASE PROTECTION IFNcl Q IExAI 3.12.5 SET BAUD RATES IFNcl ~ IExAI 3.12.4 SET BREAKPOINT IBPT I BREAKPOINT ADDRESS SET WATCHPOINT lsPTI SINGLE STEP I START CONSOLE jFNcl 3.3 3.7 3.8.2 jsAcl WATCHPOINT ADDRESS 3.83 3.8.1 SST I GJ 3-32 IExAI 3.12.3 CHAPTER4 CONSOLE OPERATION 4.1 INTRODUCTION This chapter explains how to operate the OCT! I-EM using a console terminal. Using a console terminal simplifies program development because it gives you access to the OCT! 1-EM's symbolic assembler/disassembler. In addition, a console terminal allows you to perform several functions not accessible with the keypad, such as the ability to load programs from a host computer. When you complete this chapter, you will be able to use a console terminal to: • Examine and alter the contents of registers in the OCT! I-AA register file • Examine and alter the contents of memory locations • Enter and execute programs • Debug your programs through the use of single steps, breakpoints, and watchpoints • Load programs from a host computer • Perform a variety of other console functions. You can connect an RS232-C compatible console terminal to your OCT! I-EM as shown in Figure 4-1. CONSOLE TERMINAL -=---=->~~ J4 ITTTTTI ~ DODOO ITIIIIJ DOD DD DDDDD DODOO M" miss DCT11-EM Figure 4-1 Connecting a Console Terminal to the DCTl I-EM No other wiring or jumpering is required. Use the OCT! I-EM keypad to set the correct baud rate by activating function 3 (see Paragraph 3. I 2.4). Also, make sure your console terminal is set up to transmit and receive characters in the following format: asynchronous, ASCII, 8 bits (eighth bit is always space), no parity, one stop bit. 4-1 Then activate function 2 as described in Paragraph 3.12.3. The terminal displays: TEM CONSOLE MONITOR Vl.O TEM> and the console monitor is ready to accept your input. The following default conditions arc set when the console monitor is started: I. 2. The stack pointer is set to 6500 The PASS2, NOHOST, INSTRU, SYMBOL, and VTOFF operating modes are set. More information about the stack pointer is given in Paragraph 5.2.1. The operating modes are described in detail elsewhere in this chapter and are summarized in Paragraph 4.18. 4.2 TRANSFERRING CONTROI. BETWEEN THE CONSOLE TERMINAL AND THE KEYPAD Either the console or the keypad can control the OCT! I-EM, but not both at the same time. From the keypad, your primary means of transferring control to the console is by activating function 2 (see Paragraph 3.12.3). You can regain keypad control by pressing the HALT switch. When you press the HALT switch, OCT! I-EM operation is stopped and the LEDs display the current PC. From the console, you can transfer control back to the keypad by typing in the EXIT command or by executing a HALT instruction. 4.3 GENERAL RULES FOR CONSOLE INPUT Information you input via the console terminal is typically in the form of commands, instructions. or data. In general, your input should conform with the following guidelines. I. Your input line must not exceed 96 characters in length. If you exceed this limit, the console terminal does not accept further input until you type in a CTRL/C or CTRL/Y. Then, you must reinput the line. 2. Any number of commands and instructions can be strung together on a line as long as the line docs not exceed 96 characters. 3. Commands or instructions strung together on a line should be separated with a space or a comma. Extra separation characters (space, tab, line feed, form feed) between commands or instructions on a line arc ignored. 4. If a command or an instruction in a one-line string causes an error, the commands or instructions following it are ignored. 5. Extra separation characters (space, tab, line feed, form feed) inserted between parts of a command or instruction are ignored. 6. Information preceded by a semicolon on a line is interpreted as a comment and is ignored by the DCTl 1-EM. 4-2 7. Pressing the DELETE key deletes characters on a line. As characters are deleted, they are echoed (preceded by a slash character) on the console terminal if you are in VTOFF mode. The console monitor defaults to VTOFF mode when it is started or restarted. Type in the VTON command if you are using a video terminal as a console device. VTON mode eliminates the echoing of deleted characters. Typing in VTOFF returns you to VTOFF mode from VTON mode. 8. A line is terminated by pressing the RETURN key. Characters on a line are ignored until you press RETURN. In all the examples in this chapter, a RETURN is used to end your input line unless otherwise noted. A summary of the various forms of acceptable console input is given in Paragraph 4.18. Information about specific commands and instruction formats is given elsewhere in this chapter. 4.4 CONSOLE CONTROL COMMANDS The DCTI I-EM recognizes several control commands that allow you to easily perform a variety of operations from the console terminal. These commands and their typical uses are listed in Table 4-1. Table 4-1 Meaning CTRL/U CTRL/X Delete line. CTRL/R Display line. CTRl./S Suspend execution. Control Command Summar)' Typical Use You 1nadc several typing errors in your input line. You want to cancel the line and try again. You used the DELETE key several tin1es while typing your input line. You want to see a clean version of the line you are editing. You want to suspend the operation of the console monitor or the execution of a currently running progran1. CTRL/Q Resume execution. You have previously used the CTRL/S command and want to resume operation. CTRL/C CTRL/Y Abort operation. You want to abort the current operation of the DCTI 1-EM and input a new line. CTRL/0 Ignore host nicssagc. You arc in HOST mode (see Paragraph 4.17.1) and want to ignore inforn1ation currently being sent by your host con1putcr. CTRL/A Select option. You arc in TALK or LOAD modes (see Paragraphs 4.17 .3 and 4.17 .4) and want to select one of these four options: exit, resume, send break, send CTRI./ A. 4.5 EXPRESSIONS Several commands and instructions accept expressions as parameters. This paragraph familiarizes yeu with expressions and provides the rules for their definition. If you wish to ignore the use of expressions for the moment, you can advance to the paragraph that describes the command or function you are interested in. You can return to this paragraph when you need 1DOre detail on how to define an expression for a particular command or instruction. 4-3 An expression is simply a user-definable combination of one or more components called terms that represents a 16-bit number. There are three types of terms allowable in a DCTI I-EM expression: • • • Numeric Literal Symbolic Numeric terms are either octal or decimal numbers. Octal numbers can be any sequence of the digits 0 through 7. Decimal numbers can be any sequence of the digits 0 through 9 followed by a decimal point(.). Do not attempt to define decimal fractions. Examples of Numeric Terms 100702 377 39874. A literal term is an ASCII character you use as data. Precede an ASCII character with an apostrophe(') to form a literal term. Examples of Literal Terms 'E '*'4 Symbolic terms are values symbolized by names wbich are defined according to the rules in Paragraph 4.13. Examples of Symbolic Terms RI P$PORC SUM Terms are joined together in an expression by binary operators. (The word binary in this case means that at least two terms are involved.) The DCTI I-EM allows six types of binary operators: + (addition) - (subtraction) • (multiplication) / (division) & (logical AND) ! (logical OR) The unary (one term) operators, +(plus sign) and - (minus sign), can only be used at the beginning of an expression (or parenthesized term). Multiple unary operators are not valid. Expressions are evaluated from left to right with no operator hierarchy rules. Two types of brackets can be used to nest expressions up to seven levels deep. Use angle brackets (< >) as you would arithmetic parentheses and use square brackets (Ll) if you want the DCTI I-EM to substitute the enclosed information with the contents of the memory word it addresses. Note that if the information in square brackets represents an odd address, it is first rounded down. 4-4 A quick way to evaluate the octal value of an expression is to type in the expression followed by a question mark. This command has the form: expression? Expressions - Examples The following are examples of valid OCT I I-EM expressions. You can verify the octal values of these expressions by using the question mark command. Expression Octal Value 65209 7077+ 189.+'E -2*<300/25>+ 70 120.*<-8.> 177777&25+3 177271 007501 000046 176100 000030 4.6 EXAMINING REGISTERS There are two ways to examine registers. One way is to type in the appropriate register symbol followed by a question mark. This command has the general format: register symbol? where the register symbol (RO, Rl, etc.) is as defined in Paragraph 4.13.1. Another way to examine registers is to type in the SHOWRE command. The SHOWRE command displays the values of all the registers and the PS in ascending order. If a watchpoint has been set, it is also displayed. Paragraph 4.14.1, which describes program debugging, gives you an illustration of the SHOWRE command. 4.7 ALTERING REGISTERS Registers are altered by using an equal sign to set the register to the desired value. The general format for this is: register symbol=expression where the register symbol (RO, Rl, etc.) is as defined in Paragraph 4.13.1 and the register is set to the value of the expression. (See Paragraph 4.5 for expression formats and conventions.) Altering Registers - Example Alter and examine the values of RO and the SP. TEM> R0=65. TEM> SP=6500 TEM> RO? SP? 000101 006500 TEM> 4.8 EXAMINING AND ALTERING MEMORY LOCATIONS-INTRODUCTORY CONCEPTS There are several ways to examine and alter memory locations. Before discussing the specific techniques, there are some introductory concepts you should be familiar with. 4-5 4.8.1 The Address Pointer The address pointer specifies your current open location, i.e., the address of the location currently available to you for alteration. It is important to keep track of the address pointer because it determines where in memory you deposit information. As you will discover later, most commands which alter and examine memory locations are closely linked to the value of the address pointer. This paragraph gives an overview of how the address pointer can be affected. Since the DCT 11-EM recognizes a period(.) as the symbol for the address pointer, you can manipulate the value of the address pointer just as you would any other symbol (see Paragraph 4.13.2). For example, to set the value of the address pointer use an equal sign: .=expression where the value of the address pointer is determined by the expression (see Paragraph 4.5). To determine the current value of the address pointer, use a question mark: ') Another way to set the address pointer is to use the backslash (\) character. The general format for a backslash command is: expression\ where the value of the address pointer is determined by the expression. This command also displays the memory location specified by the expression (see Paragraph 4. 9). There are two other commands which affect the address pointer. These commands are the caret (") command and the RETURN (or null line input) command. The effects of these commands depend upon which output format mode the OCT 11-EM is in (see Paragraph 4.8.2). A description of their effects is given in Paragraphs 4.9 and 4.10. When you type in a program, the DCTI I-EM automatically increments the address pointer for each instruction or data object you input. Note that whenever you power up, the address pointer is initialized to zero. Do not confuse the address pointer with the PC (program counter). They are unrelated. As you type in a program, the address pointer is incremented, but the PC is unaffected. And the execution of a program will affect the PC but not necessarily the address pointer. 4.8.2 Output Formatting Modes When you examine memory locations, the values the DCTl I-EM displays on the console depend upon your current output formatting mode. There are five output formatting modes: INSTRU, WORD, BYTE, SYMBOL, and ABSOLU. The INSTRU (or instruction disassembly) mode causes memory locations to be displayed as disassembled DCTI I-AA instructions. INSTRU is one of the modes that the DCTI 1-EM is initalized to when you power up. 4-6 The WORD and BYTE modes cause memory locations to be displayed octally. Set the WORD mode (by typing in the WORD command) if you want the values of memory locations to be displayed as 16-bit .,·ords. Set the BYTE mode (by typing in the BYTE command) if you want the values of memory locations to be displayed as individual bytes. If you are in WORD or BYTE mode, type in the INSTR U command to return to instruction disassembly mode. Notice that the INSTRU, WORD, and BYTE commands are mutually exclusive. To summarize: Mode Memory Locations Are Displayed As INSTRU BYTE WORD Disassembled DCTI I-AA instructions 8-bit octal bytes 16-bit octal words Odd addresses (i.e., upper bytes) can only be examined in BYTE mode. If you try to examine an odd address in INSTRU or WORD mode, an error message results. The SYMBOL and ABSOLU modes determine how the symbols you have defined in your program arc to be displayed. You will usually use SYMBOL and ABSOLU in conjunction with instruction disassembly (INSTRU) mode. If your program contains user-defined symbols (see Paragraph 4.13), these symbols will be displayed only if you are in SYMBOL mode. SYMBOL is one of the modes the DCTI I-EM is initialized to when you power up. If you want user-defined symbols to be displayed as octal values, type in the ABSOLU command to set the ABSOLU mode. Typing in SYMBOL restores the SYMBOL mode. Note that SYMBOL and ABSOLU are mutually exclusive. To summarize: Mode User-Defined Symbols Are Displayed As SYMBOL ABSOLU Symbols Octal values 4.9 EXAMINING MEMORY LOCATIONS This paragraph summarizes the commands with which you can examine memory locations. The examples in this paragraph are intended to give you a general idea of what to expect when you use these commands in different output formatting modes. One way to examine a memory location is to type in the desired memory location followed by a backslash. The general format for this command is: expression\ where the memory location you examine is determined by the value of the expression (see Paragraph 4.5). The backslash command also sets the address pointer, so a location examined with a backslash becomes the current open location. 4-7 Examining Memory Locations - Example l Use the backslash command to examine a memory location. Try this in different output formatting modes. You have not altered any memory locations from their initial (power-up) values. TEM> WORD TEM> 2000\ 002000: 000000 TEM> 100\ 000100: 135676 TEM> BYTE TEM> 100\ 000100: 276 TEM> INSTRU TEM> 140000\ 140000: JMP 155334 140004: TEM> Examining Memory Locations - Example 2 You use the backslash command to try to examine location I 00 I without first typing in the BYTE command. This causes an error message to be generated. TEM> INSTRU TEM> 1001\ 001001: \\\ ODD ADDRESS TEM> Another way to examine memory locations is to simply press the RETURN key. When you press the RETURN key as a command input, the result depends on both your output formatting mode and the value of the address pointer. If you are in INSTRU mode, RETURN displays the next eight instructions relative to the address pointer. In WORD mode, the contents of the next eight words relative to the address pointer are displayed. In BYTE mode, the contents of the next eight bytes relative to the address pointer are displayed. Note that the RETURN command is ignored when you are loading a program from a host computer (see Paragraph 4.17). 4-8 [umining Memory Locations - Example 3 You want to examine memory locations by pressing the RETURN key. You have not altered these locations since you have powered up. Start with location 1000. TEM> INSTRU TEM> 1000\ 001000: HALT 001002: TEM> 001000: HALT 001002: HALT 001004: HALT 001006: HALT 001010: HALT 001012: HALT 001014: HALT 001016: HALT 001020: TEM> WORD TEM> 001000: 000000 TEM> 001020: 000000 TEM> BYTE TEM> 001020: 000 TEM> 001030: 000 TEM> 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 A one-line string of bytes or words is numbered from left to right. 'ate that consecutive RETURN keypresses increment the address pointer but nonconsecutive ones do not. For example, in WORD mode you incremented the address pointer from 1000 to I 020 by pressing RETURN twice in a row. In BYTE mode you incremented the address pointer from I 020 to I 030 by pressing RETURN twice in a row. Pressing RETURN only once (as you did in INSTRU mode) had no effect on the address pointer. A way to examine a range of memory locations is to use the underscore(_) character. The general format for this command is: expression l_expression2 •here the beginning of the range is determined by the value of expression! and the end of the range is determined by the value of expression2. See Paragraph 4.5 for expression formats. E~pression I should be less than expression2. If it is not, only one location is displayed: the beginning of range location. · The use of the underscore command has no effect on the address pointer. 4-9 Examining Memory Locations - Example 4 You want to examine groups of memory locations by using the underscore command. Try this command in INSTRU, WORD, and BYTE modes. These memory locations have not been altered since you have powered up. TEM> INSTRU TEM> 2000\ 002000: HALT 002002: TEM> 1004_1012 001004: HALT 001006: HALT 001010: HALT 001012: HALT 001014: TEM> WORD TEM> 1002_1006 001002: 000000 TEM> BYTE TEM> 1005-1020 001005: 000 001015: 000 TEM> INSTRU TEM> 002000: HALT 002002: HALT 002004: HALT 002006: HALT 00201 0: HALT 002012: HALT 002014: HALT 002016: HALT 002020: TEM> 000000 000000 000 000 000 000 000 000 000 000 000 000 Notice that the address pointer value of 2000 which was set at the beginning of the example is still 2000 at the end of the example. 4.10 ALTERING MEMORY LOCATIONS You can deposit data into a memory location by setting the address pointer to the address of the location you wish to alter and typing in the information. The address pointer is automatically incremented as you deposit instructions and data to consecutive memory locations (as when you type in a program, for example). If you make an error during data entry, you can use the caret (I') command to decrement the address pointer and retype the input line. In INSTRU and WORD modes, the address pointer is decremented by one word for each caret command, and in BYTE mode it is decremented by one byte for each caret command. 4-10 Altering Memory Locations - Example 1 You type in a short program starting at address 1000. You make an error while typing in the program and use the caret (") command to help you correct the error. You then examine the program. The program adds R l to R2 and places the result in R3. The final line restarts the console monitor so that you will get a TEM> prompt after you execute the program. Comments TEM> INSTRU TEM> .=1000 TEM> MOY Rl,R3 TEM> ADD R2,R4 TEM>" TEM> ADD R2,R3 TEM> JMP @#140010 TEM> 1000\ 001000: MOY 001002: TEM> 001000: MOY 001002: ADD 001004: JMP 001010: HALT 001012: HALT 001014: HALT 001016: HALT 001020: 001022: TEM> ;you really wanted to type ADD R2,R3 ;decrement address pointer by one word ;type in correct line ;continue typing in program ;now examine your program Rl,R3 Rl,R3 R2,R3 @#140010 Altering Memory Locations - Example 2 You type in some data starting at location 2000. You type several values on a line, remembering to include separation characters (in this case, spaces) between them. You then examine the data you have typed in. Comments TEM> .=2000 TEM> I 2 3 4 TEM> .? 002010 TEM> .=2000 TEM> WORD TEM> ._.+10 002000: 000001 TEM> ;type in four data values ;the address pointer is incremented ;reinitialize the address pointer 000002 000003 ;examine the data 000004 000000 INSTRUCTION FORMAT This paragraph provides some guidelines for formatting instructions for input to the DCTI I-EM. A complete description of the instruction set is found in the DCTJ 1-AA User's Guide (EK-DCTH-UG). .f.11 An acceptable instruction consists of the instruction mnemonic followed by the appropriate string of operands (if any). A separation character (space, tab, feed) must be used to separate a mnemonic from its first operand (if any). A comma must appear between two operands in a two-operand instruction. Expressions can be used as operands, if desired. Refer to Paragraph 4.5 for expression formats. 4-11 If you wish, you may enter your instructions in octal format, rather than in assembly language format. Refer to Chapter 6 of the DCTI /-AA User's Guide for information on constructing octal equivalents of instructions. 4.12 TYPING ll'i A PROGRAM Set the address pointer to 2000 and type in the summation program from Paragraph 3.8 as shown below. TEM> .=2000 TEM> CLR RI TEM> CMP RO,R I TEM> BLE 2034 TEM> CLR @#2044 TEM> MOY R0,@#2044 TEM> DEC RO TEM> ADD R0,@#2044 TEM> BYS 2036 TEM> CMP RO,R l TEM> BGT 2016 TEM> HALT TEM> CLR RO TEM> CLR @#2044 TEM> HALT TEM> Now verify you have typed in the program correctly by setting the address pointer to 2000 and repeatedly pressing the RETURN key. If you are in JNSTRU mode, the following will be displayed. TEM> .=2000 TEM> 002000: CLR 002002: CMP 002004: BLE 002006: CLR 002012: MOY 002016: DEC 002020: ADD 002024: BYS 002026: TEM> 002026: CMP 002030: BGT 002032: HALT 002034: CLR 002036: CLR 002042: HALT 002044: HALT 002046: HALT 002050: TEM> RI RO,RI 002034 @#002044 R0,@#002044 RO R0,@#002044 002036 RO,Rl 002016 RO @#002044 The address pointer is automatically incremented each time you type in an instruction. 4-12 '\ ,..., may want to use symbolic names to represent values such as 2044 (the location of the accumulated ..ml to increase the readability of the program. The next few paragraphs tell you how to define and r..inipulate symbols. If ~ou want to execute the program and learn how to use the DCTI 1-EM's console debugging facilities, .t-·ance to Paragraph 4.14. ~13 USING SYMBOLS The OCT 11-EM allows you to define symbols in your programs. This paragraph describes the formats miuired for DCTI I-EM symbols and explains the use of the commands which allow you to define and -nipulate symbols. ~13.1 Symbol Names The following characters may be used in symbol names. A through Z 0 through 9 . (Period) $ (Dollar sign) A symbol name must not begin with 0 through 9, however. A symbol name may have any length; however, only the first six characters are stored by the DCTI I-EM. Thus. to avoid ambiguities, make the first six characters of your symbol names unique. The following predefined symbol names are reserved. RO RI R2 R3 R4 RS SP PC PS WP Bl B2 B3 B4 Register 0 Register I Register 2 Register 3 Register 4 Register 5 Stack pointer (register 6) Program counter (register 7) Processor status word Watchpoint address Address pointer Breakpoint I Breakpoint 2 Breakpoint 3 Breakpoint 4 These predefined symbols must not be used as user-defined symbol names, although they can be used as arguments in expressions, instructions, or commands. OCT! I-EM directives, commands, and OCT! I-AA instruction mnemonics (e.g., MOY, ADD, JMP) are also reserved and must not be used as symbol names. 4-13 4.13.2 Commands That Define And Manipulate Symbols There are two ways you can define a symbol. One way is to use the equal sign(=) to equate a symbol to a specific value. The general format of this is: symbol=expression where the value of the symbol is determined by the expression. The other way of defining a symbol is to use a colon (:). The colon defines a symbol as the label of the current address. The general format of this is: symbol: where the value of the symbol is defined as the value of the address pointer. Once you have defined a symbol, you cannot redefine it unless you first delete it. Symbol deletion is accomplished with the DELETE command. This command has the general format: DELETE symbol where the name of the symbol you wish to delete follows the command. The DELETE command causes the OCT 11-EM to display the symbol and its value as it performs the deletion. Predefined symbols (see Paragraph 4.13. I) cannot be deleted with the DELETE command. Predefined symbols can be redefined, however, by using the equal sign. When you define a symbol, it is stored in an area called the user symbol table. There is sufficient space in the user symbol table to store up to 66 symbols. If you try to define more than 66 symbols, you will cause an error message to be generated. If you want to display your user symbol table, type in the SHOWSY command. The symbols are displayed in the order in which you defined them, starting with the most recently defined symbol. If you want to delete your entire symbol table, type in the CLEAR command. The CLEAR command is typically used at the beginning of a long program or a program you are loading in from a host computer (see Paragraph 4.17). CLEAR gives the program plenty of room in the symbol table for symbols and avoids conflicts between symbol names in the program and any symbol names you may have previously defined. If you want to display the value of an individual symbol, type in the symbol followed by a question mark (?). The general format for this is: symbol? 4-14 Defining and Manipulating Symbols - Example I You set the address pointer to 1000 and define the symbols FIRST, SECOND, and THIRD. You experiment with displaying and deleting these symbols. TEM> CLEAR TEM> .=IOOO TEM> FIRST: TEM> SECOND=FIRST+IOO TEM> THIRD=SECOND+300 TEM> SHOWSY THIRD= 001400 SECOND= 001100 FIRST= 001000 TEM> DELETE FIRST FIRST= 001000 TEM> SHOWSY THIRD= 001400 SECOND= 001100 TEM> CLEAR TEM> SHOWSY TEM> SECOND is set equal to 1100 because FIRST equals 1000 at the time of definition. If you delete FIRST after you delete SECOND SECOND will be unaffected. 4.14 EXECUTING AND DEBUGGING PROGRAMS Refer to the summation program you typed in (Paragraph 4.12). You will make some minor changes to this program and use the DCTl 1-EM's debugging facilities to observe its operation. First, replace memory location numbers with symbolic names (see Paragraph 4.13). TEM> ILLIN=2034 TEM> SUM=2044 TEM> OVFL0=2036 TEM> LOOP=2016 TEM> Instead of having the program HALT when it completes execution (which returns control to the keypad), ~ou want it to restart the console monitor and give you a TEM> prompt. You do this by placing a JMP ~•140010 instruction at location 2032 which restarts the console monitor when executed. TEM> .=2032 TEM> JMP @#140010 TEM> 'ow set your initial conditions as follows. TEM> RO=lOO TEM> PC=2000 TEM> SP=6500 TEM> 4-15 Then execute the program by typing in the GO command. TEM> GO TEM> To check the result, examine SUM. TEM> SUM\ SUM : 004040 TEM> This is the correct sum in octal of the numbers from 0 to 100 (octal). 4.14.1 Using The Watchpoint The DCTl 1-EM recognizes WP as the symbol for the watchpoint. Set the watchpoint address by using the equal sign command. The general format for this is: WP=expression where the watchpoint address is determined by the value of the expression. For example, to monitor the accumulated sum in your program, set your watchpoint at the location SUM. TEM>WP=SLM TEM> Now reset your initial conditions (set RO= I 00) and execute the program. After you receive the TEM> prompt, use the SHOWRE command to examine your registers. TEM> SHOWRE RO = 000000 Rl = 000000 R2 = 000000 R3 = 000000 R4 = 000000 RS = 000000 SP = 006500 PC = 002000 PS = 000004 SUM : 004040 TEM> Notice your watchpoint appears as well. Another way to examine the watchpoint is to use the question mark command. WP? displays numerically the watchpoint address. [WP]? displays numerically the watchpoint contents. TEM> WP? 002044 TEM> [WP)? 004040 TEM> The watchpoint can be cleared by setting it to zero or by typing in the CANCEL command, which not only clears the watchpoint but the breakpoints as well. 4-16 4.14.2 Using the Single-Step Function Single stepping is accomplished by typing in the STEP command. STEP executes the instruction at the current PC and displays: (1) the new values of your registers and watchpoint, and (2) the next instruction to be executed. To experiment with the STEP command, reset the initial conditions for your program (set RO= I00) and type in STEP. You can then continue single stepping by repeatedly pressing the RETURN key. TEM> STEP RO = 000100 RI = 000000 R2 = 000000 R3 = 000000 R4 = 000000 R5 = 000000 SP = 006500 PC = 002002 PS = 000024 SUM : 004040 002002 : CMP RO,Rl 002004 : TEM> RO = 000100 RI = 000000 R2 = 000000 R3 = 000000 R4 = 000000 R5 = 000000 SP = 006500 PC = 002004 PS = 000020 SUM : 004040 002004 : BLE lLLIN 002006 : TEM> RO = 000100 RI = 000000 R2 = 000000 R3 = 000000 R4 = 000000 R5 = 000000 SP = 006500 PC = 002006 PS = 000020 SUM : 004040 002006 : CLR @#SUM 002012: TEM> RO = 000100 RI = 000000 R2 = 000000 R3 = 000000 R4 = 000000 RS = 000000 4-17 SP = 006500 PC = 002012 PS = 000024 SUM : 000000 002012 : MOY RO,@#SUM LOOP : TEM> RO = 000100 RI = 000000 R2 = 000000 R3 = 000000 R4 = 000000 R5 = 000000 SP = 006500 PC =LOOP PS = 000020 SUM : 000100 LOOP : DEC RO 002020: TEM> RO = 000077 RI = 000000 R2 = 000000 R3 = 000000 R4 = 000000 R5 = 000000 SP = 006500 PC = 002020 PS = 000020 SUM : 000100 002020 : ADD RO,@#SUM 002024 : TEM> RO = 000077 RI = 000000 R2 = 000000 R3 = 000000 R4 = 000000 R5 = 000000 SP = 006500 PC = 002024 PS = 000020 SUM : 000177 002024 : BYS OYFLO 002026 : TEM> The program is functioning properly; RO is getting decremented and added to SUM. 4-18 4.14.3 Using Breakpoints The use of breakpoints with a console terminal is similar to the use of breakpoints with the keypad (see Paragraph 3.8.2). The OCT! I-EM recognizes Bl, B2, BJ, and B4 as the symbols for the four breakpoints. Set a breakpoint ~ using the equal sign command. The general format for this is: breakpoint symbol=expression •here the breakpoint is determined by the value of the expression. f<lf' example, to set breakpoints at locations 2020 and 2024 in the summation program (as you did with the lt) pad), type in: TEM> Bl=2020 TEM> B2=2024 TEM> 'ow reset your initial conditions (set RO= 100, PC=2000) and execute the program. TEM> GO BREAK POINT ENCOUNTERED 002020: ADD RO,@#SUM 002024: TEM> You get a message which indicates that your first breakpoint (BI) was encountered by the console monitor. T.:i determine the current state of your program, type in the SHOWRE command. TEM> SHOWRE RO = 000077 Rl = 000000 R2 = 000000 R3 = 000000 R4 = 000000 RS = 000000 SP = 006500 PC = 002020 PS = 000000 SUM: 000100 TEM> 4-19 You sec that RO has been correctly decremented. When you type in GO again: TEM> GO BREAK POI!\T ENCOUNTERED 002024: BVS OVFLO 002026: TEM> the console message appears (this time because of B2), and you again examine the state of your program. TEM> SHOWRE RO = 000077 R 1 = 000000 R2 = 000000 R3 = 000000 R4 = 000000 RS = 000000 SP = 006500 PC = 002024 PS = 000000 SUM : 000177 TEM> You see that the first addition was performed correctly. You can continue to observe the operation of the program by typing in the GO and SHOWRE sequence as just shown. To examine a breakpoint, type in Bl?, B2?, B3?, or B4?. Breakpoints can be cleared by setting them to zero or by typing in the CANCEL command, which not only clears the breakpoints but the watchpoint as well. 4.15 DCTll-EM DIRECTIVES As a convenience for users who are familiar with assemblers (and in particular the PDP-11 MACR0-11 assembler), the OCT! I-EM recognizes several directives which arc similar to those used in the MACR011 language. These directives are listed in Table 4-2 with a brief explanation of their operation. For detailed information about how to use these directives in your programs, refer to the PDP-I I MACRO-I/ Language Reference Manual (AA-5075A-TC). 4-20 Table 4-2 DCTll-E'VI Directi•cs Directive Form Operation \SCI! /string/ Generates a block of data containing the ASCIJ equivalent of the character string (enclosed in delimiting characters). one character per byte. The delimiting characters i.:an be slashes or any other visible character. The ASCII code for each character is ~tared in successive bytes of me1nory starting at the location indicated by the current address pointer. The address pointer is advanced by the length (in characters) of the enclosed string. BLKB expr Reserves a block of storage space whose length in bytes is determined by the specified expression. The current address pointer is advanced by the value of the expression. BLKW expr Reserves a block of storage spa(.:e whose length in words is determined by the specified expression. The current address pointer is advanced by two ti1nes the value of the expression. BYTE exprl, expr2, • · • Generates successive bytes of data: each byte contains the value of the corresponding specified expression. The lower eight bits of each expression are stored in successive bytes of n1emory, starting at the location indicated by the current address pointer. The address pointer is advanced by the number of expressions given. The last expression must not be followed by a comma. Ensures that the current address pointer contains an even address by adding l if it is odd. •ORD exprl. cxpr2, · · Generates successive words of data; each word contains the value of the corresponding specified expression. The value of each expression ls stored in successive words of memory starting at the location indicated by the current address pointer. The addre::.s pointer is advanced by two times the number of expressions given. The last expre:'>sion 1nust not be followed by a co1nma. MISCELLANEOUS CONSOLE FUNCTIONS Tbc OCT! 1-EM has a HELP facility which displays all the commands available to you. To invoke this 4.16 b.ility, type in HELP. l ou can display the current operating modes of the DCT I I-EM by typing in the SHOWMO command. Tohen you first power up, typing in the SHOWMO command displays the default operating modes: PASS2 NOHOST INSTRU SYMBOL VTOFF Tbc operating modes that can be displayed are: PASSI, PASS2, HOST, NOHOST, INSTRU, WORD, 8'TE, SYMBOL, ABSOLU, VTON, and VTOFF. See the command summary in Paragraph 4.18 for "'1cf descriptions of these modes. The command summary also contains references to paragraphs that aplain the modes in detail. The OCT! I-EM has a REPEAT function which allows you to repeatedly input a line of commands or ..iructions. The form of this command is: REPEAT expression, input line 4-21 where the input line is executed the number of times specified by the value of the expression. One application of the REPEAT command is to fill memory. For example, the REPEAT 1000,NOP command will fill IOOO (octal) locations with NOP instructions. The REPEAT command also lets you single step without having to press the RETURN key repeatedly (see Paragraph 4.14.2). The REPEAT 7, STEP command, for example, single steps through your program seven times. Repeat Command - Example A third application of the REPEAT command is to move blocks of memory. You must specify the beginning and ending addresses of the range to be moved (the source range) and the beginning address of the destination range. The general format for a command sequence which moves a block of memory is: TEM> .=destination TEM> REPEAT <end-start>/2+1,[.+start-destination] where start and end are the beginning and ending addresses (respectively) of the source range, and destination is the beginning address of the destination range. Both ranges must begin at even addresses, and only words of memory can be transferred. For example, if you want to move the contents of locations IOOO through JOJO to 2030 through 2040, type in the following. TEM> .=2030 TEM> REPEAT <lOl0-1000>/2+1,[.+1000-2030] 4.17 LOADING THE DCTll-EM FROM A HOST COMPUTER This paragraph describes how to load information (usually a program) from a host computer into your DCTl I-EM. Two broad areas are covered. First, you are familiarized with the console monitor commands that initiate and control the host loading process. Second, you are shown how to prepare a DCTl 1-EM loadable program on your host. 4.17.t Configuring the DCrll-EM for Host Loading Since host loading is accomplished through the use of console monitor commands, you must have your DCTl 1-EM connected to a console terminal. Your host computer must have a serial communication line capable of sending data to the DCTI I-EM in ASCII text format. Connect the serial line from the host to the DCTJ 1-EM auxiliary serial port connector (J3) as shown in Figure 4-2. STANDARD 25-PIN CONNECTOR AND CABLE HOST COMPUTER CONSOLE TERMINAL ITTTTTl ~ 00000 ITIIID DODOO VT100 DODOO DODOO DCT11-EM """ 10254 Figure 4-2 Connecting a Host Co1nputer to the DCTI l-EM 4-22 No other wiring or jumpering is required. Set the baud rate of your console terminal equal to the baud rate of your host line. Use the OCT! I-EM keypad to set the same baud rate for the console serial port by activating function 3 as described in Paragraph 3.12.4. Also make sure you are set up to transmit and receive characters in the following format: asynchronous, ASCII, 8 bits (eighth bit is always space), no parity, one stop bit. You need not set the baud rate of the auxiliary serial port. When you communicate with a host, the DCTI I-EM automatically sets the baud rate of the auxiliary serial port equal to the baud rate of the console serial port. Activate function 2 as described m Paragraph 3.12.3 to start the console monitor. When the console displays a prompt, type in: TEM> HOST The HOST command places you in HOST mode and is a prerequisite for performing any operation with a host computer. HOST mode only allows you to receive messages from the host. If you want to communicate directly with the host, use the TALK command in addition to HOST. If you want to load information from the host, use the LOAD command in addition to HOST. The TALK and LOAD commands are explained in Paragraphs 4.17 .3 and 4.17.4. The NOHOST command cancels HOST mode. 4.17.2 The HOST Command Typing in the HOST command has two effects: 1. 2. It defines the auxiliary serial port as a host communication line. It creates an input buffer to hold information received from the host. A HOST> prompt precedes any messages you receive from your host while in HOST mode. Host Mode - Example You are in HOST mode and you receive a message from the host before you finish typing an input line. If you simply continue typing the line, the console monitor restores the interrupted line and appends your new material to it. Messages from the host are ignored as console input. Comments TEM> HOST TEM> MOY RO,R 1 TEM> MOY R HOST> This is a message from the host ... TEM> MOY RO,R2 TEM> :You were typing MOY RO.Rl ;You type O,R2 and the previous line is restored. 4.17.3 The TALK Command Typing in the TALK command allows you to communicate directly with the host just as if the DCTl 1EVI were not there. ll has the same effect as connecting the serial line from the host directly to your .:onsolc terminal. 4-23 Typically, you might use the TALK mode to prepare a DCT I I-EM loadable file with your host's editing facilities (sec Paragraph 4.17.5). The user LED is illuminated in TALK mode. There are two ways to cancel TALK mode. One way is to press the BREAK key on the console. The DCT I I-EM responds: CONSOLE BREAK TEM> and you not only cancel TALK mode but HOST mode as well. The other way is to type in CTRL/A. The DCT I I -EM responds: E (EXIT), R (RESU'v!E), B (SE"JD BREAK)," A (SEND "A)? If you type in the letter E, TALK mode is canceled but HOST mode is not. Note that typing in CTRL/ A ("A) in TALK mode gives you three other options. You can send a break or CTRL/ A character to the host by typing in B or CTRL/ A, respectively. Typing in an R or any characters other than E, B, or CTRL/ A, causes TALK mode to be resumed. 4.17.4 The LOAD Command Use the LOAD command only after you have prepared a DCTI I-EM loadable program on your host as explained in Paragraph 4.17 .5. Typing in the LOAD command allows you to communicate directly with the host just as the TALK command does. In LOAD mode, however, the DCTl 1-EM constantly monitors the characters received from the host and begins loading if it sees the .ST ART directive. To initiate host loading while in LOAD mode, therefore, simply enter a command (which depends on the particular host you are using) that types out your program on the console terminal. For example, if you were using a VAX/VMS host, you would use TYPE PROG.TXT to type out the file PROG.TXT on your terminal. Since your DCTl 1-EM loadable program always has the .START directive as its first line, typing the program causes the DCTl 1-EM to start loading. NOTE During the loading process, the DCT 11-EM accepts input from both serial ports simultaneously. As a rule, do not press keys on the console terminal during loading since this interferes with your host's input. The only exception to this rule is the use of the CTRL/O command (see below). Once loading begins, it continues until the .END directive is received or until an error in the incoming program is detected. In both cases, when loading stops, you are returned to HOST mode. If loading stops as a result of an error in your program, the portion of the program that follows the error will be displayed on your console terminal as a "message" from the host. If loading is terminated by an error in your program, you can suppress further display of the program by typing in the CTRL/O command. CTRL/O causes the OCT! I-EM to ignore messages from the host until you press the RETURN key. If you want to terminate output from the host, enter CTRL/O followed by the TALK command followed by the appropriate interrupt control sequence your host recognizes (such as CTRL/Y or CTRL/C). 4-24 Note that the user LED is illuminated in LOAD mode. Also note that pressing BREAK or typing in CTRL/ A has the same effect in LOAD mode as in TALK mode. 4.17.5 Preparing DCTll-EM Loadable Programs on a Host In general, you will find it convenient to use your host's editing facilities to create programs. This is particularly true if the programs are long or require extensive alteration. Jn order to prepare a program the OCT! I-EM will accept, keep the following in mind. Make sure the .START directive precedes your program. The DCTI I-EM will not be able to load your program unless it first sees the .START directive. Next, realize that when your program is loaded into the DCTI I-EM, the DCTI I-EM will behave as if each line of your program were being entered by you directly from the console terminal. This means that the rules and conventions of console monitor input apply also to each line of the program you create on your host. The one exception is that the null line command (i.e., pressing RETURN to examine successive memory locations) is disabled during host loading. If your program contains undefined symbols or expressions (for example, a "forward reference"), prepare your program as two identical segments. Precede the first segment with the PASSI command and the second segment with the PASS2 command. The idea behind the PASSI and PASS2 commands is as follows. Normally, the DCTI I-EM does not allow you to input undefined symbols. This mode of operation is called the PASS2 mode (PASS2 is one of the power-up default modes of the DCTI I-EM). The use of undefined symbols in your programs, however, is commonly desirable. for example, consider the following program segment. CMP #177700,Rl BNE .+14 INC R2 CMP R2,#200 BL0.+4 CLR R2 MOY R2,R3 In this example, you are branching to a defined location (i.e., the location that contains the MOY R2,R3 instruction), but are doing so in a cumbersome way. You need to perform a calculation for each branching instruction. An easier way to write this program segment would be: CMP # 177700,R I BNE THERE INC R2 CMP R2,#200 BLO THERE CLR R2 THERE: MOY R2,R3 But if the OCT! I-EM is in a mode in which it rejects undefined symbols, an error results when you try to input BNE THERE. The DCTI I-EM solves this problem by having a mode of operation in which undefined symbols are tolerated called the PASS I mode. 4-25 In the PASSI mode, the DCTI I-EM substitutes the value zero for each undefined symbol encountered in expressions except when the undefined symbol is the operand of a branch instruction. In that case, the value of the current address pointer is substituted for the value of the branch operand. If an undefined symbol is later defined through the use of an equal sign(=) or colon(:), the symbol is entered into the symbol table with its proper value. NOTE Undefined expressions involving the address pointer are never tolerated, not even in PASSI. For example if A, B, and C are undefined, the following are unacceptable: .=A .BLKB B .BLKW C Make sure the .END directive terminates your program. A DCTII-EM Loadable Program - Example 1 Use your host's editing facilities to create the summation program presented in Paragraph 3.8. Comments from the original program are shown in lowercase, and comments added for the benefit of the example are shown in uppercase. .START '= 2000 CLR Rl CMP RO,RI BLE 2034 CLR @#2044 MOY R0,@#2044 DEC RO ADD R0,@#2044 BYS 2036 CMP RO,RI BGT 2016 HALT CLR RO CLR @#2044 HALT .END ;THIS LINE MUST APPEAR FIRST. ;ENTER THE PROGRAM STARTING AT LOCATION 2000. ;Set RI = 0. ;RO contains n. ;Illegal input (n < ;No, start operation by clearing 2044. ;Place first value of n in 2044. ;n = n-1 ;Add next value (n-1) to 2044. ;Overflow? ;No. ;Continue operation if n > 0. ;Operation complete if n = 0. ;Yes, illegal input. Clear RO, 2044. ;Yes, overflow. Clear 2044 only. ;Illegal input or overflow occurred. ;STOP HOST LOADING . or 4-26 A DCTll-EM Loadable Program - Example 2 In this example, the summation program above is changed slightly such that forward references to the symbols ILLIN and OVFLO are made. Since these symbols are undefined when first referenced, you must create the program in two segments to make it acceptable to the DCTJ I-EM . .START CLEAR PASSI ' = 2000 BEGIN: LOOP: ILLIN: OVFLO: CLR RI CMP RO,RI BLE ILLIN CLR @#2044 MOY R0,@#2044 DEC RO ADD R0,@#2044 BYS OVFLO CMP RO,RI BGT LOOP HALT CLR RO CLR @#2044 HALT PASS2 '= 2000 BEGIN: LOOP: ILLIN: OVFLO: .END CLR RI CMP RO,RI BLE ILLIN CLR @#2044 MOY R0,@#2044 DEC RO ADD R0,@;#2044 BYS OVFLO CMP RO,RI BGT LOOP HALT CLR RO CLR @;#2044 HALT ;THIS LINE MUST APPEAR FIRST. ;DELETE ALL PREVIOUSLY DEFINED ;SYMBOLS. ;PERFORM FIRST PASS INPUT OF PROGRAM. ;ALLOW UNDEFINED SYMBOLS AND SET ;THEIR VALUES TO ZERO. ;INPUT THE PROGRAM STARTING AT ;LOCATION 2000. ;Set RI = 0. ;RO contains n. ;Illegal input (n < O)? ;No, start operation by clearing 2044. ;Place first value of n in 2044. ;n = n-1 ;Add next value (n-1) to 2044. ;Overflow? ;No. ;Continue operation if n > 0. ;Operation complete if n = 0. ;Yes, illegal input. Clear RO, 2044. ;Yes, overflow. Clear 2044 only. ;Illegal input or overflow occurred. ;PERFORM SECOND PASS ENTRY OF ;PROGRAM. ;SYMBOLS ARE NO LONGER UNDEFINED AND ;ARE ASSIGNED CORRECT VALUES. ;UNRESOLVED ADDRESSES ARE RESOLVED. ;INPUT THE PROGRAM AGAIN STARTING AT ;LOCATION 2000. ;Set RI = 0. ;RO contains n. ;Illegal input (n < O)? ;No, start operation by clearing 2044. ;Place first value of n in 2044. ;n = n-1 ;Add next value (n-1) to 2044. ;Overflow? ;No. ;Continue operation if n > 0. ;Operation complete if n = 0. ;Yes, illegal input. Clear RO, 2044. ;Yes, overflow. Clear 2044 only. ;Illegal input or overflow occurred. ;STOP HOST LOADING . 4-27 4.17.6 An Illustration of the Host Loading Process This paragraph steps you through a session with the DCTl I-EM during which you load the summation program you created on your host (see example I, Paragraph 4. I 7.5). Assuming you are in NOHOST mode, the first step is to get into LOAD mode by typing in: TEM> HOST LOAD Press RETURN until your host responds with its usual prompting character(s). Then direct your host to type or otherwise display on the console terminal the program you wish to load. This command might be in the form: TYPE SUMM where TYPE is the the command your host recognizes to display the program and SUMM is the name you gave the program. When the host starts typing the program, the following appears on your console terminal. (This program does not contain any undefined symbols and requires only one pass.) .START TFM> :THIS LINE MUST APPEAR FIRST. TEM> Cl.EAR :DELETE ALL PREYIOUSL Y DEFINED TF\1> :SYMBOLS. TEM>. = 2000 :ENTER THE PROGRAM STARTING AT TE\1> :LOCATION 2000. TF\1>CLRR1 :Set RI = 0. TE\1> CMP RO.RI :RO contains n. TE'vf> Bl.E 2034 :Illegal input (n < 0)'' TE\1> CLR 0#2044 :No, start operation by clearing 2044. TEM> MOY R0.~,#2044 :Place first value of n in 2044. TEM> DEC RO :n = n-1 :Add next value (n-1) to 2044. TEM> ADD R0.~,#2044 TEM> BYS 2036 :Overnow'' TEM> CMP RO.RI :No. TEM> BGT 2016 :Continue operation if n > 0. TFM> !!ALT :Operation complete if n = 0. TEM> CLR RO :Yes, illegal input. Clear RO, 2044. TEM> CLR 0 #2044 ;Yes, overflow. Clear 2044 only. TEM> HALT :Illegal input or overflow occurred. TEM> .E'\D :STOP HOST LOADING. HOST> <your host's prompt appears on the last line> The DCT I I-EM successfully loaded your program and you are now back in HOST mode. The console monitor can now respond to your input. If you type in 2000, you can examine the program you just loaded by pressing RETURN repeatedly. 4-28 If your program is successfully being loaded into the OCT! I-EM, each line is preceded by the TEM> prompt. If a program line causes a console error message, loading stops but typing continues (without the TEM> prompt). 4.18 CONSOLE COMMAND SUMMARY General Form Operation ex pr Deposit the expression in RAM unless the expression is part of another command. Advance the address pointer accordingly. instr Assemble and deposit the instruction at the location indicated by the address pointer. Advance the address pointer accordingly. exprl_expr2 Display the contents of the locations from ex pr l through expr2. If ex pr 1 is greater than expr2, only exprl contents displayed. ex pr? Display numerically the value of the expression. ex pr\ Set the address pointer to the value of the expression. Display the contents of the location specified by the expression. null line Display, relative to the address pointer, the next eight instructions if in INSTRU mode, the next eight words if in WORD mode, or the next eight bytes if in BYTE mode. If single stepping, single step again. sym bol~expr Define the symbol to be equal to the expression. symbol: Define the symbol to be equal to the current value of the address pointer. Decrement the address pointer by one byte if you are in BYTE mode or by one word if you arc in WORD or INSTRU mode. Form Paragraph Reference ABSOLU 4.8.2 Sets the ABSOLU mode. Causes user-defined symbols in programs to be displayed as numeric values. .ASCII /string/ 4.15 Generates a block of data containing the ASCII equivalent of the character string (enclosed in delimiting characters), one character per byte. .BLKB expr 4.15 Reserves a block of storage space whose length in bytes is determined by the specified expression. .BLKW expr 4.15 Reserves a block of storage space whose length in words is determined by the specified expression. Operation 4-29 .BYTE expr I, expr2, ... 4.15 Generates successive bytes of data; each byte contains the value of the corresponding specified expression. BYTE 4.8.2 Sets the BYTE mode for memory examination and alteration operations. Causes memory to be displayed as three digit bytes. CANCEL 4.14.1 4.14.3 Clears all four breakpoints and the watchpoint. CLEAR 4.13.2 Clears the user symbol table. DELETE symbol 4.13.2 Deletes user-defined symbol from the user symbol table. .END 4.17.4 Used at the end of programs that are to be loaded into the DCTI 1-EM from a host. Causes the DCT! I-EM to terminate host loading if in LOAD mode . .EVEN 4.15 Ensures that the current address pointer contains an even address by adding I if it is odd. EXIT 4.2 Transfers console control to the keypad. GO 4.14 Executes the user program at the current PC value. HELP 4.16 Displays a table of commands. HOST 4.17. l Sets the HOST mode. Allows the DCTI I-EM to receive messages from a host. INSTRU 4.8.2 Sets the JNSTRU mode. Data is displayed as DCTI I-AA assembly language instructions. Is set by default when the DCT 11-EM is powered up. LOAD 4.17 .! Sets the LOAD mode. Establishes host communication. Allows the DCTl I-EM to begin loading if it encounters the .START command. NO HOST 4.17. l Clears the HOST mode. Is set by default when the DCTI I-EM is powered up. PASSI 4.17.5 Sets the PASS I mode. Allows the use of undefined symbols. PASS2 4.17.5 Sets the PASS2 mode. Requires all symbols to be defined. ls set by default when the DCTI I-EM is powered up. 4-30 REPEAT expr,cmd 4.16 Repeatedly performs the specified command(s) by the number of times specified by the expression. SHOW MO 4.16 Displays the current operating modes of the DCTJ 1-EM. SHOW RE 4.6 Displays the contents of user registers and the watchpoint if the watchpoint is set. SHOWSY 4.13.2 Displays the contents of the user symbol table. START 4.17.5 Used at the beginning of programs that are to be loaded into the DCTl I-EM from a host. Causes the DCTI 1-EM to start host loading if in LOAD mode. STEP 4.14.2 Executes one instruction of a user program at the current value of the PC. Displays the contents of user registers and the watchpoint if the watchpoint is set. Displays the next instruction to be executed. SYMBOL 4.8.2 Sets the SYMBOL mode. Causes user-defined symbols in programs to be displayed as symbols rather than as numeric values. ls set by default when the DCTI I-EM is powered up. TALK 4.17.1 Sets the TALK mode. Establishes host communication. Allows you to communicate directly with a host as if the DCT I I-EM were not there. Typically used for program development on a host. \TOFF 4.3 Sets the VTOFF mode. Causes deleted characters to be echoed (preceded by a slash) on the console terminal when you press the DELETE key. ls set by default when the DCT 1I -EM is powered up. \TON 4.3 Sets the VTON mode. Characters you delete by pressing the DELETE key are not echoed in this mode. Typically used if you have a video terminal for a console . .WORD exprl, expr2, ... 4.15 Generates successive words of data; each word contains the value of the corresponding specified expression. 4-31 4.19 CONTROL COMMAND SUMMARY Command Meaning Typical Use CTRL/U CTRL/X Delete line. You made several typing errors in your input line. You want to cancel the line and try again. CTRL/R Display line. You used the DELETE key several times while typing your input line. You want to see a clean version of the line you are editing. CTRL/S Suspend execution. You want to suspend the operation of the console monitor or the execution of a currently running program. CTRL/Q Resume execution. You have previously used the CTRL/S command and want to resume operation. CTRL/C Abort operation. You want to abort the current CTRL/Y operation of the DCT 11-EM and input a new line. CTRL/O Ignore host message. You are in HOST mode (sec Paragraph 4.17.1) and want to ignore information currently being sent by your host computer. CTRL/A Select option. You are in TALK or LOAD modes (see Paragraphs 4.1 7 .3 and 4.17.4) and want to select one of these four options: exit, resume, send break, send CTRL/ A. 4-32 CHAPTERS SOFTWARE S.l INTRODUCTION This chapter provides some information about the DCTI I-EM monitor and introduces you to monitor subroutines you can use in your programs. The chapter also describes how address space is allocated in the DCTI I-EM and shows you which areas are available and unavailable for use. This material is summary in nature. More detailed information can be found in the OCT 11-EM monitor listing (see Appendix A) and in the DCTI I-EM schematics (see Appendix 8). 5.2 THE MONITOR The monitor is a PROM resident program that controls the operation of the DCTI I-EM. Its main purpose is to provide an environment in which you can develop and run programs. The portion of the monitor that allows you to operate the DCTl 1-EM with the keypad is called the keypad monitor and the portion that lets you use a console terminal is called the console monitor. When you learned how to operate the DCTI I-EM with the keypad and console in Chapters 3 and 4, you were really learning how to get the monitor to do things for you. When you execute a program, the monitor relinquishes control of the DCTI I-EM to your program. Control is returned to the monitor (i.e., the monitor is restarted) by any of the following ways: I. 2. 3. 4. 5. 6. 7. 8. Pressing the HALT switch Executing a HALT instruction Encountering a breakpoint or executing a BPT instruction Attempting to execute an illegal instruction Performing a single step Sending a BREAK from a console terminal Executing a JMP @# 1400 I 0 instruction Sending a CTRL/C or CTRL/Y command from a console terminal The first two ways (I and 2) always return control to the keypad monitor. The remaining ways (3 through 8) return control to the keypad monitor if you are using the keypad or the console monitor if you are using a console terminal. When control is returned to the keypad monitor, the PC is displayed on the LEDs and you are in register mode. (If a flashing error message appears on the LEDs, press the HALT switch or any key to display the PC.) When control is returned to the console monitor, a TEM> prompt is displayed on your console terminal. Refer to Appendix A for details about how the HALT and BPT instructions interact with the monitor. Also refer to Appendix A for information on the effects of setting the T-bit. 5-1 When you return control to the monitor, the DCTJ 1-EM registers contain the values they had at the time your program slopped with the following exceptions. I. If you execute a JMP @#140010 instruction, the PC is restored to the value it had when your program started. This allows easy restarting of the program. 2. If you type CTRL/C or CTRL/Y from a console terminal, all the DCTI 1-EM registers are restored to the values they had when your program started. 3. If you encounter a breakpoint, the stack pointer is set to the value it had just before the break point occurred. 5.2.1 The Stack Pointer The monitor initializes your stack pointer to 7400 when you power up. The monitor also checks to make sure your stack pointer is in the range 4 through 7400, inclusive (for the keypad monitor), or 4 through 6500, inclusive (for the console monitor), before it allows your program to execute. It is up to you, however, to make sure the stack pointer has a reasonable value before you attempt to run a program. For example, it is a good idea to make sure your stack pointer and the information you push onto the stack do not overlap your program. To decrease the chance of this happening, set the stack pointer well above the area in which your program resides. 5.3 MONITOR SUBROUTINES Several portions of the DCTI I-EM monitor arc accessible to your programs as subroutines. If you want to use one of these subroutines in your program, simply include a JSR instruction in the form: JSR PC,@#subroutinc where subroutine refers to the address of the desired subroutine. Subroutine mnemonics arc defined within the monitor only, so make sure your program defines these mnemonics before it uses them as symbols. 5.3. I Key1>ad/LED Subroutines Address Mnemonic Descri1>tion 140014 DGDISP Display Hex Digit Takes the value contained in the lower four bits of RO and displays it as a hexadecimal number on the LED digit indexed by RI. Values of RI correspond to LED digits as follows. Uses RO and Rl . .3 l 1 07 05 03 01 ., 10 06 04 07 00 5-2 Address Mnemonic Description 140020 UPDISP Display Octal Number on Upper LEDs Takes the value in R2 and displays it as a six-digit octal number on the upper row of LEDs. Uses RO and RI. 140024 LODISP Display Octal Number on Lower LEDs Takes the value in R2 and displays it as a six-digit octal number on the lower row of LEDs. Uses RO and RI. 140030 DECDSP Display Decimal Number Takes the value in R 1 and displays it as a five-digit decimal number on the row of LEDs indexed by R2. R2 = 12 for the lower row, R2 = 13 for the upper row. Uses RO, RI, R2, and R3. 140034 UPBLNK Clear Upper Row Blanks out the upper row of LEDs. Uses RO and RI. 140040 LOBLNK Clear Lower Row Blanks out the lower row of LEDs. Uses RO and R 1. 140044 GETKEY Get Key Number Turns on LEDs and waits for a keypress. When a keypress occurs, takes the number of the key and stores it in RI. Keys are numbered as follows. BGGDG BGDGD 8GDGCJ GBGDG 140050 BCDKEY Convert Key Number to BCD Takes the key number in RI and converts it to a BCD value for the keys 0 through 9. Returns 12 for the CLR key and 13 for the EXA key. Returns -I (i.e., 177777) for any other key. Stores the result in RI. 5-3 Address Mnemonic Description 140054 GETNUM Input Number From Keypad Displays the value in R2 as a six-digit octal number on the lower row of LEDs. Enables the user to modify the value of R2 using keys 0 through 7 and CLR. Stores modified value in R2 when the EXA key is pressed. Uses RO, RI, and R2. 5.3.1.l Using the LEDs and Keypad - This paragraph contains some information you may find useful when writing programs that use the LEDs and keypad. This is intended as introductory material only. For further detail, refer to the monitor listing in Appendix A and the DCTI I-EM schematics in Appendix B. You can create your own characters to display on the LED digits. First, form bytes that represent the segment patterns of the characters you wish to display as shown in Figure 5-1. ·/ dp• ,, 0 ,I "I, dp g ' d b Mfl-10348 d Figure 5-1 LED Segment Assignments For example, 011 l 0 I 00 (or 164 octal) corresponds to the letter h and 0I001111 (or I I 7 octal) corresponds to the numeral 3. Then, move the bytes containing the segment patterns to locations 7712 through 7725. These locations (collectively called SEGBUF) are used by the LED interrupt service routine in the monitor to display segment patterns on the LEDs. Each location (byte) corresponds to an LED digit as shown in Figure 5-2. UPPER ROW OF 77'25 7723 7721 771 7 7715 7713 Ll:LJS LOVVER ROW OF LEDS Figure 5-2 7 724 7722 7!20 7716 7714 7717 SEGBUF Assignments For example, if you moved 164 (octal) to location 7721, 117 (octal) to location 7717, and 0 to all the other SEGBUF locations. you would display h3 centered in the upper row of LEDs. Finally, turn on the LEDs by writing 000007 to port C of the 8255A parallel port chip (address 177444). Make sure your program keeps the LEDs on long enough for you to see them. One way of leaving the LEDs on is to incorporate one or more delay loops in your program of the form: CLR RS SOB RS,. 5-4 The LED interrupt (INTA) is disabled (i.e., the LEDS arc turned off) by writing 0000 I 0 to port C of the 8255A chip. This also disables the user LED. To turn on the user LED (which, incidentally, also disables the LED digits), write 00001 l to port C of the 8255A chip. Examples of displaying values on the LEDs are provided in Paragraph 5.3.1.2. You can also create your own interrupt service routines to respond to keypresses. When a key is pressed, program control is transfered to the routine pointed to by 7676. If 7676 is zero, keypresses are ignored. The number of the key pressed is available to your routine through RI. See the description of the GETKEY subroutine in Paragraph 5.3. l for key numbers. In order for a keypress to be sensed, the LEDs must be enabled. This can be done by writing 000007 to location 177 444 as explained above or by executing your program from the keypad with the "Go With LEDs" special function (see Paragraph 3.12.2). At the end of your keypress service routine, include the sequence: MOY (SP)+,R2 MOY (SP)+,Rl MOY (SP)+,RO RTJ to restore the state of your interrupted program. As an example, here is a program which loops on itself and increments R3 each time a key is pressed. To check the operation of the program, start it at location 1000 and press keys. Press HALT and examine R3. Address Data 1000 1002 1004 1006 1010 1012 1014 1500 1502 1504 1506 1510 012737 000007 177444 012737 001500 007676 000774 005203 012602 012601 012600 000002 Symbolic Representation Comments MOY #7,@#177444 ;enable keypad MOY #1500,@#7676 ;attach interrupt routine BR 1006 INC R3 MOY (SP)+,R2 MOY (SP)+,R I MOY (SP)+,RO RT! ;loop infinitely ;interrupt service routine 5.3.1.2 Using Keypad/LED Subroutines - Example Programs - The following examples show you how to use keypad/LED subroutines. Example 1 - Countdown Program This program decrements a number at a rate inversely proportional to the number's size. The program begins by displaying the word "EntEr" on the upper row of LEDs. You enter a number (which is displayed on the lower row of LEDs) and press the EXA key. The number is displayed as it is decremented. The program initializes itself at the end to allow you to enter another number. There are undefined symbols in this program, so if you enter the symbolic version via the console terminal, make sure you incorporate the PASSI and PASS2 commands as described in Paragraph 4.17.5. 5-5 Address Data 1000 1002 1004 1006 1010 1012 1014 012701 007713 012700 000006 116021 001063 005201 1016 077004 1020 1022 1024 1026 1030 1032 1034 1036 1040 1042 1044 1046 1050 004737 140054 005702 001774 012701 000003 004767 000012 077103 005302 004737 140024 000765 TEST: Symbolic Representation Comments SEGBUF = 7712 LODISP = I 40024 GETNUM = 140054 ;LED segment buffer ;octal number on lower LEDs ;input number from keypad . = 1000 ;position program at location ;1000 MOY #SEGBUF+l,Rl ;point to rightmost ;digit of upper row of LEDs ;set digit count = six digits MOY #6,RO TEST!: MOYB ENTER-l(RO),(Rl)+ TEST4: TST R2 BEQ TEST2 MOY #3,Rl TEST3: JSR PC,DELA Y ;transfer character to ;digit in upper row of LEDs ;advance pointer to next ;digit in upper row of LEDs ;loop to transfer all six ;characters ;input an octal number from ;the keypad ;reject zero as an input ;if zero, get a new number ;call delay routine three ;times ;wait a while SOB Rl,TEST3 DEC R2 JSR PC,@#LODISP ;decrement entered number ;display new value BR TEST4 ;see if we have zero yet INC Rl SOB RO,TESTl TEST2: JSR PC,@#GETNUM ;DELAY loops a number of times inversely proportional to the size ;of R2. Thus there is a smaller delay when R2 is large. 1052 1054 1056 1060 012700 177777 160200 103376 1062 000207 DELAY: MOY #-1,RO ;set dividend DELAY I: SUB R2,RO BCC DELAY! ;divide by successive ;subtraction; keep ;subtracting until ;underflow occurs RTS PC ; ENTER is a list of bytes corresponding to the segment patterns ; .. EntEr". 1064 1066 1070 052171 074570 000120 ENTER: .BYTE 171,124,170,171,120,0 5-6 Example 2 - Clock Program This program displays a minutes and seconds clock on the lower row of LEDs. The values for minutes and seconds are obtained from a timer maintained by the monitor. You can use the INT switch to set minutes. Note that the upper row of LEDs and the left-most digit of the lower row display the current contents of the LED segment buffer for those digits. All symbols referenced in this program are defined. The symbolic version of the program will run if entered as follows. As an exercise, try to modify the program so that the upper row of LEDs and the leftmost digit of the lower row of LEDs arc blank when the program is running. Address Data Symbolic Representation Comments PFVEC = 24 = 7730 TIME SEGBUF = 7712 MI NUTS = 776 140030 DECDSP P$PORC = l 77444 SETIME = 1200 ;INT switch vector ;upper six bits count seconds ;LED segment buffer ;location to hold minutes count ;display decimal number ;LED/keypad 1/0 port on 8255A ;subroutine to set minutes 1000 1000 1002 1004 1006 1010 1012 1014 1016 1020 1022 1024 1026 1030 1032 1034 1036 1040 1042 1044 1046 1050 1052 1054 1056 1060 1062 1064 1066 1070 1072 1074 012706 006500 106427 000000 012737 001200 000024 005037 007730 005067 l 77750 112737 000007 177444 032737 001000 007730 001774 032737 001000 007730 001374 013701 007730 000301 006201 006201 042701 177700 001010 005267 ;position program at loc. I 000 MOV #6500,SP ;initialize stack pointer MTPS #0 ;sci low priority MOV #SETIME,@#PFVEC ;connect minute set ;routine to INT switch CLR @#TIME CLR MINUTS ;clear seconds and second ;fractions ;clear minutes MOVB #7,@#P$PORC ;turn on LEDS LOOP: BIT #I 000,@#T!ME ;wait for seconds to ;change LOOP!: BEQ LOOP BIT #1000,@#TIME CLOCK: BNE LOOP! SHOWIT: MOV @#TIME,R I SWAB ASR ASR BIC RI RI RI #177700,Rl BNE INC .+22 Ml NUTS 5-7 ;show time ;get seconds ;mask out fractions of ;seconds ;not a new minute (BN E CLK I) ;else count minutes Address Data 1076 1100 1102 1104 1106 1110 1112 1114 1116 1120 1122 1124 1126 1130 1132 1134 1136 1140 1142 1144 1146 1150 1152 1154 1156 1160 177676 026727 177672 000074 103402 005067 177662 016702 177656 012700 000003 006302 010246 006302 006302 062602 077006 060201 012702 000010 004767 136656 112737 000100 007716 000725 CLKI: LOOP2: Symbolic Representation Comments CMP ;overflow? MINUTS,#60. BLO .+6 CLR MINUTS ;no (BLO CLKI) MOV MINUTS,R2 ;get minutes MOV #3,RO ;shift minutes over three ;digits ;multiply R2 by I 0 to shift ;one decimal digit to the left ASL R2 MOV R2,-(SP) ASL R2 ASL R2 ADD (SP)+,R2 SOB R0,LOOP2 ADD R2,Rl MOV #IO.R2 ;loop three times to make X 1000 ;add minutes to seconds ;index lower display JSR PC,@#DECDSP ;display time MOVB #100,@#SEGBUF+4 ;display dash between ;minutes and seconds BR LOOP = 1200 005037 007730 012706 006500 106427 000000 000717 1200 1202 1204 1206 1210 1212 1214 SETIME: CLR @#TIME ;reset seconds to increment ;minutes MOV #6500,SP ;reinitialize stack MTPS #0 ;reinitialize priority BR SHOWIT ;display new time As an exercise, try to modify the program so that the upper row of LEDs and the left-most digit of the lower row of LEDs are blank when the program is running. 5.3.2 Console Subroutines Address Mnemonic Description 140060 GETLIN Get Input Line Types an angle bracket and space (> ) as prompting characters and awaits input from the console terminal. Echoes characters as they are typed in. Stores these characters (up to 96 per line) in a character buffer. Uses RO, R3. 5-8 Address Mnemonic Description 140070 GETCH Get Character Retrieves the character indexed by R 3 from the character buffer. R3 must have a value from 0 to 137 octal (95 decimal). Stores the character in the lower byte of RO and increments R3. Lowercase characters are converted to uppercase. Sets the N condition code bit if the character is a separator (space, tab, feed). Sets the C condition code bit if the character has been converted from lowercase to uppercase. Uses RO, R3. 140100 GETCHC Get Character, Preserve Case Retrieves a character with its case intact from the character buffer. Uses R3 as an index to the character. R3 must have a value from 0 to 137 octal (95 decimal). Stores the character in the lower byte of RO and increments R3. Uses RO, R3. 140104 GETNXT Get Character, Ignore Separators Retrieves the next character in the character buffer which is not a separator (space, tab, feed). Uses R3 as a starting point index. R3 must have a value from 0 to 137 octal (95 decimal). Stores the character in the lower byte of RO and increments R3 in accordance with the number of separators encountered. Lowercase characters are converted to uppercase. Sets the C condition code bit if a character has been converted from lowercase to uppercase. Uses RO, R3. 140120 CRLF Type Carriage Return, Line Feed Types a carriage return and line feed on the console. 140124 CH ROUT Type One or Two ASCII Characters Takes the value in the lower byte of RO and types it as an ASCII character on the console. If the upper byte of RO has a nonzero value, it is also typed as an ASCII character on the console. Uses RO. 140134 CHR02 Send Byte to Auxiliary Port Takes the value in the lower byte of RO and sends it to the auxiliary serial port. Uses RO. 140140 A SCOUT Type One ASCII Character or String Takes the value in the lower byte of RO and types it on the console either as an ASCII character or as an ASCII string of characters. ASCII strings that can be typed include <ESC>, <SP>, <DEL>, and /\A through/\_ where the caret denotes a control character. Uses RO. 140144 PRINTA Type ASCII String Takes a string of bytes starting at the location pointed to by RI and types them on the console as ASCII characters until until a byte whose value is zero is is encountered. Uses RO, R 1. 5-9 Address Mnemonic Description 140160 TYPOCT Type Octal Number Types the value in RI on the console as a six-digit octal number if in the INSTRU or WORD output formatting modes. Types the lower byte of RI on the console as a three-digit octal number if in BYTE mode. Uses RO, RI. 140164 TYPDEC Type Decimal Number Types the value in R l on the console as a signed five-digit decimal number followed by a period. Uses RO, RI. 5.3.2.1 Console Character Manipulation - The console subroutines just described provide most of the functions you will require to manipulate characters via the console. If you require other functions, refer to the monitor listing in Appendix A. Keep the following in mind when using the GETCH, GETCHC, and GETNXT subroutines. When you use these subroutines, characters you input via the console terminal are stored in a 96-character buffer maintained by the monitor called BUFFER. All three subroutines use R3 as a pointer to determine which character within BUFFER is retrieved. Since BUFFER is 96 characters in length, R3 can have a value from 0 through 137 (octal), inclusive. For your convenience, the subroutines automatically increment R3 to point to the next character to be retrieved. 5.3.2.2 Using Console Subroutines - Sample Program , ; NIM for the TEM , ; In this version of NIM, there are 21 sticks. The game requires 2 ;players (the user and the TEM). The players take turns picking up ; 1, 2, or 3 sticks. The object of the game is to leave 1 stick for ;the other player to pick up in the last turn. The algorithm used ;by the TEM ensures that it will win if it goes second, or if it goes ;first and the other player leaves it an opportunity to win. ; Operation of the game is explained by prompts. All responses by the ;user must be terminated with a carriage return. However, several ;responses may be typed together on a line, separated by commas, and ;will be taken as needed by upcoming prompts for input. ; There are undefined symbols in this program, so if you enter the ;symbolic version via the console terminal, make sure you incorporate ;the PASSI and PASS2 commands as described in Paragraph 4.17.5. 5-10 ;•••••••••• SYMBOL DEFINITIONS ••••••••••• CLEAR ;empty symbol table MONITR = 140010 ;reentry point for monitor GET LIN = 140060 ;get a line from the console G ETNXT = 140104 ;get next significant character from BUFFER CRLF = !40120 ;send <CR>,<LF> to console CHROUT = 140124 ;send a character to console PRINT A = 140144 ;print an ASCII string TYPDEC = 140164 ;type a decimal number on the console CR LF SPACE STICKS = 15 12 = 40 = = 21. ;<CR> ;<LF> ;space ;initial number of sticks ' ;•••••••••••• START OF PROGRAM •••••••••••• '= 1000 NIM: MOY #GREET,Rl JSR PC,@#PRINT A ;print greeting message on console NEWGAM:CLR RS NEW!: ;show no sticks taken yet ;(number of sticks left = STICKS - R5) CLR R3 MOY #MEORU,Rl JSR PC,@#PRINTA JSR PC,@#GETLIN JSR PC,@#GETNXT CMPB RO,#'M BEQTEMGO CMPB RO,#'Y BEQ USERGO CMPB RO,#'Q BNE NEW! JMP @#MONITR ;ask who plays first ;wait for response from console ;get first meaningful character ;m(e) means TEM goes first ;y(ou) means user goes first ;q(uit) means return to monitor ;If user has not entered a valid response, ;prompt for response again. 5- l l USER GO: MOY #LEFTl,Rl JSR PC,@#PRINTA MOY #STICKS,RI SUB R5,Rl MOY Rl,R2 JSR PC,@#TYPDEC MOY #LEFT2,R l JSR PC,@#PRINTA JSR PC,@#CRLF USER!: MOY #400*SPACE+'/,RO JSR PC,@#CHROUT SOB R2,USERI USER2: NEXT: ;print header for number of sticks left ;calculate number of sticks left ;save a copy of result ;type decimal value on the console ;finish message ;start a TIC\\' line ;put in RO the character pair "/" ;type a "stick" on the screen ;loop to type the appropriate number ;of sticks ;get next character ;is it a con1ma? ;yes, get next move from line. JSR PC,@#GETNXT CMPB RO,#', BEQ NEXT MOY #HOWMNY,R 1 JSR PC.@#PRINT A JSR PC,@#GETLIN JSR PC,@#GETNXT ;ask how many slicks the user wants ;get a line ;get first/next meaningful character ;on line CMPB R0,#'1 BLO USER2 ;illegal response, throw away line and ;try again CMPB R0,#'3 BHJ USER2 SUB #'0,RO ADD RO,R5 CMP R5,#STICKS-l BLO TEMGO BHIUSER4 MOY #ILOSE,R l JSR PC,@#PRINTA JMP NEWGAM USER4: TEMGO: ;illegal response ;convert digit in RO into a number ;add to sticks already taken away ;is only l stick left? ;no, it's TEM's turn ;user took too many sticks ;announce the loss ;ask a bout another game MOY #GOOFED,R l JSR PC,@#PRINTA JMP NEWGAM ;tell the idiot that he goofed up ;and ask about another game MOY #MYMOYE,R l JSR PC,@#PRINTA ;type beginning of TEM's move on ;console ;get number of sticks taken so far ;implement algoritm to select move: ;if RS MOD 4 = 0, take 2 sticks ; RS MOD 4 = I, take 3 sticks ; RS MOD 4 = 2, take 2 sticks MOY R5,Rl NEG RI BJC #177774,Rl BNE TEMI MOY #2,Rl 5-12 TEMl: ADD RI,R5 JSR PC,@#TYPDEC MOY #MYMOYl,RI JSR PC,@#PRINT A CMP R5,#STICKS-l BLO USERGO MOY #IWIN,Rl JSR PC,@#PRINT A JMP NEWGAM ; R5 MOD 4 = 3, take I stick ;show how many sticks TEM is taking ;finish message ;is there only 1 stick left? ;no. it's the user's turn ;announce the victory ;and ask about a new game GREET: .BYTE CR,LF .ASCII /NIM for the TEM/ .BYTE CR,LF,O MEORU: .BYTE CR,LF .ASCII /Who goes first' Mc (M) or you (Y)O (Q to quit)/ .BYTE 0 LEFT!: .BYTE CR,LF .ASCII /There are / .BYTE 0 LEFT2: .ASCII / sticks left./ .BYTE 0 HOWMNY:.BYTE CR,LF .ASCII /How many sticks will you take? (1, 2, or 3)/ .BYTE 0 MYMOYE: .BYTE CR,LF .ASCII /I take / .BYTE 0 MYMOYI: .ASCII/ stick(s)./ .BYTE 0 !LOSE: .BYTE CR,LF,LF .ASCII /You win!!! I demand a rematch!/ .BYTE 0 JWIN: .BYTE CR,LF,LF .ASCII /I winll! Want to try again?/ .BYTE 0 GOOFED: .BYTE CR,LF,LF .ASCII /You goofed up' Can you get it right this time? I .BYTE 0 5.4 DCTil-EM ADDRESS SPACE DCTI I-EM address space is organized as shown in Figure 5-3. Functionally, the address space consists of: standard RAM space, expansion RAM space, monitor space, l/O space, space available for external hardware, and reserved space. 5-13 177777 AVAILABLE FOR EXTERNAL HARDWARE 177600 177577 liO SPACE 177400 177377 AVAILABLE FOR EXTERNAL HARDWARE 167600 167577 167400 167377 RESERVED AVAILABLE FOR EXTERNAL HARDWARE 160000 157777 MONITOR 120000 117777 RESERVED 100000 77777 AVAILABLE FOR EXTERNAL HARDWARE 40000 37777 RESERVED 30000 27777 USER RAM (OPTIONAL! 20000 1 7777 10000 ~~~'.LLLCL.C~~'.LL'.LLLCL.C~~'.LL4 7777 7400 7377 KEYPAD MONITOR SCRATCHPAO CONSOLE MONITOR SCRATCHPAD 7320 1---------------~ 7317 SYMBOL TABLE ~~~~ 1---------------~ USER RAM i!j 1---,-N-T_E_R_R_U_P_T_A_N_O_O_T_H_E_R_V_E_C_T_O_R_S_~ Figure 5-3 DCTI I-EM Memory Map 5-14 5.4.1 Standard RAM Space Addresses 000000 through 007777 are allocated to the RAM that comes standard with the OCT! I -EM. This RAM space is utilized as follows. Addresses Use 000000-000143 Interrupt and Other Vectors. Contains vectors that point to service routines for various interrupt, trace, and trap conditions. See Chapter 6 for specific vector addresses. 000144-006477 User RAM Space. Space available for user programs. 006500-007317 Symbol Table (Console Monitor Only). Can contain up to 66 user defined symbols. 007320-007377 Console Monitor Scratchpad. Area for use by the console monitor. 007400-007777 Keypad Monitor Scratchpad. Arca for use by the keypad monitor and console monitor. If you are using only the keypad, the symbol table and console monitor scratchpad areas arc available to you as user RAM. The monitor ordinarily protects certain areas of RAM from direct alteration. If you are using the keypad only, the keypad monitor scratchpad is the only area of protected RAM. If you are using a console terminal, however, the symbol table, console monitor scratchpad, and keypad monitor scratchpad are all protected. You can remove protection by activating special function 4 from the keypad (see Paragraph 3. I 2.5). '-;ote that "protection" refers only to protection from direct alteration, such as examining a location from the keypad or console and then trying to change the location. An executing program can violate any RAM location. To avoid unpredictable results, therefore, make certain your programs do not inadvertantly write data into areas not available as user RAM. 5.4.2 Expansion RAM Space If you insert two 2 K x 8 RAMs into the expansion sockets (sec Paragraph 5.3), another portion of user RAM space at locations 020000 through 027777 becomes available to you. 5.4.3 Monitor Space The monitor space is the space occupied by the keypad and console monitors which reside in two 8 K X 8 PROMs at locations I 20000 through 157777. 5.4.4 1/0 Space Locations 177400 through 177577 are designated as space for the DCTl 1-EM's 1/0 chips. The 8255A parallel port, the 8251 A auxiliary serial line, and the DC3 J 9 DLA RT console serial line all use this space. The 1/0 space consists of locations that can be written only and locations that can be written or read. Figure 5-4 provides a detailed breakdown of how the 1/0 space is used. 5-15 177577 177566 1 77564 177562 177560 DLART TRANSMITTER DATA BUFFER DLA RT TRANSMITTER COMMAND/STATUS REG DLART RECEIVER DATA BUFFER 177552 177550 8251 STATUS REGISTER 8251 RECEIVER DATA BUFFER 177544 177542 8255 PORT C llNPUT FROM UPPER 4 BITS) 8255 PORT B 18-BIT INPUT] DLART RECEIVER COMMAND/STATUS REG READ/WRITE 1/0 SPACE 177500 177477 177452 177450 177446 177444 177442 177440 8251 CONTROL REGISTER 8251 TRANSMIT DATA BUFFER 8255 COMMAND REGISTER 8255 PORT C !OUTPUT TO LOWER 4 BITS) 8255 PORT B (8·BIT OUTPUT] 8255 PORT A (8·BIT OUTPUT] WRITE ONLY 1/0 SPACE 177400 MA 103~1 Figure 5-4 Map of 1/0 Space 5.4.5 Space Available For External Hardware The foJlowing space is available to you for any expansion hardware you may wish to design: 040000-077777 160000-167377 167600-177377 177600-177777 An example of a piece of external hardware that could use this space is a RAM board which responds to addresses 040000 through 057777. Further information on hardware expansion is provided in Chapter 6. 5.4.6 Reserved Space The shaded space in Figure 5-3 is reserved and unavailable for use. The addresses affected are: 010000-017777 030000-037777 100000-117777 167400-167577 5-16 CHAPTER6 HARDWARE 6.1 INTRODUCTION The DCTI I-EM hardware is organized as shown in Figure 6-1. In general, the hardware consists of: • • • • • • • • • • • • • • • The DCT I I -AA microprocessor RAM Monitor EPROM Peripheral chips and drivers An internal data bus buffer User buffers Microprocessor control signal decoding logic Address latching and range decoding logic Peripheral chip address decoding logic Interrupt logic Timing logic Miscellaneous control logic Keypad/LEDs and supporting logic The HALT and INT push-button switches Connectors The paragraphs that follow provide information on each of these. Refer to the DCT 11-EM schematics in Appendix B for further details. Paragraph 6.1 7 contains a design for an expansion memory board you can build. 6-1 INT2 1NT3 INTF ECAS2 CONTROL MICROPROCESSOR PROCESSOR CYCLE DECODE T-11 MICROPROCESSOR EDMG TRISTATE DRIVER ADDRESS RANGE DECODING LOGIC TRISTATE DRIVER (USER BUFFER) BUFFER ARD<03 00> ~---~ARD1X .-------, ARD17 60-PIN USER CONNECTOR 8K X 8 PROM (UPPER BYTE) {Jl) USER DATA BUS BUFFER 8K X 8 PROM (LOWER BYTE! EVALUATOR DATA BUS BUFFER 6116P·2 2K X 8 O'I I N EWRH RAM (UPPER BYTE! DB<l 5:00> 6116P-2 2K X 8 RAM EWRL I LOWER BYTE) DLA RT LCLK EDBIN EWLB 51 SOCKET OPTIONAL 2K X 8 BCLR KEYPAD DC319 DLA RT CONSOLE SERIAL LINE RAM I UPPER BYTE) 52 ECAS 2 SOCKET OPTIONAL 2K X 8 8251A AUXILIARY SERIAL RAM I LOWER BYTE) LINE PERIPHERAL CHIP DECODER LOGIC BRCLK CONTROL SIGNALS INT6 \NT7 PDSA PCTS PCSI PTDR PTRS PCSO AUXILARY CONNECTOR IJ3J ARDOO ARD01 ARDlX ESEL MISCELLANEOUS ROY CONTROL LOGIC INTA ERO LBDIR SAL 15 EIA DRIVERS CONSOLE CONNECTOR (J4) DLSO. DLSI TCLK TIMING LOGIC TCLK2H DCLK Figure 6-1 DCTI I-EM System Block Diagram 6.2 DCTI I-AA MICROPROCESSOR The DCTI I-AA microprocessor is the heart of the system. A detailed discussion of the operation and architecture of the OCT! I-AA is beyond the scope of this book. Refer to the DCTI I-AA User's Guide (EK-DCTl 1-UG) for this information. At power-up or when a RESET instruction is executed, the OCT! I-AA mode register bits arc set to the following states and cannot be changed. Mode Register Bits State Mode <15:13> 000 Start address = l 40000 Restart address = l 40004 12 Il User 0 10 l 6-bit bus 4 K/16 K memory 9 0 Dynamic memory 8 0 Normal read/write Standard microcycle 0 COUT = processor clock This mode configuration has the following implications: • Bit <I l > = I - This allows you to use either 8-bit or l 6-bit data paths in your expansion circuitry designs. If 8 bits, simply use the lower 8 bits of the l 6-bit bus. • Bits < l 0:09> = I 0 - This allows you to use inexpensive I 6 K dynamic RAMs for off-board memory expansion (see Paragraph 6.17). • Bit <8> = 0 - This allows you to design expansion hardware with devices that respond to either normal or delayed read/write controls. If you use devices that respond to delayed read/write controls, include delay circuitry in your design. NOTE Do not use a RESET instruction in your program unless your program reconfigures (i.e., reinitializes) your peripheral chips. RESET causes the DCTllAA to assert -BCLR which resets the peripheral chips. 6.3 RAM There are two 2 K X 8 CMOS static RAM chips in the basic DCTI I-EM which provide 4 K bytes of memory space. These RAMs respond to addresses 000000 through 007777. Even numbered or low bytes reside in one RAM, and odd numbered or high bytes reside in the other. There are two expansion sockets on the board which can accommodate two additional 2 K x 8 static RAMs. The RAMs in these sockets respond to addresses 020000 through 027777. One RAM stores low bytes and the other stores high bytes. 6-3 Although the DCT I I -AA generates refresh cycles as a result of being set to dynamic memory mode, this is for the benefit of off-board expansion with dynamic RAMs. The on-board static RAMs ignore the refresh cycles. 6.4 MONITOR EPROM The OCT I I -EM monitor is contained in two 8 K X 8 EPROM chips. The EPROMs respond to addresses 120000 through 157777. Note that accesses to memory locations above !00000 cause a single cycle slip. This is not only for the benefit of the monitor EPROMs, but also for the peripheral chips and any slow expansion hardware which may be attached. Cycle slips are disabled if the jumper is installed (see Paragraph 2.5). If you install the jumper, make sure you also decrease the microprocessor's 7.5 MHz clock frequency to a value between 3 MHz and 6 MHz by changing the crystal. 6.5 PERIPHERAL CHIPS AND DRIVERS The peripheral chips are the 8255A parallel port, the DC319-AA DLART console serial line, and the 8251 A auxiliary serial line. The DLART and the 825 IA have EIA drivers associated with them so that they can communicate with RS232-C devices. The locations reserved for use by the peripheral chips are listed in Table 6-1. Table 6-1 ReserYed 1/0 Locations for Peripheral Chips Location Number Location Type 177566 177564 177562 177560 177552 177550 177544 177542 177452 177450 177446 177444 177442 177440 Read/write Read/write Read/write Read/write Read/write Read/write Read/write Read/write Write only Write only Write only Write only Write only Write only Use OLAR T transmitter data buffer DLART transmitter command/status register DLART receiver data buffer DLART receiver command/status register 825 IA status register 8251 A receiver data buffer 8255A port C (input from upper 4 bits) 8255A port B (8-bit input) 8251 A control register 8251 A transmit data buffer 8255A command register 8255A port C (output to lower 4 bits) 8255A port B (8-bit output) 8255A port A (8-bit output) 6.5.1 Parallel Port (8255A) The 8255A parallel port chip has two 8-bit ports and two 4-bit ports, all independently controllable. Port A (8 bits) is dedicated to supplying LED segment data to the LED segment drivers. Port A is configured as output only. Port B (8 bits) is initially configured as an input port and is available to your expansion hardware via the 60-pin connector. You can configure port B as either an input port or an output port. Port C is really two independent 4-bit ports. The upper four bits of port C are dedicated to sensing keypresses and are configured as input only. The lower four bits of port C are dedicated to turning on the LEDs and enabling the keypad. These lower four bits are configured as output only. For detailed information on programming the 8255A, refer to the Intel Component Data Catalog (available from Intel Corp., 3065 Bowers Ave., Santa Clara, CA 95051). The order number is 210298-001. 6-4 6.5.2 DLART Console Serial Line The DLART (DC3 I 9-AA) is an asynchronous receiver/transmitter which the DCTI 1-EM uses to communicate with a console terminal. The DLART can generate receiver, transmitter, and break detection interrupt requests. See Paragraph 6.11 for more information on interrupts. The 800 Hz clock output of the DLART is used to generate the INTA interrupt request which causes the LEDs and keypad to be activated. Again, see Paragraph 6.11. Detailed information on programming the DLART is contained in the DLART Data Sheet (ED-23181 ). 6.5.3 Auxiliary Serial Line (825 lA) The 8251!\ auxiliary serial line chip is a universal synchronous/asynchronous receiver/transmitter (USART) which the DCTI I-EM uses for general purpose asynchronous serial communications. Typically. the auxiliary serial line is used for communicating with a host computer. The auxiliary serial line features modem control. The Data Carrier Detect and the SYNDET functions of the 8251A, however, are not used in the DCT! I-EM. For detailed information on programming the 8251A, refer to the Intel Component Data Catalog (available from Intel Corp., 3065 Bowers Ave., Santa Clara, CA 95051). The order number is 210298-001. 6.6 INTERNAL DAT A BUS BUFFER The internal data bus buffer is not accessible to you directly but is the buffer through which most of the data in the DCTI 1-EM passes. It buffers DAL<l 5:00>, the microprocessor's primary data bus. 6.7 USER BUFFERS The DCTI I-EM has three user buffers. One buffer provides access to DAL<15:00>, the main internal data bus. Another buffer provides access to !\[<7:0>, the microprocessor's address interrupt lines. The third buffer provides access to various DCTI I-EM control signals. These buffers arc directly accessible through the 60-pin connector. See Paragraph 6.16 for the names of the specific buffered signals available. 6.8 PROCESSOR CYCLE DECODING There is some decoding logic that takes microprocessor control signals and combines them to direct the operation of various chips within the DCTI 1-EM. Some of these decoded signals are available to you through one of the user buffers. See Paragraph 6.16 for the names of these buffered control signals. 6.9 ADDRESS LATCHING AND RANGE DECODING Memory addresses are latched from DAL< 15:00> when the microprocessor asserts ERAS L. As shown in Figure 6-l, the upper three bits of the latched address are converted (decoded) to signals which enable pairs of on-board ROMs or RAMs. 6-5 Decoded address range signals are also available to your expansion hardware via the 60-pin connector. These signals are ARD02 L, ARD03 L, and ARD! 7 L. Figure 6-2 illustrates the address ranges to which these signals correspond. 177777 1/0 SPACE ANO SPACE AVAILABLE TO EXTERNAL } ARD 17 HARDWARE 160000 157777 MONITOR 120000 117777 EPROM } ARDIX %§ /; } NO CHIP ENABLE RESERVED~ ///, SIGNAL AVAILABLE 100000 77777 AVAILABLE FOR EXTERNAL }AR003 HARDWARE 60000 57777 AVAILABLE FOR }AR002 EXTERNAL HARDWARE 40000 37777 RESERVED 30000 }AR001 27777 OPTIONAL RA~ 20000 1 7777 RESERVED / 10000 7777 }AROOO STANDARD RAM MR 1DJ53 Figure 6-2 Address Range Decoding 6.10 PERIPHERAL CHIP ADDRESS DECODING The peripheral chip decoding logic is similar in function to the address range decoding logic (see Paragraph 6.9). The difference is that this logic generates peripheral chip enable signals instead of memory chip enable signals. Peripheral chips are enabled according to the addressing scheme shown in Paragraph 6.5. The peripheral chip decoding signals are internal to the OCT! I-EM and are unavailable for expansion hardware. 6.11 INTERRUPTS AND TRAPS Interrupt vectors are located as shown in Table 6-2. Interrupts are encoded and sent to the OCT! I-AA for handling. The OCT! I-AA also handles OMA requests and external vector requests via the interrupt logic. Some of the interrupt vectors above point to a "null" service routine. That is, they simply point to an RT! instruction. These include the power-fail, DLART transmitter, external, and 8251 A transmitter interrupts. If you do not write your own service routines and change the interrupt vectors accordingly, these interrupts will have no effect. 6-6 'rable 6-2 Interrupt Vector Address Priority 000024 000060 000064 000100 000104 000120 Type of Interrupt HALT switch and HALT instruction Nonn1askable power fail interrupt (caused by pressing JNT switch) DLART receiver (l"IT3) DLART transmitter (INT2) External interrupt (INTB) Keypad/LED scanning (I "ITA) 8251 A receiver (l"IT7) 8251A transmilter (INT6) OL/\RT receiver break (INTF) 4 4 6 6 5 000124 5 000140 7 Interrupt Vector Locations Other vectors include the following. Vector Address Description 000010 000014 Illegal instruction trap Breakpoint and trace service 6.12 TIMING Fundamental timing signals are generated by: I. 2. A 7.5 MHz crystal oscillator which drives the OCT I I -AA microprocessor A 614.4 KHz clock which drives the OLART. The 7.5 MHz signal is also divided down to 1.875 MHz to drive the 8251 A auxiliary serial line. These signals are unavailable for external use. 6.13 MISCELLANEOUS CONTROL LOGIC There are pieces of logic spread throughout the OCT 11-EM that generate miscellaneous control signals. The only signal that the miscellaneous control logic makes available to you is the signal ROY L, which, when asserted, causes a single cycle slip. Note that the installation of the jumper disables the on-board generation of ROY L. 6.14 KEYPAD/LEDS The keypad/LEDs combination communicates with the rest of the OCT! I-EM through the 8255A parallel port peripheral chip (sec Paragraph 6.5.1). Note that the lower four bits of port C arc decoded and are used to drive the LED anodes and keypad simultaneously. These lines are asserted sequentially in response to the INT A interrupt request. 6.15 HALT AND INT SWITCHES The opcraton of the HALT and INT switches is explained in Paragraphs 3.9 and 3.10, respectively. To summarize, pressing the HALT switch asserts the HALT signal which restarts the keypad monitor and unconditionally stops whatever operation was in progress. Pressing the INT switch asserts the PF signal which causes a power-fail interrupt. Power-fail interrupts have no effect unless you write a service routine (vectored by location 24) to handle the interrupts. Both HALT and PF are available to you via the 60-pin expansion connector. 6-7 6.16 CONNECTORS There are four male connectors on the DCT! I-EM as follows. Connector Jl Number of Pins J2 60 4 J3 J4 25 25 Function Connector for expansion hardware Power supply connector Auxiliary serial line Console serial line JI, J3, and J4 are all standard size connectors. J2 is the connector you assembled when you installed the DCTll-EM. The pin assignments of these connectors are listed in Table 6-3. Table 6-3 DCTl 1-EM Connector Pin Assignments 60-Pin Connector for Expansion Hardware (JI) (see Figure 6-3) Pin Number I 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 I8 19 20 21 22 23 24 25 26 Signal Name A[)OO H ADOI H AD02 H AD03 H AD04 H ADOS H AD06 H AD07 H AD08 H AD09 H ADIO H ADii H ADl2 H ADl3 H ADl4 H ADl5 H AIO H All H Al2 H All H Al4 H Al5 H Al6 H Al7 H GND RESET L Description AD<l 5:00> is the buffered version of DAL<l5:00>, the bidirectional multiplexed data/address lines of the DCTI !-AA. A1<7:0> is the buffered vers.ion of the OCT! 1-AA's A1<7:0> address interrupt lines. Output only. During DMA transactions, these lines are set to the high impedance state. Buffered control signal. Output only. Corresponds to the DCTI 1-AA's -BCLR signal. 27 28 29 30 31 32 33 34 35 PBO H PBI H PB2 H PBJ H PB4 H PBS H PB6 H PB7 H HALT L PB<7:0> arc the bidirection~I port B lines of the 8255A parallel port chip. Asserted when HALT switch is pressed. Open collector. 6-8 Table 6-3 DCTI I-EM Connector Pin Assignments (Cont) 60-Pin Connector for Expansion Hardware (J 1) (see Figure 6-3) Pin Number Signal Name Description 36 PF L Asserted when INT switch is pressed. Open collector. 37 DMR L External DMA request line. Input only. 38 INTB L External interrupt request line. Input only. 39 VEC L External vector request line. Input only. 40 Pl H Buffered control signal. Corresponds to the DCTl 1-AA's Pl signal. Output only. 41 42 GND ARD02 H Decoding signal for the address range 040000-057777. Output only. 43 ARD03 H Decoding signal for the address range 060000-077777_ Output only. 44 ARDl7 L Decoding signal for the address range 160000-177777. Output only. 45 IACK L Buffered control signal. Interrupt acknowledge. Output only. 46 DMG L Buffered control signal. DMA acknowledge. Output only. 47 SELi H Buffered control signal. Corresponds to DCTI 1-AA's SELi signal. Output only. 48 49 SELO H WLB L Buffered control signal. Corresponds to DCTI 1-AA's SELO signal. Output only. Buffered control signal. Correspcnds to DCTI 1-AA·s R/-WLB signal. Set to high impedance state during DMA. Input or output. 50 WHB L Buffered control signal. Corresponds to DCTl 1-AA's R/-WHB signal. Set to high impedance state during DMA. Input or output. 51 52 GND RAS L 53 54 GND CAS L Buffered control signal. Corresponds to DCTJ 1-AA's -CAS signal. Output only. 55 56 GND DBIN L Buffered control signal. Read enable line. Output only. 57 58 GND COUT H 59 60 GND RDY L Buffered control signal. Corresponds to DCTI 1-AA's -RAS signal. Output only. Buffered control signal. Corrcspcnds to DCTI 1-AA's COUT signal. Output only. Causes single cyc!e slip when asserted. Open collector. 6-9 T•ble 6-3 DCfl 1-EM Connector Pin Assignments (Cont) Power Supply Connector (J2) Pin Signal Number Name Description I 2 3 +12VDC +SVDC GND -12VDC Power signal Power signal 4 Power signal Auxiliary Serial Line Connector (J3) Pin Number Signal Name L>escription I FGND Frame ground 2 3 PCSO PCS! Serial data out 4 5 PRTS 6 7 8 9 PCTS PDSR GND Serial data in Request to send Clear to send Data set ready Signal ground Not used Not used Not used Not used Not used 10 11 12 13 Not used Not used Not used 14 IS 16 17 Not used 18 Not used Not used 19 20 21 22 23 24 2S PDTR Not used Data terminal ready Not used Not used Not used Not used Not used 6-10 Table 6-3 DCTl 1-EM Connector Pin Assignments (Cont) Console Serial Line Connector (J4) Pin Number Signal I FGND DLSO DLSI RTS Name 2 3 4 Description Frame ground Serial data out Serial data in Request to send (always ON) Not used 5 Not used Signal ground 6 7 8 GND Not used Not used Not used Not used Not used Not used Not used 9 10 11 12 13 14 15 16 17 18 19 Not used Nat used Not used Not used Not used DTR 20 Data terminal ready (always OJ\) Not used Not u.sed 21 22 23 24 25 Not used Not used Not used 59 57 55 53 51 0 0 0 0 0 a 0 0 0 0 z z z z z 49 47 ~ ):: r I :;; 45 43 > "' § n > 41 0 z 0 r 39 ~ n r 37 0 < > r 35 33 3· 29 27 I v v ~ v ~ ~ I I 1 I ~ r •• • 25 23 0 •> >• > > 9•> 9> >g 8> 8•> ~ §> 8> z 0 I 21 I 19 17 ~ 6 1 1 > 0 ' n s z• 0 I 60 58 0 r 56 n > > > m m r r 54 52 ~ m •r 5 I I 50 48 0 < 0 r 46 > I > > g § r I 44 42 , z ~ I r ~ •r v ~ ~ • ~• ~ I I I I ~ ~ ~ 38 Figure 6-3 36 34 32 30 28 26 00 I I I ~ > > w ~ > > I I I ~ w I I 24 22 20 60-Pin Connector Pin Assignments 9 c ~ > ,. N I r 40 13 > I I r 15 > g > 0 I > I I I > > > I ~ 8 § 8 § 8 I I 1 I " " " " '° 8 6 4 9 9 I ~ 2; PC BOAFID ~"'•OJ·,~ 6.17 HARDWARE EXPANSION - EXAMPLE If you plan to develop and run large programs, one of the first expansion hardware circuits you may want to build is a memory module. Figure 6-4 shows a design for a 16 KB module. The module responds to addresses 040000 through 077777. The address range decoding signals, ARD02 H and ARD03 H, are used to enable the module. Note that the signal names on connector J l of the memory module arc in the opposite order as those shown on connector JI of the DCTl 1-EM. This scheme eliminates the need to twist the interconnecting cable. 6-11 16K K 1 2118 74LS244 11 13 15 1A1 1Y1 AD 15 H 1A2 1 Y2 AD 14 H 1A3 1 Y3 AD 13 H 1A4 1Y4 AD 12 H 2A1 2Y1 AD 11 H 2A2 2Y2 AD 10 H 2A3 2Y3 AD 9 H 2A4 2Y4 ADS H E3 WHB l 1G OBIN l 16K x 1 2118 DOUT 74LS244 14 1-1 O'I 13 I N 17 1A1 1 Y1 AO 7 H 1A2 1 Y2 AO 6 H 1A3 1Y3 AO 5 H 1A4 1Y4 AO 4 H 2A1 2Y1 AO 3 H 2A2 2Y2 AO 2 H 2A3 2Y3 AO 1 H 2Y4 ADO H 2A4 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 37 38 39 40 41 42 43 E6 1G ARD 2 L ARD 3 l 2G OBIN L WLB L 21 19 18 12 11 9 NOTE: CONNECT A .047 µF CAPACITOR BETWEEN +5 V AND GROUND FOR EACH IC. 36 20 +5 v J1 Figure 6-4 16 KB Memory Module APPENDIX A MONITOR LISTING T-11 Evaluation Hodule Monitor HACRO V05.00 Sunda':I 13-Har-83 04!10 Table of contents 23- 4 2 5111517- 3 20- 273234353637394445484951575859- 2 2 2 2 2 2 2 Definitions ScratchPad locations in hi::lh RAH Console Serial Line Support Routines General 1/0 SuPPort Routines Host Line SuPr-ort Routines 1/0 Initiali:aticm arid LED Driver LED DisPla:i SuPPort Routines Error Condition and StartiJP Entr':I Code Ent.rs Points Ke':!Pad HonitCir 2 2 Ke':! Co1111and Routir1es 2 Console Monitor Parsing Routines Directive and \'erb Handlins Poutir1es 2 2 2 2 2 2 2 2 2 Sr>ecial Ke'::SPad Monitor Function·3 S"J1bol and Label Handlir1S Ro1Jtine:- Arithaetic Routines Instruction Encode/Decude RoiJtine::. Conversion and T':IPeQut Routines Power-up Dia9nostics Special Data Structures Spare locctions1 Check..3u11n and ROI'\ I.D, A-I T-11 Evaluation Module Monitor MACRO V05,00 S1Jnd.:.:i !3-Har-S3 04:10 Pase 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 T-11 E"'AL~A!'.Oll MODULE Hatl!TCR Version 1.0 COPYRIGHT CC! 1?32 PY DIGITAL fOOIPHfNT CORPORAfJa.V, MAYNARD· ~~55. ; TKIS SOFTllAAE IS ft!RNISHED UllDER A LICENSE AllD HAY BE USE!< AliD •:CPlH' ; OIU IN ACCOR!lAHCE WITH THE TERMS Of SUCH L!CEllSE AND WITH TH' ; INCLUSION OF THE All0\1£ COPYRl6HT NOTICE. THIS SOFTWARE OR AllY OTHER ; COPIES THEREOF !IA! NOT BE PROVIDED OR OTHERWISE NADE AVAILABLE TO AiJY ; Oll£R PER~. HO TITLE TO AND OWllERSHIP OF THE SOFTWARE IS HEREP.Y ; TRAHSFERRED, ; TIE IIFll!MTIOH IN THIS SOFTWARE IS SUBJ£CT TO CHAI/GE WITHOUT NOTICE ; llHll Sl«llJl.D NOT DE CONSTRUED AS A COH!ITHENJ BY DIGITAL EaUIPHEIH ; CORP!JlAJIOH, ; DIGITAL llSSUllES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS ; SOfTllARE OH EllUIPHEHJ WHICH IS NOT SUPPLIED BY D!GITAL, 24 A-2 T·l1 Evaluation Hodule Monitor KACRO VOS.00 Suroda. 13-llar-83 04110 F'ag:e 2 1 2 3 4 .TITLE T-11 Evaluation ~odule "on1\or , !DENT 100.001! ,SSTTL Definitions s 6 7 8 9 10 11 12 13 000000 000001 000002 000003 000004 000005 000006 000007 RO =%0 Rl R2 R3 R4 RS SP PC =%1 000024 000060 000064 000120 000124 000100 000104 OOOHO PFVEC COHIN CDNOUT AUXIN AUXOUT USER IV LEDIV COHBRI: ::060 ==064 ::120 ==124 ==100 ==104 ==140 177l40 177542 177442 177444 177544 177446 P$PORA NPORI P$PORD P$PORC P$PIJRD P$CREG •=177440 ==177542 ==177441 ==177444 ==177544 ==177446 177550 177450 177552 177452 AIRBUF ::177550 Amur ==177450 AISRE6 ==177552 AICREG ::177152 iB251 receiver data buffer (reaci onl!:ll ;9251 trans1itter d<i:ta b1Jffer twrite onl!:I) ;8251 status resister (read onl~l i8251 co"1and re9ister (write ol\l~) 177560 177562 177564 177566 C$RCSR CIR8UF CIXCSR CIXSUF =•177560 =•177562 =•1775M =•177566 iDLART receiver co~aand/status resister iDtART receiver data buffer iDlART trarrs1itter co11and/slatus resister iDLART trans1itter data buffer ;Resisters =%2 •%3 =%4 •IS =%6 •17 H 15 16 17 18 19 20 21 22 23 14 25 16 27 28 29 30 31 32 33 34 35 36 37 38 39 40 iPower fail vector' called b~ INT button 1DLART receiver interrupt vector ;DLART transaitter interrupt ·...ector i8251 receiver interruPt vector i8251 trans1itter ir1terruF-t vector ;unco11itted interrupt v~ctor ;LEn disPla~ interruPl vector ;OLART brea~- interrupt vector ==02-4 A-3 i8255 port A (write onl!:I) jport B (read onl':)) available to user ;F-ort B (write oril~l available to user jport C (write or1ls) controls bits 3-~ iPort C (read onl!:ll reads bits 7-4 ;9255 co11and re-9ister (write onl.,,) T-11 EYaluation Module ~onitor MACRO V05,00 Sund•• 13-Har-83 04:10 Pas;e 3 Definitions I 2 3 4 000000 5 6 006500 7 a 007320 9 10 006500 11 12 13 14 15 007324 16 007325 17 000001 18 000004 19 000010 20 000020 21 22 007326 23 007327 24 000001 25 000002 26 000004 27 000010 28 29 007330 30 0073Jl Jl 000002 32 004000 JJ 000100 34 J5 000200 36 37 007332 JS 39 007333 .SBTTL ScratchPad locations in hish RAM ,ASECT SCRPDl ::; TBLTOP -llJR == SCRPDlt620 Pbotto1 ot default console 1onitor scratcl'. idetiUlt syabol table--66. sy1bol capacity ;tof' of sv1bol tabler 2 words of naae scratch 6500 HBLTOP-<66.*6> ;7000 6500 iconsole 1onitor flas b':lte Pairs~·aust start at even address LINFL6 == LASLIH -F.SST! F.IUL F.SAVX f,COM TBLTOPH LINFL6tl =001 =004 =010 =020 related to Parsins of whole lines isaved tlass fro1 Previous line rline contained STEP CtJ11and ;Jine is (functionally) ea?ts iwe have saved ex?r for double para• coa1ands ;we are in a c011entr isnore characters CURCOH -LASCOH ;;::; F.HNEH F,\HILU F.UNDF F,IJSRD LASL!Ntl CURCOHtl =001 =002 =004 =010 icurrent co..and flass isaved fla.!ls fro1 Previous co111and iwas an instruction 1ne1onic ian undefined sv1bol or directive iexPression doesn t contain undefined s~abols iwas a user defined sv1bol or label ;tla~s 1 f,BYTH =200 icurrent out.Put 1ode flass iPer1anent outPut 1ode fla~s ;ibsolute valuesr not s~1bolic outPut iYt •ode on or otf ;instruction outPut ;if neither ASCII nor instruction, then nu1eric ib!:lte 1ode EXPFLG -- PERHODH icurrent expression flass LEVEL ;: EXPFLGt1 iParenthesis level in exPression THPHOD -PE RH OD -- LASCOHtl TH PHO DH r .Alls =002 F.VT =<400*010> F, JHST =100 A-4 1-11 Evaluation Hodulo llonitor HACRO V05.00 Sunda• 13-Har-83 04:10 Pa;e 4 Scratch•ad locations in hi;h RAH 1 2 3 4 'other variables: 007334 ADVAIIR ,, LEVEL+! idue to the varied uses of this location, a 5 6 ic:o1Plete list is in order: iDOCR: When d1J11Pin!I locations in response to a <CR>, the next address 7 B after th.at which has been du1Ped is saved in case the next 9 cOMind line reauests another du11p, 10 only be kept intact between two successive e111Pt!::I co11and lines. The i.·alue of ADVADR need ii.BYTE, 1.WCllDo GETINSo subroutines of GETINS: These routines use ADVADR as a rurlflinS coP!::I of the c1Jrrent II 12 13 address. The current address, as stored in @tlADDR, 1ust not 14 be chan!ed as successive values are dePosi ted into RAM b:i a 15 si~le instruction or directive1 because this would alter th~ valut of the dot ( ,) s~bol (current location refer·enc·e). HWJSntl:uses A[IVADR to saYe R2, which ?Oints to the na1e to be defiriedi 16 17 18 while the value to be eouated is parsed, The val1J~ saved ir1 R2 is an index to the naite on the left of the earJals siSn• if the natt is orie of the predefined s~abols or a user s~1bol that ; hiJS ilread~ been defined. iTYPREG:uses AD\IADR as a Pointer to ihi;i list of retisters to bl' i~Ped. ;EFND: uses ADVADR to sii'Ve the UPPer search ranse li~it before Porsins the value and aask Para1eters1 19 20 21 22 23 24 25 26 27 28 29 JO 31 32 33 34 35 36 37 38 39 40 41 007JJ6 SAVEXP -- ADVA1*+2 ;saved expr val~ for double Para1eter co11ands 007340 007341 COUNT! -- SAVEXP+2 COUNT2 -- COUHl!tl ;counter for UPPer level routines icounter for lower level routines 007342 007343 HOOE !FERA! COUNT2+1 HODEil iaddressinS 1ode scratch--1ust be even address isave oPerator he-re ir1 e>:Pressions 007344 CNTLC OPERATt! iCNTLC<O> set to 1 when console t!:i!Pes "C arid if.APPL is set, 1eaning that the lcurrentl~ running PtOSral has a nC handler 007345 DELIH CNTLCt! ithe ,ASCII directive stores the deli1iter here 007346 llOTTOI! -- DELI!+! ;now at 73461 bot.tea ot console 1onitor stack ;console aonitor has 38 word stack ;HOTE! interr·uPts need UP to 11 stac~. locations 007400 007462 SCRPAD -STACK BOIT0Ht32 SCRPADW inow at 7400, botto1 of Ji.e:i?ad 1onitor scratch i2S word stack for ke~Pad 11or1i tor 007462 007464 007466 007470 007630 007631 007632 007672 007673 000200 000100 TBLBOT -- STACK STACK t 2 STACI t 4 REPEAH2 BUFFER+ HO BP+! FP+I HOST!ft40 ;P'ointer to botto1 of s:i1bol table space ir1 use 42 43 H 45 46 47 48 49 50 51 52 53 54 55 56 57 Hf8251 -- REPEAT ,, BUFFER -::;; BP FP HOSTBF -HFP HSTFLG -HFPI! F.LOAD ;200 f,LDST ;!00 A-5 iB251 1ode fla;s ;console 1onitor co111and line repeat counter i96 character console line inPut buffer· ;buffer back Pointer1 1ust be even address ;buffer forward Pointer1 1ust follow Br i32 character host inrut buffer ibuffer forward Pointer ihost flags ;1 = taking inPut fro1 host it = lookins for .START to begir1 loading T-11 Evaluation Kodule Honitor ltACRO V05,00 Sunda• 13-H•r-83 04:10 Pa1e 4-1 SrratrhPad lorations in high RAH 58 51 60 61 62 63 64 65 66 67 68 61 70 71 72 73 74 75 76 77 78 79 BO Bl B2 83 84 85 86 87 BB 81 90 000001 r.ms •001 ii = iSr1orin9 11essa:Sle fro1 host ibste buc~.etl --- F.DATA f,CHAN F.AD!IR f,REG F,llRKS f,FUNC f ,USER F.SST F.l!RKA F, BRKG F.KEYP F,HOST F.APPL F, !BAS F.PllOT F.PAS! HSTFLGtl PWRFVS12 KHPJVl2 KEYPVSl2 VSERVS+2 DEBNCE+c •000001 •000002 •000004 •000010 •000020 •000040 •000100 •000200 •000400 •001000 •002000 •004000 •010000 •020000 •040000 •100000 isave user's Po"'er fail vector her-e ;kesPress service vector ;save user's ke~~ress vector here isave user's interruPt. vector here ike~Pad debounce resister 1flas bits, defined as follows il ; data entrs •ode ;i = nuoe-ri::- ~.e~ ::-ressed a:fter oper1in5 locatior1 11 ; address E:ntr~ ;ode il = resister selectiori ~odti ;1 ; break.Point selection mode ; 1 ; special function sel.;>1:l:c,~1 niode ; 1 ; executir1s user code il ; sinsle stePPin:J i l ::- breakpoints active i ir1stalled) ;1 = c1Jrrentl':' steP?in:3 over a breakPoir1t ;i = runnins console 1onitor 11 = accePtin§ console ro~iands fro~ both Ports ;i = runnins F-rosraa with "C handler il = Print address break Point is at ;i = 1onitor scratch Protection disabled ;i = console 1or1itor f'ASS1 ITIOde active -- FLAGS1t2 F.STOP F.CPBO f,CPB1 f .CPB2 f,A64X •002 •010 =020 •040 •200 iconsole line flass, 1ust be even addres; icoritrol S Pressed, executior1 susFenderJ iProsra11able baud rate stored here ;aux Port 1ode word bit<O>, selects lbX or b4X :::;; CONFLGI! icoP':I of what has been written to A$CREG ;6 word se91ent data buffer for LED dis~la~s ;nish b':lte for tJPPer disrla'::s'.• l•3W tor lower ;1 word buffer for special 2 character d1sPla~ ;upper 6 bits COlJnt 00 seconds, lower 10 co1Jr1t, ;ei:Slhthundredths of seconds ;save user context here 007674 007676 007700 007702 007704 007706 000001 000002 000004 000010 000020 000040 000100 000200 000400 001000 002000 004000 010000 020000 040000 100000 PWRFVS KEYP!V KEYPVS USE RVS DEBNCE FLAGS! 007710 000002 000010 000020 000040 000200 CONFLG 007711 AUXFLG 007712 SfGBUF AUXFLGI! 007726 007730 SPCLBF TIHE -- SEG8VFl14 SPCLBF+2 007732 007734 0077l6 007740 007742 007744 007746 007750 007752 007754 007756 007760 IRO IR! IR2 IR0!2 --- 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 IR3 TlttE+2 -- -IR4 IR5 ISP -IPC -IPS IWATCH -IADDR BRKFIL 11112 IR212 IR312 fR4+2 IR512 tSP+2 lf'Cl2 IPSt2 IWATCH/2 IADOR+2 A-6 ;watchPoint address icurrent ~ddress ;file of tour breoli.P"oiril add!'esstcontents Pairs T-11 Evaluation Hodule Honitor "~CRO \I05,00 Sunda' 13-"•r-83 04!10 Page 5 ScratchPad locations in hi~h Rt\H 2 3 4 5 6 7 B .SBTTL Cor1sole Se-rial Line SuPPort Routines • 133000 ;++ LINEIN answers console inPUt interrupts and buffers the inco1ing characters. The characters 'l• "C1 "'O, "Q, "S, and "Y and trapped in this routine+ 9 10 11 12 13 133000 14 133002 15 133004 16 133010 17 133012 18 133016 19 133020 20 133024 21 133030 22 23 133032 24 133036 25 133040 26 133M4 27 133046 28 133052 29 133054 JO IJ3062 31 133064 32 133070 33 mon 34 133100 35 36 133102 37 133106 38 133110 39 133116 40 133122 41 42 133124 43 133130 44 133132 45 133140 46 47 133142 48 133146 49 133152 50 133156 51 133160 52 133164 53 54 133170 55 133172 56 133174 57 133000 ;-010046 010146 113700 100375 013700 100005 012700 004767 000457 LIHEIN! !ltOV ltOV 177560 lt: 177562 ltOVB Bfl ltOV Bfl 000007 000510 omoo 177600 5t! "ov JSR BR RO.-<SPl Rt.-ISPl HCIRCSR•RO II @tCIRIUf ,RO 21 1007,RO PC·CHROI iPreserve sole resisters for scratch ireid console receiver status register iin Polled aode1 wait for a character fredd console receiver frio error bits set ior1 error, outP"ut <BELL> ;i.9l1ore ch.;racterr contin1.ie "' 2l: BIC BEO C"PB BEG C"PB BEQ BITB BEQ C"PB BHE BICB BR 1177600,RO lclear all but 7 bits ;isnore ASCII nulls 91 tis it "C? R0,1003 61 i":ies iis it "Y1 R0,1031 i~es 71 lf,STOP,@ICOHFLG;ar• w• waitins for "Q1 ino 31 iis it "O? R0,1021 ino1 wait for one 11 IF,STQP,@ICONFLG;cl•ar "S !las ;isnore character, continue 91 120027 000023 31: 001006 152737 000002 007710 106427 000200 000730 C~B R0,1023 41 001454 120027 001454 120027 001461 132737 001407 120027 oom5 142737 000433 000003 000031 000002 007710 000021 000002 007710 120027 000017 4t: 001004 152737 000001 007673 000413 113701 042701 120127 103320 110061 105237 012601 012600 000002 007631 177400 000140 8$! 007470 007631 9t: BNE BISB "TPS BR CHPB BHE BISB BR HOVB BIC CHPB BH!S HOVB INCB HOV HOV RT! iis it "S? ino tF.STOP1etCONflGiset "S flag to susPer1d exec 1Jtiori iaccept other interrupts while suspended t200 fwait for "Q 1$ iis it "O? RO,t017 ;no 81 IF .BYTMIHSTFLG;turn on host line b't• bucket 91 @IFP,R1 1177400,Rl RJ.1140 SI R0.8UfFERIR1l @tFP ISPJt,Rl ISPJ+.RO ;set buffer inPut Pointer ;prevent sign extend iis buffer full? (96 characters) ;~es, send <f!ELL·:rno, store character iadvance Pointer irestore registers iand continue A-7 T-11 Evaluation ffodule Monitor HACRO V05, 00 Sunda• 13-Har-83 04110 Pa<e 5-1 Console Serial Line Su~P-ort Routines 58 133176 59 133204 60 133200 61 1332H 62 63 133216 M 133222 65 133226 66 133234 032737 030000 007706 611 001404 152737 000001 007344 000765 BEO Fm 012700 004767 042737 000167 HOV JSR BIC JHP 054536 7t: 000302 000300 007706 004330 FIT IR tF,APPLfF, TBAS,@tFLAGSl ;sto? on "C? :yes, oot runnu1!i ;.rosralll with "Chandler ino1 Just set flas for aPPlicatiori F-rogr~1. j and reti;rn 71 llo@tCNlLC 91 1400*131+ 136oRO i"C arid "Y ter1inate exec1Jtion i tY~'(' .l""Y I PCoCHROUT IF.USERtf ,SSTo@IFLAGSl tclear 1Jser pro~rai fla3s i re1ove breakPoints1 enter 1or1itur IHONIT T-11 [Yaluation Hodule Monitor llllCRO V05.00 Sundas 13-Har-83 04110 Pa<e 6 Console Serial line S~PPort Routines 2 3 4 itt GETLIM Pro1Pts for a line fro1 the cor1sole, and returns with the li11e ln BUFF£R and R3 cleared. Upon entr<J1 BP should inde:-: the b!Jffer F-osition just beyond the last character Previously taken fro11 the buffer (if l::iPeahead characters are desired), To throw awa~ the t'::IPeahead characters, set P.F· ar1;J f'P to zero. The characters t!:!Ped on the console {ond anY earlier t::JPeahead characters) are echoed to the cor1sole following the Pro11Ptr •;· ', Note that the ECHO routiner which was specialized for use with •oriitor co1iu11and ir1F<ut, echoes control cllaracters as '"'<character> until a se111icolon is fo1Jnd or1 the line, Col)trol characters to the riSht of a se11icolor1 {i.e. within a 'coli1;1ier1l') Jre erhoed invisibly so that the user ran echo control seo1Jenc-e; to lht· (onsol-~ ter1inal1 s 6 7 8 9 10 II 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 133240 31 133244 32 33 133250 34 133254 35 133260 36 133264 37 ll3270 38 133272 39 133276 40 133304 41 133306 42 133312 43 133314 Uses: BP Index ta BUFFER location Just beyond last fetched character <which is the location that rontairrs the fi rs.t charocter iL the new line) Returns: BP Cleared R3 Cleared BllfFER Locations indexed bs entry value of l!f' throush the end of the buffet re~lace rontents of locations at the beSinninS of the buffer FP ;-- AdJusted to inckix the new next available location in the buffe1 105037 007324 004767 000200 GETLINllCLRB @ILINFLG JSR PC.PURGE ireset line ParsinS flass for new line ;purse bottoa of bufferr clear r1mnin!i Pointer 004767 000250 012700 020076 OM767 000244 123703 007631 001m 004767 000644 126327 007467 000015 001367 105037 007324 005003 000207 1s: JSR PCrCRLF istart a new line lt6\I 2s: JSR CKPB BEG JSR CHPB BNE CLR! CLR RTS t400*040t076,RO it•Pe > <SPACE> PC,CHROUl @tFP1R3 isee if a character has been tsPed 2t ;net1 wait for one PCrECHO iecho character to console BUFFER-UR3ht01S iis last character a <CR>'" 2t ino1 wait for one @tlINFLG R3 re A-8 freset line flass froa ECHO ;set r1;rming ?ointer to besir1nin1 of line ireturn to caller T-11 Evaluation Hod>J!e Honiior HACRO V05,00 Sund•• 13-Har-83 04!10 Pa•• ' Console Serial line Support Routines 2 itf 3 4 5 6 7 8 9 10 11 12 13 GETCH rettieves characters frot t~e iri?ut buffer usin.!:I RJ as on index. The character is Placed in the lower 7 bits of RO, Lower rise charac·ters are folded to UPPer case. The N flag is set if the character is a seParator {sPaCe1 horizontal tabi verticill tab, line feedr or forr1 teed) arid the C flag is set if the character has been folded, U?or1 entr~' R3 1ust inde~: a b:ite within the console inPut buffer (F:3 < 140 octal or 96. deci1:1ll. Usest R3 Index to ne>:t character in console ir1f11t buffer (PUFFER\ Returns: RO Contains character fetched froa BUFFER in lo1o1e~ 7 bit~· UPPer bits cleared Set lo PreviatJs value t 1 14 15 16 17 18 19 133316 116300 007470 20 133322 005203 21 133324 120027 000011 22 133330 103423 23 133332 120017 000040 24 133336 001403 25 133340 120027 000014 26 133344 101003 27 133346 000270 28 133350 000241 29 133352 000207 30 31 133354 120017 000141 32 133360 103407 33 133362 120027 000172 34 133366 101004 35 133370 162700 000040 36 133374 000261 37 133376 000401 38 133400 000211 39 133402 000250 40 133404 000207 41 R3 N•C Siae couenls above ;-- GETCH:: HIWB R3 CHPB R0,1011 31 R0,1040 21 R0,1014 41 BLO CHPB BEG CHPB 21: !LHERIR3hRO INC BHI SEN ;!:f:i'St Set a character--bit 7 should be clear ;is it less than <TAB>? ;~es, not a separator iis il a sPace? i~es, a separator i1s it <FF> or lower? iri01 check for lower case iflas a separator CLC ~s: 3$! 51: RTS PC CKPB BLO R0,1141 31 ;15 it lower case CHPS ROrt172 iis it lower case •z•? BHI SUB SEC !R CLC CLN 31 1040,RO ;fold to uP~er case RTS 'a'? tno1 don't fold ;,"lo, don't folf.I ifla9 folded character 51 iflag a nor1al character PC A-9 T-11 Evaluation Module Konitor MACRO VOS.00 Sundas 13-Kar-B3 04110 Pase B Console Serial Line Support Routines 2 3 4 .ENABL LSB ;++ GETLCH recovers the •ost recentl~ sotten character. s 6 7 Uses: Index to location in BUFFER Just be~ond character to be R3 returned B Returns: 9 10 12 13 14 lS 133406 OOS303 16 133410 000742 17 18 19 133412 004767 20 133416 103002 21 133420 062700 22 133424 000207 23 24 2S 26 27 28 29 30 31 133426 004767 32 133432 10077S 33 133434 000207 34 JS 36 37 38 39 40 41 42 43 44 4S 46 47 48 133436 113703 49 133442 042703 so 133446 000207 51 fG1Jal to Previous value R3 RO 11 COntains fetched character in lower 7 bitsr UPPer bits cleared !See header of GETCH routine) H,C i·- 6ETLCH: !DEC BR 177700 000040 R3 !lETCH ;GETCHC is like GETCH except it doesn't fold lower case. PC,GETCH GETCHC:!JSR 2t: Bet: a t040,RO ADD 1•: RTS PC it+ GETNXT is like GETCH except it doesn't return separators. CSee usase infortation of 6ETCH> ;-- 177664 PC,GETCH GETNXT RTS PC .DSABL LSB GETNXT:: JSR BK! ;++ GET8P Places the back Pointer in R3 and Prevents sisn extension, This is useful to refetch characters froa a line {providing BP still indexes the besinnins of the line), Uses: BP Index to be transferred to R3 RJ Contains Yalue in BP Returns! ;-- 007630 177400 GETBP! ! ttOVB BIC RTS HBP,RJ tl77400oRJ PC A-JO T-11 Evaluation llodule Monitor HACRO V05.00 Sund•• 13-Har-83 04!10 Pase 9 Console Serial Line SuPPOrt Routines I 2 tt+ PURGE shifts the inPut buffer to eliainate space below B?t the back Pointer. Console in~ut interruPts are blocked while the shift is occurring, R31 the runnin9 Pointer' is cleared, 3 4 s 6 7 Uses! BP Index of first location to be kePt in console in~ut buffer FP flocatior1s below BUFFERtCBPJ are overwritten) Index of ti rst unused locatior1 in BUFFER 8 9 10 11 Returns: 12 BP 13 RJ Cleared Cle.red Ff Indexes new first unused location in BUFFER 14 IS 16 17 1m50 106746 18 133452 106427 000340 19 133456 004767 177754 20 133462 005000 21 133464 120337 007631 22 133470 103006 23 133472 116360 007470 007470 24 133500 005200 25 133502 005203 26 13J504 000767 27 28 133506 110037 007631 29 133512 105037 0076JO JO 133516 005003 JI IJ3520 106426 32 133522 000207 33 34 35 ;-PURGE: ! MFPS Hll'S JSR 2t: 1$! R3,@tfP isive Priorit~ ;disable interr~ts te1Poraril~ i!tet biC'k Pointer iaale a POinter to the botlo1 of the buffer ihas entire buffer been transferred? 11 ;~es -(Sf) 1340 pt,GETBP RO CLR CltPB BHIS lfflVB IHC INC RJ BR 21 BUFFER{RJ),BUffER(~O) ;trensfer a character RO HOVB RO,HFP CLRB CLR @tBP R3 KTPS RTS <SPlt PC ifix forward Pointer, lba:ck Pointer' tand runnins Pointer ire~tore Ptiorits ;+t 36 CRLF sends a carria.!ie return and line feed to the console (and Printer!, 37 38 39 Returns! RO 40 ;-- 41 42 133524 012700 005015 43 CRtF:: HOV Contains sarba.!ie (400 t 15 + 12) t400•o12+01s.RO •<CR>• <LF> A-11 T-11 Evaluation Hodule Honitor HACRO V05,00 Sunda' 13-Har-83 04!10 Paie 10 Console Serial line SuPPort Routines ;++ 2 3 4 5 6 7 8 9 10 11 12 13 133530 H 133534 IS 133536 16 17 133540 18 133544 19 133546 20 133552 21 133554 22 133562 23 133564 24 133570 25 133572 26 IJJ574 27 133600 28 133606 29 133612 JO 133620 31 133622 32 IJ:u24 33 CHROUT outputs the lower b!lte of RO to the console' and to the ilU>: Port it the Printer Port bit is set, If the UPPer b':lte of RO is non-zero, it is also sent to the ~ort<s>. CHROl outPuts onl~ the lower b~te of RO, and CHR02 car1 be used to 01.1t.Put a character to the auy,, Part onl':I. Uses: Lower b':lte contains first ASCII character to be outPut UPPer bYte contains zero or second character to be output RO ;-,[Ht\Bl 004767 000004 105700 001431 CHROUT: !JSR TSTB 105737 177564 100375 110037 177566 CHR01!! TSTB 000423 11[0 BPL HOVB BR 000004 177552 CHR02! ! 8!18 BEQ 177552 TSTi 132737 001774 105737 000240 106746 106427 000340 112737 000047 177452 110037 177450 113737 007711 177452 106426 000300 tt: 000207 NOP Hf PS "TPS HOVB llOVB HOVB HIPS SWAB LSB PCoCllROl RO 11 ioutPut lower half of RO iis there a second character? lno register iwait until transaitter read':I bit is set ;then outPut a character ;no, done 11 1004o@IAtSREG iis aux Port trans1itter eaPt~? CllR02 ;oo, wait until it is etAISREG iis DSR active? iPlaceholder for above line -(Sf) ;save Priorit!:;I 1340 fblock interru?ts while we 1047o!IAICRE6 ienable aux Port trans~itter RO, !IAtXBUF ;output a character etAUXFLG1@IAS.CREG ;restore preYious aux port co1111and word ISP)I ;restore pr·iorit~ RO PC @ICIXCSR CHROI RO• !ICIXBUF RTS .DSABL LSB A-12 ichec~ console trans1itter status T-11 f,alualion "odule "oni\or ttACRO V05,00 Sund•• ll-Har-83 04:10 Page 11 c~ole Serial line SUPPort Routines I .SBTTL General 1/0 SUPPort Routines 2 3 4 Ht s ASCOUT outPuts the character in RO to the Port(s) if it is not a control chararter. If S01 the special seauences '"A' throtJ!lh '"-' are sent with excePtions <SF'>, <ESC>, aM <DEL>. 6 7 8 9 10 Uses: 11 Returns: 12 13 14 15 133626 16 133632 17 133636 IS 133640 19 133644 20 133646 21 133650 22 13365-4 23 133656 24 133660 25 133664 26 27 133666 28 mm 29 133676 30 133702 31 32 133704 33 133710 34 133714 35 133720 36 37 133722 38 133726 39 133732 40 1JJ73b 41 133742 42 133746 43 RO Lower 7 bits contairi character to be Printed RO Contains !larbase ;-- 042700 120027 001413 120027 101331 001416 120027 001422 000300 062700 000721 CltPB 1177600,RO RO•l177 BCD II CllPB BK! RO.t040 CllROOI SS R0,1033 ;•ake RO a 7-bit character ;is it delete? i!:fesr t!:We <DEL> iis it control1 frio, t'JPe it. nor•all~ i~ke spaces visible ;is it escaPl'? JS i'JeSr t':4PE! 177600 000177 ASCOUTI :BIC 000040 000033 CHPB BEO SWAB ADD BR 8£0 040136 012700 042074 004767 177632 012700 046105 000415 1$! 012700 051474 004767 177614 012700 037120 000703 st: 012700 004767 012700 004767 012700 000670 3S! 042474 177576 041523 177566 000076 HOV JSR "ov <I MOV JSR HOV BR 1400t123t074,RO ;I••• <S HOV 1400*1051074,RO ;1,Pe <E fC,CKROUT t400i10ltl231RO ;t~~e SC f·C,CKROUT t076,RO it~F'e' ~· CKROUT *ov 4t: 1400*104+074.RO ;1,,e <D PC.CHROUT t400*1l4tlOS,RO ;1,,e EL BR JSR JSR HOV BR -'.ESC> ino, l'JPe "(letter) t400t100t13'>rRO ;1ake it second character after , . . , CHROUT iand t~Pe it RO PC,CHROtll 1400*076+120•RO tt'::IPe P> CHROUT A-13 1-11 (valuation Module Hoo1tor HACRO V05.00 St.wlda' 13-Har-BJ 04:10 Pa•• 12 General I/O Support Routines ;++ 2 J PRIMTA ?tints an ASCII strH1S Pointed to b!> Rl. 4 blar1~. b~te. 6 Uses: 7 B Returns: The string 111Jst end •,nth o s 9 ;-- 10 RI Points to strinS of b~tes to be Printed RI f'oir1ts ta bste just be':lond first b~te in s.trins containing zero 11 12 13 133750 14 133754 IS 1J3756 16 1JJ760 17 18 004767 177564 112100 001374 000207 .(NABL lSB 1S: JSR PCoCllROI P!UNTA: :llO\IB <Rll+oRO BH£ ;~et a character froa strins iPrint it If RTS PC ,DSABL LSB A-14 1-11 Evaluation Hodule "onitor llACRO V05.00 Sunda• 1J-"ar-8J 04:10 Page !J General 1/0 SUPPort Routines ;++ 2 J 4 5 6 7 8 9 10 11 PRINT outputs a radix-SO strins pointed to b~ R2. The string tust end with a blank word. PRINTl outPuts a sinsle radix-SO triPlet in Rt, PRINT2 outputs a Pair of radi~-50 triPlets Pointed to bY R2. Ho ter1inator is needtid. PRINTJ outputs the 1ost si!niticant radix-50 character in Rt and 1ultiPlies R! b\I 40. (PRINTJ is 'ailed 3 ti1es b• PRINT!.! Uses: R2 Points to RAD50 string to be Printed IPR!Nll R! Contains RAD50 triPlet to be Printed (Pfi'.l~Tl> Points to RADSO f'air of words to be Pt·int.:;cl <PRIIH2i 12 13 14 15 16 17 18 19 20 21 22 Contains ~AD50 character to be ?tinted {f'P.INT3) ReturM! Points to next word after blank word in RAD50 strin3 iPRI~T) R! Contains zero IPRIHT, PRINT!, PRINT2l Points to word after the Pair of uords Printed (PRINT2l ConUins <Previous value of Rl> ttOii 1600. l 40, (F'RINT3> ;-- .ENABl JSA PRINT:: "ov BHE RTS .DSABL LSB PC.PRINT! IR2lt.R1 i!let • \ri•le\ 1$ inot the end 'lift PRIN12t:"ov HO\/ (R2lt.R1 PC.PRINT! IR2lf ,R1 000004 000000 PRINT!:tJSR Pf!IHT4: JSR PC,PRIHT3 PC,PRH!l3 it'll?e the first character RO RO tsoi50.R1 i1;hvide b':I successive subtractior1 OOJ!OO PRIHT3: :CLR 1$! INC SUB BCC DEC 2J 24 133762 004767 25 133766 012201 26 133770 001374 21 mm 000207 28 29 JO 133774 012201 31 133776 004767 32 134002 012201 33 34 134004 004767 35 134010 004767 36 37 134014 005000 38 134016 005200 J9 134020 162701 40 13~24 103374 41 134026 005300 42 134030 062701 43 134034 004767 44 134040 005700 45 134042 001413 46 134044 020027 47 13~50 103413 48 134052 001415 49 134054 020027 50 134060 001415 51 134062 062700 52 134066 000167 53 54 134072 012700 55 134076 000773 56 57 134100 062700 R2 000016 1t! JSR 000002 ADD OOJ!OO 000062 JSR !ST BEQ 000033 CHF' BLO BEQ 177436 6t: CHP BEO ADD JHP 000040 2s: HOV 000035 000022 000100 3t: it~Pe the tri?let PC LSB 1$ RO 150150,R! PC,R!X40 RO 21 RO•t033 31 41 RO,t035 51 1022,RO CH ROUT hiet a triPlet ;t~n>e it ;!iet another ;and the second ;tr':I to subtract 1600. iworked1 no borrow ; fix RO iand Rl i1ultiP1' RI O• 40 ;o •eans space 1032 1eans Z iA throu~h Z i033 1eans S ;035 is undefined1 but t1:1Pe t ;o throu~h 9 and'•' 1040,RO 61 ;t':iPe SP.Jt:e BR ADD 1100,RO iA throu!h Z A-15 l-11 Ev•lua\ion Hodule l!oni\or HACRO V05,00 5"nd"" 13-Har-BJ 04!10 Pa;e 13-1 General 1/0 Support Routi~es 58 134104 000770 59 60 134106 61 134112 62 63 13m4 64 134120 65 66 134122 67 134124 68 134126 69 134130 70 134132 71 134134 012700 000044 000765 4t: 012700 000052 000762 st: 006301 006301 006301 010146 006301 006301 72 134136 062601 73 134140 000207 74 BR 61 HOV tOH.RO BR 61 HOV t0521RO BR 61 R1X40:: ASL Rl ASL ASL HOV ASL RI Rl,-ISPI RI AS!. ADD Rl IS!'lt.Rl RTS PC ;t'JF-E J il'::lr-e t f1ultiPl'::I Rl b'::I S Rl A-16 ;save a x ;32 x ;~Ius S Xaakes 40 X T-11 Evaluation Hodule Hon1tor MACRO V05.00 Sund•• 13-Har-83 04:10 p,;, 14 General 1/0 Support Routines it+ 2 3 4 5 6 7 8 ECHO reads the line b1Jffer as characters are t!:IPed in arid echoes the1 to the cor1sole (and Printer, it selected), Control characters are echoed as "(letter) exce~t within co11ents. LINFLG is used to record co1eent stattis. If ECHO encoonters "R, "U, "Xr or <DELETE>, it resPonds or 1odifies the line buffer accordinsl~. ECHO be'.3ins echoinS characters at the runnin!l Pointer <R3) and continues until R3 = FP or a <CR> is found. 9 10 11 12 13 14 15 16 17 18 19 134H2 20 134146 21 134152 22 134154 23 134160 24 134162 25 134160 26 134172 21 mm 28 134200 29 ll4202 JO 134206 31 134210 32 134214 33 134216 34 134224 35 134232 36 134234 37 IJ4240 JS 134242 39 134246 40 41 134250 42 134252 43 134256 44 134262 45 134264 46 47 134266 48 134270 49 50 1J4272 51 IJ4276 52 IJH02 5J 134306 54 134312 55 56 134314 57 134320 Uses! Index to first character in ~UFFER to be echoed Indl'x to er1d of data in buffer R3 rp Returns: Index to location in llUFFER loSicallY just be~ond last echoed b•t• (This aeans RJ returns zero if "U or "X wa~ the lost character in the buffer1 etc.) R3 j-- 116300 120027 001447 120027 001002 012700 120027 001450 120027 001432 120027 00145J 120027 001003 152737 132737 001006 004767 100404 004767 000403 007470 ECHO!: OOOOJO 000025 000025 ltO'IB CHP~ 000022 3i! 000015 BED CHPB BHE HOV C"PB BED CHPB BED 000177 000073 000020 007324 000020 007324 51: 177152 llUFFER!RJhRO RO.t022 11 R0.1030 JI 1025,RO RO,t02S 2$ R0,1015 171 R0.1177 41 RO,t073 51 ;Hot character ;is it "R? ;'::H!st ret!:IPe line iis it "X? ;no i1aP "X to ~u ;is lt "U? iYes, car1cel line iis it <CR>? ;:1es1 stot> echoins characters !is it <DELETE>' CHPB BED C"PB BNE BISB BIT8 BNE JSR BHI JSR BR f'C,GETCHC 61 PC•ASCOUT Bl ;type non~~rintable characters visibl~ ;~s1 delete last charat'~r jis it a se1icolon ino tF,COHH1@tl..INFL6i!:lesr show we are in a comient tF.COPtl'lr~tllNFLG;are we in a co11ent? ;~es1 echo characters literall!:I 71 177360 14$: 005203 004767 177252 120337 007631 103727 000207 7t: 6t: INC JSR CHPB BlO RTS R3 PC•CHROUT R3,Hf P ECHO PC ;advance runoins Pointer it'::!Pe non-Printable characters as the~ ore ; have we echoed e>'er:1thir1!l? inor do so~e ~ore i~s' continue 005203 000207 111: INC RTS R3 PC iste? Past <CR> iand return 1f: JSR JSR JSR HTPS BR Pc.101 PC.!51 PC,G£TBP tOOO ;so1e coa1on code ;reaove "R fro& line ;so bark to the beSinninS itake characters asain iar1d echo line JSR JSR PC.IOI PC.GETBP 004767 004767 004767 106427 000761 000172 000210 177130 000000 004767 000150 004767 mm as: 2s: Bl A-17 ;so•~ co1ton code i!!o back to the botto1 of the buffer T-11 Evaluation Kodule Honitor HllCRO V05.00 Sundas 13-Har-83 04:10 Pa•• 14-1 General 1/0 Support Routines 58 134324 59 m330 60 134334 61 62 134336 63 134342 64 134346 65 134352 66 ll4354 67 134356 68 134364 69 134366 70 134372 71 134370 72 13H02 73 134406 74 134412 75 134416 76 134420 n mm 78 134430 79 134m 80 134440 81 134444 02 83 134452 84 134456 85 134462 86 134466 87 88 134470 89 134474 90 134500 91 134504 92 134510 93 94 mm 95 134514 96 134522 97 134524 98 134530 99 134532 100 134536 nmo 110337 007631 106-427 000000 000207 106427 004767 120337 001443 005303 032767 001415 012700 004767 012700 004767 012700 004767 000410 012700 004767 116300 004767 116300 120027 001002 105037 004767 106427 000673 000200 000144 007630 106427 004767 004767 105037 000207 000200 177126 177020 007324 4S: HOVB HTPS RTS R3,HFP 1000 PC ;indicate buffer eaPts ;ta~.e characters a!iairi iwait for new characters HTPS JSR CHPB BED DEC BIT BEU HOV JSR HOV JSR HOV JSR BR HOV JSR HOVB JSR HOVB CHPB BNE CLRB JSR HTPS !200 Pc.151 ;don't take characters while buffer is fi;.;ed ;reaove <DELETE> fro1 line, decre111ent FP iis there an!:!thins to delete? ino' continue iback UP to character to be deleted isee if video 1ode ibranch if not ;send bac:ksPace R3,~19P BR 91 R3 IF, VT, THPlllD 200t 110,RO PC,CHROUT 140,RO PC,CHROUT 110,RO PC•CHROUT 2101 1134,RO PC,CHROUT BUFFER<R3hRO PCoASCOUT BUFFERIRJ!.RO R0,1073 131 mrnFLG Pc.151 1000 81 10S! HTPS JSR JSR CLRB RTS 1200 PC,ASCOUT PC.cRLr ilLINFLG PC 110300 1ss: 116060 007471 007470 16S: 005200 120037 007631 103771 105337 007631 000207 HOVB HOVI INC CHPB BLO DfCB RTS RJ,RO iset 2 scratch COPY of runnins Pointer BUffERl!(ROl,BUFFER<ROI ;reoov~ I ch<rac\er froo buffer RO RO,etFP iis that ever~thir13? ;not do 1ore 16$ lfi}: Ff' HFF' PC 004000 052744 1oos: 000010 177132 000040 177122 000010 177112 000134 177100 007470 177166 007470 000073 007324 000030 000000 200S! 2101: 13S: 9t: A-18 isend space isend backs.face ;s~,1P Printer '\. itsPe "\ 1 ;get deleted charaeter it!>Pe it icheck if we deleted a •;• i~esr so we aren't ir1 a co111ent an·:c1111ore ; re1ove deleted charact~r fro11 bufferita~.e character-s agair1 iecho rest of line idor1't take characters for a while iecho the sPecial character ;start a new line iinitialize flass T-11 Evaluation liodule Monitor HACRO VOS. 00 Sun<la• 13-Har-83 o4:1o Page 15 General I/O SUPPort Rout1ries ,SBTTL Hast line SUPPort Routines 2 3 4 ;++ s HOSTIN answers aux. f'Ort receiver interrupts and buffers the inco•ins characters in HOSTBF {up to 32 characters), "p, "Ct "S, arid "Y are isriored t'Olling fro1 this Port. When the buffer beco11es half-ftJll (10 characters}, a "S is sent to the ho$t, 6 7 8 ;~- 9 10 11 13l540 010046 12 134542 010146 13 1345-14 113700 177550 14 134550 132737 000060 IS 134556 001050 16 134560 042700 177600 17 134564 001464 18 134566 120027 000003 19 13-4572 001453 20 134574 120027 000031 21 134600 001450 22 134602 120027 000023 23 134606 001445 24 134610 113701 007/,72 25 134614 042701 177400 26 134620 120127 000040 27 134624 103036 28 134626 110061 007632 29 134632 lOS2l7 007672 30 134636 120127 000020 ll 134642 103435 32 134644 132737 000002 33 134652 001031 34 134654 IOM66 000006 35 134660 ·012700 000023 36 134664 004767 176664 37 134670 152Jl7 000002 38 134676 000417 39 40 134700 113701 007711 41 134704 052701 000020 42 134710 110137 177452 43 134714 113737 007711 44 134722 012700 000007 45 134726 106466 000006 46 134732 004767 176602 47 134Jl6 012601 48 mm 012600 49 134742 000002 50 HOSTIN: :HOV HOV HOVI 177552 BITB BNE BIC BEO Cl!PB BEO CHPB BEO CHPB BEO HOVB BlC CllPB BHIS HOVB !NCB CHPB BLO BITB BNE HTPS HOV JSR BISB BR 007673 007673 3s: 177452 2$; 1$: HOVB BIS HOVB HOV8 HOV HTPS JSR HOV HOV RT! RO,-!SP> Rh-ISP! HA•RBUF ,Ro 1060,HA•SREG l• 1177600,Ro u Ro.tool 2$ R0,1031 2• R0,1023 "HHFP,Rl 1177400.Rl Rl ,140 2f Ro,HOSTBF !RI) @IHFP Rl 1120 11 ;f'reserve soae resisters for scratch ;set the character' reset interruFl ;rra1in!l or overrun error? ;~es, beeP console' and isnore character ;clear all but 7 bits ;isnore ASCII nulls ; i!lnore "C ;anc1 "Y ;and "S so that host Iine traps the sa1e chars ias console line1 even thou!lh isnored ;set the host buffer inPut Pointer iPrevent sisn extend ;is buffer full? i~es1 beep the console1 isnore error ;no' store character ;advance the Pointer iis buffer half full' ;no1 returr1 tF.STOf',@tHSTFLG;have we alread~ sent "S ~o ho:.t? ;~sr return 11 ;restore Priorit~ in case another char coaes in 6!SP> ;send ~5 lo host t023,RO PC•CHR02 tF.STOP1~tHSTFLGishow we have done so 11 Pset saved cop~ of ASCREG @IAUXFLG•Rl iadd the error reset bit t201R1 ireset errors R!.UAfCREG irestore to nor1al @IAUXFLG•PIAfCRE6 ibeeP t~ie console on error 1001.Ro frestore r>riorit~ in ca-:.e uiolher char co11es in 6!5P> PC•CHROI ; restore resister::. !SPlt•Rl !SP>t.RO A-19 T-11 Evaluation Module Monitor HAtRO VOS, 00 Sundas 13-K•r-83 04:10 Host Line SUPrort Routines P•~e 16 ;++ 2 3 4 HGETCH !:lets a charaC'ter fro1 the host input buffer and shifts the buffer down one character, If the buffer is reduced fro• 16 or 1are characters to ju5t four, a ~a is sent to the host • Do not call this routine if no characters are available in HOSTBF (i.e. HF'f' = 0), •• 6 7 e Uses! 9 HFP Index to next available location in HOSTBF F.STOP Status fla9 =1 if a ~s has been sent to the host 10 Returns: 11 Lower byte contains the first character in HOSTBF, UPPer bYte contains si~n extensior1 of bit 7 Decre1ented to index new next available location in HOSTFF HFP F.STOP Cleared if ~o was sent RO CorAains !iarba!le RI 12 13 H 15 16 17 ;-- IS 19 134744 20 134746 21 134752 22 134754 23 134760 24 1347.12 25 134770 26 27 134772 28 134774 29 135000 30 135004 31 135006 32 135014 33 135016 34 35 135020 36 135024 37 135026 38 135034 39 135036 40 135044 41 135046 42 135052 43 1JSOS4 44 135056 45 135060 46 135062 47 135066 48 49 135074 005001 HGETCH! !CLR 113746 007632 llOVB 11: INC 005201 120137 007672 CHPB BHIS 103004 ltOVB 116161 007632 007631 BR 000770 Rl @tHOST9F 1-<SPl ;save the first character in buffer 106746 31: 106427 000340 -41! 120137 007672 103005 116161 007632 007631 005201 000770 -ISP> HFPS HTPS CKPB BHIS HOVB INC 9R om Rl iare we too close for coafort? ;yes1 disable interrupts before doins this or1e HOSTBF(Rl)1HOST8F-1(R1) ;shift down one character 1$ jdo entire buffer uf' to one less than HFP Rh@IHFP J$ ;save Priority ;disable interrupts to Prevent sc:rew•JPs Rl1HHFP ;are we really done? i~sr all characters transferred 5• HOSTBFIR!J ,HDSTBH <RI l ishift down one character mo R1 4l HHFP RO HHFP,14 ;adjust buffer iru:rut Pointer 105337 007672 SI! 005000 123727 007672 000004 101006 132737 000002 007673 001402 012700 000021 2$: 106426 112601 005700 001405 004767 176466 142737 000002 007673 TST BED JSR BICB -s sent> ;no 2• iPut ~Q in RO t021•RO ;restore priorit~ <SP It irecover character <SPlt.RI ;did we decide to send ~a? RO ino 6• ;yes, send ~a to host PC1CHR02 tF.STOP,itHSTFLGishow we have done so 6t: RTS PC 000207 CLR CKPB BHI Bm BED HOV HTPS HOVB 2• ;have we reduced to just four characters? ;no tF.STOP,~IHSTFLG;•nd ••s A-20 1-11 E'aluation "odule "•nitor llACRO VOS.00 Sunda' 13-"•r-83 04!10 Most Line Suf.F1lrt Routines 2 3 4 5 6 7 8 .SBTTL l/D Ini t1alization and LED Driver it+ IOIMIT asserts the RESET L line on the board' thereb~ clearins the cor1fi!:luration of the Peripheral chips. It then initializes the Peripheral chiPS to an idle state, SETAX2 confisures the aux. Port to oPerate with a 16X clock' so that its baud rate will be eoual to that Jf the console ?ort. The RS-232 control outPut siSnals are left deasserted, ani;l the aux. F·orl receiver and trans•itter are left disabled. S£TtiX1 is lilE' SETAX2, e}~tert that the clock divisor of the aux, Port is set to 16 if RO :: O uPon entrs1 or 64 if RO ; 1. A 64X cloc~ 1eans that the au~·:, Port ba1Jd rate will be one fourth of the console P"Ort b~ud rate. 1 9 10 11 12 13 14 15 16 135076 17 135100 18 135106 19 135114 20 135120 21 135124 22 135126 23 24 135134 25 135142 26 135150 27 135154 28 135160 29 135166 30 31 32 ;-- 000005 112737 112737 IOS<l37 105037 005000 112737 000212 177446 000010 177444 177560 177564 IO!NIT: :RESET IUIVB cm 1212.HPICREG 1010,@tPIPDRC etetRCSR HCIXCSR SETAX2: CLR 000200 177452 SETAX 1: "DVB 1200,HAICREG "DVB CU!B 112737 000100 177452 152737 000002 007464 063700 007464 110037 177452 112737 000020 177452 000207 "DVB 8ISB AOD IUIVB "DVB RTS RO 1100,HAICREG 12,@IHFB251 @l"F825loRO RO,HAICRE6 1020, HAICRE6 PC ;disable interrtuPs iconfi~ure 8255 with port II: a<:: inPut idisable LED disPlas idisible DLART re<:ei11er idisable DLART trans1itter iindicate lbX clock for aux port isend a har1less 1ode word to 1ak~ sure next iword is interFreted a·; a central word so that ;this control word Puts us bark to sode load i1a~.e sure baude ratl!s will aatch iadd in 1ode b':lte incase user has chan!fed ar1!::1thinS ir101o1 initialize todes ireset error flass, disable 8251 ;++ SETAUX reconfisures the aux. Port to o~erate with a 16X clock if bit 7 of COHFLG o o, or with • 64X cloc~ 1 f bit 7 of CONFLG !. The •u::. ?orl re.cei<1er and trans1itter are left disabledt but the RS-232 control s1snals rtauest-to-send ind data-ter1inal-read!::I are asserted. ti cOP\:I of th~ cot1o:nd b~te sent to the au:{, port is saved in HUXFLG for future reference, since AiCRtG is a write-onl!::I location. 33 34 35 36 37 38 39 40 41 135170 42 135172 43 135176 44 135200 45 135202 46 135206 47 135214 48 135222 49 p,,, 17 0 ;-- 005000 105737 007710 100()01 SETAUX: !CLR TSTB BPL RO @tcONFLG ;is 64X clock currentl~ selected? lt ;no1 16.X clock 005200 INC I(() 004767 177720 11: 112737 000042 177452 112737 000042 007711 000207 JSR PC,SETAX1 "°VB "OVB t042,@tAtCRE6 t042r@tAUXFLG RTS PC A-21 ;set aux Pott baud rater disable ;co11and 8251 ta assert RTS1 DTR1 and disable lsave a COP~ since AtCREG is write onl~ T-11 Evaluation Modulo Monitor llACRO V05.00 Sund•' 13-Mar-63 04:10 Paso 18 1/0 Initialization and LED Driver ;++ 2 3 IOVECT inilialiies the interrupt vectors at locations 601 64, 70r 741 ,,,, lJOr and 134 to Point to an RTI instruction with Priorit':I 7. It then attaches 4 5 6 7 8 9 10 11 mm 12 135224 13 135230 14 135234 15 135240 16 135244 17 135246 18 135252 19 135256 20 135262 21 135266 22 135272 23 135276 24 135302 25 135310 26 27 135314 28 135322 29 135330 30 135336 31 135342 32 interruFt service routines for console b.reakr invalid instructiorrr break1>oint1 and L[f) disPla!:I refresh, The power fail vector is also attached to ar1 !\TI instructiorH with Ptiorit':I 6. are disabled. The LED disPla!:! hardware and Doth ~erial Ports ;-IOVECT:: 012700 000060 012701 000014 012no 135676 012720 000340 071105 012720 012720 012700 012720 012720 012720 012720 012737 005037 137114 000340 000010 137334 000340 137174 000340 135344 000104 007676 tt: ;initialize 1/0 vectors and disable irrterruFts ;t5 coded Priorit!:I vectors (2 not usedJ ;set address eleaent to null service ro1Jline iset Priorit~ level to 7 HOV KOV KOV MOV KOV >IOV KOV t060,RO t12 .. Rt ttNl.lll , IRO> t t340.!ROlt RI.ti tBREAK,IROlt t340olROH to10.Ro !!TRAP, <RO>t t340o!RO >t tBRKPT, !ROH t340olROH HOV ClR tDISPLA,@tlEDIV ;conne<:t LED disPla~ routine ~tKEYf'IV idisconnect ke':!Press service vector MOV MDV ftOV ltOV sos ;connect console break roytine iPriorits 7 for console break icor1nect invalid instruction trai> ;conrrect breakpoint trap fnow disable iriti'rruPi hardware fot Ports >IOVB 1010.etPIPORC idisat>l• L[D ·Jis'1" 142737 000100 177560 BlCB tlOO,@tCfRCSR ~disable corisole receiver BIClf ttoo,@tCiXCSR :disable console trans1itter 142737 000100 177564 CLRF @tASCREG idisable ouxiliars receiver and trar1sDitter 105037 177452 000207 RTS PC 112737 000010 177444 A-22 T-11 Evaluation Hodul• Honi\or MACRO l/05,00 Sunda• 13-Har-83 04:10 I/O Initialization and LED Driver Pa~• 19 1 .ENABL LSB 2 3 DlSPLA is the LED refresh interrupt service routine. It 1ultiPlex~s the contents of SEGBUf ta the LEDs throush Parallel Port At and checks if a 4 5 6 ke~Pad ke~ has been Pressed. 9 10 11 12 13 14 15 16 17 18 19 135344 20 135350 21 135352 22 135354 23 135356 24 135362 25 135364 26 135370 27 135372 28 135400 29 135406 30 135412 31 135414 32 135420 33 135422 34 35 135426 36 135432 37 135436 38 135HO 39 135444 40 135450 41 135452 42 135454 43 135462 44 135464 45 135470 46 135474 47 135476 48 135502 49 135506 50 135510 51 135512 52 135514 53 135516 54 135524 55 ll5526 56 135532 57 135534 lf a ke~ has been pressed and the value in location KEYPIV is not zero, then control will be transferred to the routine at CKEYPIVl fer interrupt driven kesPad inPut. The ke~Press routine at CKEYPIVl tust restore R21 R1, and RO frDlll the stack (in that order) before executirul an RTJ, Note that if the coritents of SPCLSF are nonzero' a flashin~ disPla~ of 1 >: >< will appear ir1 the LEDs instead of the cor1tents of SEGSUF, Error' DISP'LA also C'Ol.H'!ts Ule nu1ber of ti1es it has been called {which is deter1ined ~ the hardware to be 800 tites Per second, when disPla~ refresh is er13bled) in the location Til1E. The lower 10 bits of TIHE count 0 throu9h 799., and the UPPer si>< bits count 0 throu9h S9, seconds. 7 8 ;-- 005237 010046 010146 010246 013700 005100 032700 001016 042737 062737 013700 005100 032700 001002 005037 007730 013700 042700 006300 016001 005737 001422 005001 032737 001015 016001 132700 001410 013702 132700 001001 000302 105002 060201 112737 000301 110137 000301 112737 007730 177770 DISPLA:: INC ltOV HOV HOV 007730 llOV COH 001440 BIT 001777 007730 002000 007730 007730 BIC 8NE ADD llOV 170000 COH Bil BNE 007730 CLR 1$: HOV etSPCLBf BED CLR 31 Rl 1001000,HTll£ 3$ ERRSEG<ROJ.Rl 1004,RO 31 @ISPCLBF 1R2 I002,RO 41 R2 R2 R21Rl 1010,PfPIPORC Rl Rt.HPIPORA Rl 1007.HPIPORC BIT llOV BITB llEO 41: HOV BITB BNE S11AB CLRB 000010 177444 3t: HOVB 177440 KOVB 000007 177444 HOVB 007726 000002 ADD SWAB SWAB jprePare to check for overflow of BOOths ;no overflow II 1001777.@ITIHE i0Yerflow1 so clear BOOths 1002ooo.em11E ;an~ add 1 second icheck if overflow past 60 seconds @ITIHE,RO RO 1170000,RO ;no overflow of seconds 11 i~es' so clear the whole thin! HTlllE HOV BNE 135756 000004 ;preserve resisters TSl ASL 001000 007730 ;kee~ a count of BOOths ot seconds in TIME RO.-!SPl Rl•-<SPl R2,-!SPI HTll£•RO RO 1001440,RO e1n1tE.RO t1777701RO RO St:GBIJF!ROJ.Rl BIC 007712 007726 mm A-23 istriP RO to 1ake it a aultiPlex address jaake it a word index ;get seS1ent data for this di9it Pair ;is there a s,ecial error disPla~? ;no itMJe for approx. 1/3 of each second ;flashing error ~essase1 no less ;iet se!l1ent data for ' Error' ;is this disit 2 or 3? ino1 so no overlay on u~f'er disPla~ jget overlay characters iis this digit 3? idi!ht 3 character- is in Uf'i:-er bYte ;swap for disit 2 ;save onlY UPPer disPlaY character ;c-oabine UPPIH and lower dis.Pl~~ characters iturn Gff disPla~, enable UF'Per disPla'3 latch ;set UPPer disPla~ data in lower bYte ioutPut uPPer disPla'3 data ;back to lower displa~ data jdisPla~ still off, but uPPer latch closed T-11 Evaluation llodule Kooitor MACRO VOS, 00 Sunda' 13-Kar-83 04!10 p,~. 19-1 1/0 Initialization and LED Driver 58 1~542 110137 177440 59 135546 010001 60 135550 006201 61 135552 110137 177444 62 135556 000240 63 135560 113702 177544 64 135564 042702 177417 65 135570 060002 66 135572 013701 007704 67 135576 001413 6B 135600 074201 69 135602 001420 70 135604 032701 000016 71 135610 001027 72 135612 032701 000360 73 135416 001424 74 135620 005037 007704 75 135624 000421 76 77 135626 004767 000046 78 135632 005701 79 135634 100415 BO 135636 010237 007704 Bl 1™42 000412 82 BJ 135644 052737 100000 007704 84 135652 005737 007676 BS 135656 001404 B6 135660 004767 000014 B7 135664 000177 052006 88 B9 135670 012602 90 135672 012601 91 135674 012600 92 135676 000002 93 94 135700 010200 95 135702 000300 96 135704 042700 007777 97 135710 012701 000004 9B 135714 006300 99 135716 103013 100 135720 001013 101 135722 005301 102 135724 006302 103 135726 060201 104 135730 042701 177740 105 135734 006202 106 135736 010200 107 135740 042700 177761 IOB 135744 000207 109 110 135746 077116 111 135750 012701 177777 112 135754 000770 113 114 KOVB llOV ASR KO\IB NOP KOVB BIC ADD llOV R!.!tPIPORA RQ,Rl RI Rl,!tPIPORC XOR BEQ BIT BNE BIT BEQ CLR BR elPIPORD,R2 t177417,R2 RO,R2 !tDEBNCE,RI SI R2,RI 61 t000016,R1 21 t000360•RI 21 !tDEBHCE 21 ss: JSR TST BK! llOV BR pc,71 Rl 21 R2,etDEBNCE 2l 6t: BIS TST Brn JSR JKP !tKEYPIV 2l PC,7• eKEYPIV BEO ioutPut lower disPlaY data i1ultiPlex disit address (byte index) iturn on display inow do keYPad inPut,,, ;~.eYPad ret•1rn 1irres in bi ts 4 to 7 ;clean UP keYPad data ;co1bine index and return data ;set a scratch COPY of debounce st;ote resister ;not debouncins a ke':!' take 2 r1e1,,: onE- itotal 1atch1 take it as a keYPress ico1Pare 1ultiPlex address field inot the saae1 so isnore it icoaPare return line field ;sa~e ke~ held1 so iSnore it ino lonSer saae ke~ Pressed, so reset state ;convert positional bit to nu1ber iis this a valid ~.eY depression? inor so isnore it ;yes1 take it and wait for confiraation ttOOOOOr@tDE!'INCE;1ake sure we set onlY one keYPress per keY ido we have an active vector? ;nor discard ke!:IPress i!iet a useful key nu~ber in R1 iPass it to attached s@rvice routine KOV KOV KOV •NULLI : : RT! ISPlt.R2 ISP)f ,RI ISP)t.RO ;service routine at @KEYPIV should also restore ;the resisters in this 1anner 7t: BNE DEC ASL ADO BIC ASR KOV BIC RTS R2,RO RO t007777,RO t4•RI RO 9l IOI RI R2 R2•RI 1177740,RI Rl R2,RO tl77761,RO PC i1ake a scratch COPY i1ove key data to uPPer byte H:.eeP on}y return line data ;shift out 4 bits 1a:: ishift out a bit, look for a one ;didn't find it i1ore than one true bit--invalid data iRl is now 3, 2, 11 or 0 ileast two bits are 0 icolbine oultiPle;: address and Positional count iclean UP key code ; restore R2 SOB KOV RloBI tl77777,Rl BR Ill ikee? searchins iindicate invalid data ;restore and exit 2t! at: 11s: 9S: lOS: llOV SWAB BIC KOV ASL ace .DSABL LSB A-24 ; restore RO 1-11 Evaluation Hodul• llonitor HACRO V05.00 Sund•• 13-ltar-83 04tl0 Pase 19-2 J/O Initialization and LED Driver 115 135756 000120 000134 000120 ERRS£Gt .WORD 116 135764 000120 000171 000000 .WORD 120.134,120 12o.i71,ooo ; r, o' r irr [, <;;Pace T-ll Evaluation Hodule Monitor MACRO VoS.oO Sund•> 13-Mar-83 0~:10 Pase 20 I/0 Initialization and LED Driver .S8TTl LED DisPla~ SuP?ort Routines 2 3 ;++ 4 DSPI•IG ta~-.r:•s a hex nu1ber in the lower 4 bits of RO and disPlass the Rl = 0 to index the rightaost lower LED disit1 = 1 to index the ;ighttost 1Jf'Per LED diSitr • .,, = 13 lo indi!~{ the left111ost •JFf't::r LEP. disit. Re+,1Jrr1s Rt inc:reaented b'!J 2 to index the next di1it to the left en the sa111e disPl<::::1 row, 5 6 corresPor1din!l seg1ent f'attern on the LED di!lit. indexed ti<J Rt. 7 a 9 10 11 12 13 14 15 16 17 Uses: Rl Hex value lo be disPla~ed Index to LED di!lit on which to disPlas it Returns: RO RI Previous value with bits 15. throuSh 4 cleared Previous value f 2 ;-- IB 19 20 135772 21 135776 22 136002 23 136004 24 136012 25 136014 26 27 136016 136021 28 136022 136025 29 136026 136031 30 136032 136035 31 32 RO 042700 177760 DSPDIG::m C!tP 020127 000013 101004 BHI 116-061 136016 007712 "OVB TST 005721 000207 It: RTS 1177760,RO R11to0001J ;1axil'tM value for di!:lit index 1$ Pout-of-r<Jnge, so isnore call HEXSEGCROJ.SEGBUFCR11 ;diSPla. disi\ (Rl)f ;index next digit of saae disPla~ level PC 006 133 llEXSEG: : , BYTE 077,006.133,111 ;o, 1, 21 3 146 007 155 175 .am 146,15511751007 ;4, 5, 61 7 177 157 w .BYTE 177115711671174 ;g, 91 Ar b 174 071 136 171 .BYTE 071,136d71r161 ;c, dr E1 F 077 117 1&l .EVEN A-25 T-11 Evaluation Hodule Honitor liACRO V05,00 Sund"' 13-ftar-BJ 04110 LED DisPla~ Support Routines I 2 3 4 5 6 7 it+ DSPUNH and DSPLHH tali.e full words in R2 and write octal nuabers to the UPPer and lower LED disPla~s' resPectivel~. Uses: 20 136054 21 136060 22 130062 23 136066 24 130072 25 136074 26 136076 27 136100 28 136102 29 136104 30 136106 31 136110 32 33 34 R2 Octal value to be disPla~ed RO RI Contains sarba!ie Returns: B 9 10 11 12 13 136036 14 136042 15 16 136044 17 18 136050 19 136052 Pase 21 Contains !larba.!le ;-DSPUHH: :ttOV BR lloRI DSPNUH iindex uPPer disPla~ 000402 012701 000000 DSPLNM: : "°"' IOoRI ;index lower disPla~ 010246 010346 012703 000006 010200 042700 177770 004767 177700 000241 006002 006202 006202 077312 012603 012602 000207 DSPNUltl HOV HOV HOV 1$! HOV DIC R2o-CSPl R3.-CSPl 16oR3 R2oRO 117777o.RO PCoDSPDJG iPreserve R2 ;set a scratch re~ister 012701 000001 JSR CLC ROR ASR ASR SOB HOV HOV RTS R2 R2 R2 R3olf CSPlloR3 CSPlt.R2 PC A-26 icount 6 di.!lits i1ove octal di!lit to RO i1ake sure it 1 s octal idisPli':I diSit i1ove to ne}:t octal di!lit ido five di!lits 1 Evaluation Kodule Monitor llACRO V05.00 Sund•• 13-ltir-83 04:10 f'ase 22 r DiSPla!I SUPPort Routines I 2 3 4 5 6 7 B 9 10 itt DSPHAtt is a routine to disPla!:I nates of reSistersr etc, on u~Per disPla~. R2 Points to the 1essase to be disPla~ed, The 1essase shoul·1 be a string ot b b!:ltes corresPondin!! to the ses1er1t Patterns for each LEU disit1 startinS with the riSht1ost diSit. Uses: R2 Pointer to strin!! ot sesaent f'atterris RI RO Contains sarbase Contains sarba!!e Returns: 11 i·12 13 DSPNAH: :Hll1J 14 136112 012701 000001 15 136116 010246 HOV ASL 16 136120 006302 Hll1J 17 136122 010200 ASL 18 13612! 006302 ADD 19 136126 060002 HOV 20 136130 012700 000006 HOVB 21 136134 116261 136154 007712 1$: TST 22 136142 005721 me 23 136144 005202 SOB 24 136146 077006 HOV 25 136150 012602 RTS 26 136152 000207 27 077 NAHTBL: ! , BYTE 28 136154 000 000 000 l361S7 120 000 ,BYTE 29 136162 000 006 000 000 000 136165 120 .BYTE 30 136170 000 133 000 000 136173 000 120 .BYTE 31 136176 000 ooo 117 000 120 000 136201 146 .BYTE 000 32 136204 000 000 000 136207 120 155 .em 000 33 136212 000 000 000 mm 120 163 .BYTE 34 136220 000 000 000 000 136223 15S 071 .BYTE 35 136226 000 000 000 000 136231 163 !SS .BYTE 36 136234 000 000 000 000 136137 163 .BYTE 136 167 37 136242 120 163 124 38 136145 170 136 .BYTE 39 136250 120 000 .BYTE 167 000 40 136253 136 171 .BYTE 075 41 136256 000 .BYTE 000 000 42 136261 120 124 .BYTE 170 43 136264 006 .BYTE 174 110 44 136267 163 ,BYTE 124 170 45 136272 133 174 .BYTE 110 46 136275 163 170 124 .BYTE 47 136300 117 .BYTE 174 48 136303 163 120 .am iindex UPPer disPla~ II.RI R2.-!SPl 1Preserve aessa!!e index itultiPhl it b!:I 6 R2 R2,RO R2 ROtR2 16,RO icharacter count NAHTBL!R2l,SEGBUf!Rll ;1ove sesaent data to LED buffer iindex neMt LED disit IRllt iindev. next character R2 Ro.11 ido six characters ISPl+.R2 irestore R2 PC Or01077r12010,o ; ' rO Or0100611201-010 ;• rl 010113311201010 ;• r2 0,0,117,120,0,0 ;• r3 0,0,14611201010 ;• r4 Or011SSr120rOrO ;• r5 010!16311551010 ;• sr Or0r071rl63,010 i' PC 01011551163r010 i 1 f'S 120,136r167 170r124'163 000rl20r136 136r 167.000 000.015.111 120.000.000 006r17o.t24 163r110,!74 133'17o.!24 163r l20r174 117.1701124 163.t1Q.174 A-27 i 'f'ntAdr 1 j• Addr ' ;• r(G ' ; 'b-rPnt1' ; 1 brPnt2 1 i 'brPnt3' T-11 Evaluation ~odule Monitor HllCRO VOS, 00 Sund•• 13-~ar-83 01:10 Pa!ie 22-1 LED DisPla':I' Sw>Port Routines 49 136306 so 136311 SI 1363H 52 130317 53 136322 54 136325 55 136330 56 130333 57 H6 163 000 034 060 124 170 163 170 120 130 161 134 134 120 200 124 174 124 000 155 071 134 167 ,BYTE .BYTE .BYTE .am .BYTE .BYTE .BYTE .BYTE m.110.124 16311201174 0001130r124 034.161·000 06011341155 124.134.071 17o.!20.134 163,200'167 .EVEN A-28 ;'brPnt4' i' Fune ' ;•conS01• ; 'A,Pol't' T-11 Evaluation Hodule ftonitor HACl!O V05,00 Sunda' !J-Har-83 04:10 P••e 23 LED fiiSPla~ Suf>1>ort Routines ;++ 2 3 4 5 6 136336 7 136342 B 9 136344 10 11 136350 12 136354 13 136360 H 136362 15 136364 16 17 18 19 20 21 22 BLNKLO and B.lHkHI are routines to erase the seSaent data ir1 the lower and UPPer LED buffersr resPectiYel~. Returns Sarbase in RO and R!. ;-- 012701 000000 000402 BLNKLo::HOV BR to.RI BLNKDS iindex lower disPla~ 012701 000001 BLNKHI : : "ov It.RI iindex uPPer disPla~ 012700 000006 105061 007712 005721 077004 000207 BLNKDS: HOV ts: CLRB TST t6,RO SEBBUF<RlJ icount 6 disits iblank a di!lit ;index next diSit of sa1e disPla~ level ;do six diSits SOB RTS (Rllt Ro.ti PC it+ DSPDEC takes a nu1ber in Rt and an index to either second-fro•-lhe-left LED di3it in R2 and disPla~s the nutber as a deciaal value ori the corresPor1dins LED di<its. R2 = 10 to index the lower row of LEDs1 = 11 far the uP?er row. The leftaost LED disits are not affected. To dis?laY a two's co11F"lei€rit deci•al ._,al•.Jet call this routine fro• another routine1 which Places a 1inus siYi in tile left10st LEO disit and Passes the absolute value of the n1J1ber to be disPla~d to this routir1e. 23 24 25 26 27 28 29 30 31 31 33 34 35 136366 36 136372 37 136174 38 136376 39 136402 40 136404 41 136406 42 136412 43 136416 44 136420 45 136422 46 136426 47 136430 48 136432 49 136434 50 Uses: RI R2 Deci1al value to be disPlaYed Index to LED row on which to disPlaY it Returns: RO, Rt, Contain SarbaSe R2, R3 ;-- 004767 010146 010201 004767 005742 012601 012703 004767 010146 010201 004767 005742 012601 077311 000207 015662 DSPDEC: :JSR "ov 177370 000004 015576 177344 tt: "OV JSR TST HOV HOV JSR HOV HOV JSR TS! MDV SOB RTS PC,BINASl Rh-ISP) R2,Rl Pc.DSPnIG -<R2i <SP>+.RI 14•R3 PC,BIHASC Rt.-(5P) R2,R1 PC.OSPDIG -(R2> ISPJ+.Rl RJ.11 PC A-29 iset lOOOO's diSit ;save re1ainder ; index left LEI1 di Sit jdisPla~ deri1al diSit iindex next digit i1ake a counter ;striP a diSit fro1 Rl Ps~itch resisters PdisPlaY deci1al disit iindex next disit to the riSht ;set back deci1al nu~ber ido six diSits T-11 Evaluation Hodule Honitor HACRO V05,0-0 Sund•• 13-Har-83 04:10 Pase 24 LED DisPliY &Jpport Routines 2 ;++ KEYGET turns on the LEDs and waits ror a keYPress. The kes nutber or lhe k~ that was Pressed is ret1Jrned in Rl. The keYs are nuaOered as follows: 00 -- [CLRJ 12 -- [ b J 01 -- r 1 J t3 -- r 9 J 02 -- [ 4 J 14 -- CAC•Vl 3 4 5 6 7 03 -- C7 J 04 -- c o l OS -- r 2 l 06 -- r 5 J 07 -- r B l 10 -- CEXAJ 11 -- ( 3 J 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 15 -- CBACJ 16 -- CREGl 17 -- rADRJ 20 -- CSSTJ 21 -- [GO l 22 -- rBPIJ 23 -- !FNCJ Uses! Returns: Rt Contains nuaber of keY that was Pressed KEYPIV Cleared SPCLBf Cleared PS Priority reduced to 5 ;-- 24 25 136436 012737 136470 007676 KEY GET ::HOV llOVB 26 136444 112737 00-0007 177444 27 136452 106701 Hf PS 28 136454 120127 000277 CHPB BLOS 29 136460 101402 HIPS 30 136462 106427 000240 1$: BR 31 136466 000777 32 KEYGfl: CLR 33 136470 005037 007676 CLR 34 136474 0-05037 007n6 HOV 35 136500 012602 ISi 36 136502 005726 HOV 37 136504 012600 ISi 38 IJ6506 005726 HIPS 39 136510 106426 RTS 40 136512 000207 41 tKEY6El,@tKEYPIUilink inPut routine to keYPress vector 1007, etPSPORC ;Uirn on LED disPlaYs RI R!.1277 ;Priority 5 is 1axi1u1 for LEDs to oPerate 1240 ;set Priority S ;wait for ke'SPress HKEYP!V ;disconnect keYPress vector ;turn off flashinS error, if an1::1 frestore R2 ;discard old Rl a a ~ISPCLBf CSPlt.R2 (5Plt <SPlt1RO <SPJ+ <SP It PC A-30 irestore RO idiscord return address ibut rePlace PS b~te ireturn to caller of KEYGET T-11 Evaluation "odule "°"itor llACRO VOS,00 Sunda' 13-"ar-83 04:10 Pase 25 LED DisPla~ SuPPort Routines 2 3 4 5 6 7 B 9 10 11 12 136514 116101 136522 13 !36520 000207 14 15 136522 012 16 136523 001 17 136524 004 1B 136525 007 19 136526 000 20 136527 002 21 136530 005 22 136531 010 23 136532 013 24 136533 003 25 136534 006 26 136535 011 27 136536 377 28 136537 377 29 136540 377 30 136541 377 31 136~2 377 32 136543 377 33 136544 377 34 136545 377 35 36 ;++ KEYBCD translates the ke~ nuatier in Rt into a BCD value far the ke~s 0 tu 9, 12 lor the CLR ke'' 013 lor the EXA ke'' and -1 for all other ;,,,, Uses: RI Ke~ nuaber to be translated RI Translated value Returns: ;-KEYBCD::ttOVB RTS BCDTBI. !RI loRI PC ;translate Rl into BCD cod@ BCDTBL: ,BYTE .BYTE 012 001 004 007 000 002 005 010 013 003 006 011 377 377 377 377 377 377 377 377 llCLRJ .em .BYTE ,BYTE .em .BYTE .BYTE .BYTE .em .BYTE .BYTE ,BYTE .em ,BYTE .em ,BYTE ,BYTE .em ,BYTE ;( I l ;[ 4 l ;[ 7 l l[ 0 l ;[ 2 ) ;c 5 l H Bl ;[[XAl ;c 3 J ;r 6 l l[ 9 l ; CADVl ;[BACJ i[REGJ aADDl assn HGO J mm lfFHCl ,f\IEN A-31 T-11 EYalu•tion Hodul• ltonitor M!ICRO VOS.00 Sundas 13-Har-83 04!!0 Pase 26 LEO 8isPlaY SuPPort Routints 1 ;++ 2 NUMGET disP'l~s the current valin of R2 in the lower row of lEDs1 leaving, the 3 4 UPPer row intact. The ke'jl'ad is enabled to allow the user to aodifs the value 5 ir1 R2 with the 0 - 7 arid CLR lc.e'JS• 6 7 altered or not, when the user ?r-esses EXA, 8 Uses: The value in R2 is returned, whether RZ Initial val1Je R2 f .CHAN RI RO New value (if chansed) f'la!i in FLAGS1 is set if R2 was i:han~edt cleared otherwise Contains garbase Contains !iarbag,e 9 10 11 12 13 14 15 16 17 136546 18 ms54 19 136560 20 136564 21 136570 22 136572 23 136574 24 136600 25 136602 26 136604 27 136610 28 136612 29 136620 30 136622 31 136624 32 136632 33 136634 34 136636 35 136640 36 136642 37 38 136644 39 136646 40 136654 41 42 136656 Returns: ;-- 042737 000002 007706 Nl.ltlGET: :~IC 1l! JSR 004767 17n64 JSR 004767 mm 004767 177724 JSR TST 005701 BHT 100770 CHF· 020127 000012 Bffl 101026 9EQ 001420 020117 000010 CHP 103361 BHIS 032737 000002 007706 m 001004 BNE 005002 ClR BIS 052737 000002 007706 ASL 006302 ~·: ASL 006302 ASL 006302 ADD 060102 BR 000744 tf,CHANoetFLAGSl;show R2 hasn't chansed Yet ;disr-la!:I value in R2 on lower LEDs PC,DSPLNH PCoKEYGET iwait for a kesPress iconvert ke~ nulber into BCD PCoKEY8CD ;was it a legal ke~? RI ;no, 9et another 11 iwas it nuaeric? R!.1012 ino1 it was EXA/ENT1 ;o return valui! in R2 21 fnot it was clear 31 ;was it 8 or 9 {not valid octal disitsJ? RlotOIO i~es1 so i~nore it II tF 1CHAN1@tFlAGSl ;has R2 been chan!!ed ~et? ;~es1 just scroll in ke~ 41 ielse clear old value first R2 IF, CHAH1@tFlAGSl; indicate it has been chan.!:led t•ake space fnr new di9it R2 R2 R2 tscroll ir1 new di!!i t RloR2 iaccePt additional digits 11 Jt: 005002 052737 000002 007706 000737 CLR R2 BR ;clear nu.ber for CLR ke~ tf ,CHANo@tfLAGSl;show R2 chansed 11 000207 RTS PC 2s: m ireturn value A-32 T-11 Evaluatioo ltodule Monitor KACRO V05.00 Sunda' 13-Kar-83 04:10 Pa~e 27 LED DisPla'=I Support Routines .SBTTL Error Condition and Startup Entr~ Code 2 3 4 5 ;+t tSTART is the PoweruP initialzation routiner which is executed after the diagnostics are co1Pleted, 6 ;-- 7 B 9 136660 10 136662 11 136666 12 136670 13 136672 14 136676 15 136704 16 136712 17 136720 18 136726 19 136734 20 136742 21 136750 22 23 24 25 2.1 27 28 29 30 31 136752 32 136756 33 136762 34 136766 35 36 136774 37 137000 38 005000 012701 005020 077102 010537 012737 112737 112767 012737 012737 012737 012737 000402 SSTART: :CLR 014000 ll! 007726 007400 000050 000116 135676 007746 007710 050544 007702 135676 000024 000340 000026 007320 007462 llOV CLR SOB KOV KOV KOVB KOVB KOV KOV KOV KOV BR RO tl4000,R1 CROlt Rlo!I RS,HSPCLBF tSCRPAD,@HSP t050,!tCOHFL6 t116,IF8251 ;clear RAH fro1 0 to 27777 iPut ?ower-uP error code on LEDs ;set I.JP user stack Pointer iset default baud rates ;set default value for 8251 1ode byte tSNULLlr@tUSERVSiinitialize user's interrupt vector llNULLl o@t24 iPf Point~ at 1"11Jll t340o@t26 tTBLTOP1@tTBLBOTiinitialize e.PlY sYabol table idon't clear error disPlaY IHALTt4 i++ SHALT is the routine invoked b'=I the HALT buttonr the HALT L line on the board, and the HALT instl'1JC'tion. It saves the Processor re!lister-s tmd the contents of USERIV and KEYPIV if a user Pro!lra1 was r·unnin!I. It also i>erfor1s a bus reset and reinitialization of Peripheral chiPs before invokin!I the ke~Pad 1onitor. ;-005037 0047.17 004767 042737 tHALT:: CLR 007726 JSR 000022 176110 JSR 177377 007706 BIC 004767 176224 000167 000564 JSR JllP irlear error rode on LEDs, if ans etSPCLBF ;save context and fix user SP PCoUCSAVE ;assert RESET line and reinitialize Ports PCdOINIT t177377o@IFLAGSl;reset oodeo set ke•••d co..and •ntr• ;1eave f" .BRKA so breakpoints will be reaaved ;1a)..e sure interrupt vectors aren't da1a!!ed PColOVECT IKONIT ;enter 10nitor A-33 T-11 Evaluation Hodule Honitor KACRO V05 , 00 Sunda• 13-ltar-S3 04:10 Pa!ie 28 Error Condition and Start.up Entr~ Code ;++ 2 3 4 5 6 7 137004 S 137010 9 137016 10 137020 11 137024 12 137030 13 137036 14 137042 15 137046 16 137052 17 137056 IS 137062 19 137066 20 137072 21 137100 22 137106 23 137112 24 UCSAVE sJves the processor resisters and the contents of USERIV and KEYPIV if a user Pro~ra1 was running, It also initializes the 1onitor stack. ;-012637 032737 001433 012637 112637 042737 010637 010037 010137 010237 010337 010437 010537 013737 042737 012706 000207 007460 UCSAVE: : HOV 000100 007706 BIT srn 007750 007752 177400 007752 007746 007732 007734 007736 007740 007742 007744 007676 007700 000100 007706 007460 ltO\I 1s: HOVB BIC HOV HOV HOV HOV HOV HOV HOV HOV SIC HOV RTS (SP>+,~tSTACK-2 ;1ove return address to 1onitor stack tf .usER,@tFLAGS1 i runnins user code? ;no 1$ ;~es1 save user context, starting with PC <SPl+.HIPC ;PS next <SPlloHIPS 1177400oHIPS iPrevent sisn extension SP.@tlSP ifh: and save stack Pointer ;save RO, ROoHIRO ;R11 Rt.HIRl R2o!llR2 iR2r iRJ, R3,HIR3 ;R4, •nd R4oHIR4 ;Rs R5oHIR5 @IKEYP!Vo@IKEYPVS isave user ke~press vector tF.USER1@tFLAGS1ishow that user context has been saved ;go to 1onitor stack tSTACK-2oSP iand return to callins routine in 1onitor PC 25 ;++ 26 27 28 BREAK is the console break interrupt service routine. It is si1ilar to HALT except that it does not invoke the ke!:IPad 1ooitor if the console 1onitor wa::. runni~ previousl~. The host aode is terainated b~ BREAK, 29 30 31 32 137114 33 137120 34 137124 35 137130 36 137136 37 137144 3S 137152 39 137156 40 137162 41 137166 42 137172 43 ;-005737 004767 004767 042737 012737 142737 113700 052700 010037 012700 000466 177562 BREAK!! TST 177660 JSR 175746 JSR 035377 007706 BIC 133000 000060 HOV 000007 007710 BICB 007710 HOVB BIS 000002 HOV 177564 000001 HOV BR ;acknowledse interru?t tsave user context iassert RESET line and reinitialize ports t0353771@tFLAGS1;initialize •onitor ~odes tLINEIN1@tCOHIN ;hook UP console inPut service routine t007oetCONFLG iclear console line fla~s (but not speed) @tCONFLGoRO ; set current baud rate ;enable ?ro!i. baud rate, disable xtit interrupt t000002oRO ;transfer control word to console Port RMtmcSR ; indicate car.sole break service ti.RO ;so to fatal error har1dler to reenter 1onitor FERROO HCIRBUF PC,UCSAVE PColDINIT A-34 T-11 Evaluation Hodule Honitor HACRD V05,00 Sunda' JJ-Har-83 04:10 Pafe 29 Error Condition and Startup Entr~ Code 2 3 4 i+t BRkPT is the breakpoint service routine. If invoked ftol a user ProSra•, the Processor context is saved, If invoked in response to a 1onitor breakpoint rather than a sin~le steP or user breakPointr the PC value saved fro1 lhe Previous context is adjusted to Point to the location which contained the it0nitor breakpoint. s 6 7 B 9 10 137174 106427 000340 II 137200 004767 177600 12 137204 032737 001000 007706 13 14 137212 001405 15 137214 042737 001000 007706 16 137222 000167 002466 17 18 137226 032737 000200 007706 19 137234 001155 20 137236 032737 000400 007706 21 137244 001430 22 13n46 013701 007750 23 137252 005741 24 137254 012700 007760 25 137260 012702 000004 26 137264 022001 27 137266 001403 28 137270 005720 29 137272 077204 30 137274 000414 31 32 13727.\ 052737 020000 007706 33 137304 010137 007750 34 137310 052737 001000 007706 35 137316 032737 002000 007706 36 137324 001521 37 137326 012700 000002 38 137332 000406 39 40 41 42 43 44 45 46 137334 106427 000340 47 137340 004767 177440 48 137344 012700 000003 49 j-- BRKPT:: ttTf'S JSR t340 PCoUCSAVE m ;disable interrupts in case Vl!'Ctor is da1aSed ;save user context tF,BRKGrftFLAGSJ;are we sinsle stePPinS throush a break BEU &IC JHP inor so chec~, if sir1:He ster> or new break.Point tf ,BRKG1PtFLAGSt;reset ccmdition $60 iirrstall breakPoints and resute execution BIT BNE BIT llEU lfflV tr. SST.etFLAGSl ;are we single stePPinS~ $1tOOIT i-:1esr so not a brea~.Point--ente-r 1onitor ;l"oint 2tl TST HOV 4tl llOV CIW BEQ TST SO& PR Jt: m llOV 915 BIT ss: BEU llOV BR 21 tF.BRKA1@tFLAGSt;are breakpoints installed? ino--user ProSra• contairis BRK1 so si!:lnal error 51 HIPC,Rl hiet user PC -(Rll ;bick UP to BRK instruction tBRKFiloRO ;index breakpoint file t4oR2 ifour entries in file (lffi)+.RI idid we in fact encounter a breakPoint? 31 jyes, so adJust re, ri0 error 1essaSe ;advance to next entry <ROH R2,41 5$ ;r10 1atch--pro9ra1t contains BRK ••• siSnal error tF,TBASr@tFLAGSl;snow we need to Print break Point 1essase R11H$PC ;fix PC tF.ttRKG1@tFlAGS1;show ~e need to sinsle step tF,KEYf,~tFLAGS!;no 1essaSe if in ke~Pad 1ode lllONIT iso just enter tonitor hndicate breat.point ser1,1ice ti.RO ;go lo fatal error handler to reer1ter 111onitor FERR OR it+ ITRAP is the ille9al instruction trap routine. If a user Prosra1 was running, the J)l'ocessor conte>:t is saved before invokin3 the 1onitor. ;-!TRAP!: !TPS JSR !OV mo PC,UCSAVE 13oRO A-35 idisable interrupts in case vector is da1ased ;sa1,1e user context ;indicate invalid instruction t~aP T-11 Evalua<ion llodule Honi<or HACRO V05,00 Sund•• 13-Har-83 04:10 Pase 30 Error Condition and StartUP Entry Code 1 2 3 4 5 6 7 B 137350 9 137352 10 137356 11 137360 12 137362 13 137370 14 137372 15 137376 16 137402 17 137406 IB 137412 19 20 137414 21 137422 22 23 137424 24 137426 25 137430 26 137432 27 28 137434 137442 29 137446 JO 137450 137456 137464 JI 137470 32 137472 137500 137506 137514 33 137520 34 137522 137530 137:i36 35 137540 36 37 137542 JB 137:i44 39 137546 40 IJ?:iSO 41 137:i52 42 137554 43 44 ;+t FERROR sisnals errors for the above routines and others in the keYPad aonitor. If the keYPad 1onitor is runnins, the errors are diSPlaYed on the LEDs. For the console 1onitor, the error 1essa9es are disPlaYed on the console, ;-010046 004767 012600 006300 032737 001411 016002 004767 004767 005037 000466 175646 FERROR: :HOV JSR HOV ASl RO.-<SPl PC,!O\lECT (SPlt.RO RO ;save error number ;•al:.e sure lnterruPt vectors. aren't daaaged ;ge.t error nu1ber iturn it into an index 002000 001706 m 137422 174122 174360 007630 2$! llEQ HOV JSR JSR CLR BR IHONIT 016037 137542 007726 1$! 0004.!2 HOV BR FERCHR(ROl,@tSPCLBF IHONIT 137434 137450 137472 137522 FHESAG: : , WORD ,WORD .WORD ,WORD 012446 070511 000000 007525 055240 076732 000000 035206 055214 053605 021025 000000 035206 076453 076732 000000 074444 017502 FHESGI: .RAD50 042300 .WORD 003770 063141 FHESG2: , RAD50 020563 060426 017740 .WORD 004051 014411 FHESGJ: , RA050 071713 077167 054007 102604 014400 .WORD 004051 014423 FMESG4: ,RADSO 042320 057466 120 174 163 124 163 006 .WORD 076 071 174 006 155 174 FERCHR: : , BYTE .BYTE ,BYTE .BYTE .BYTE .BYTE .EVEN tF.KElPrftFLAGSl;are we in keYPad aode1 hwsr so rio console aessase 11 FflESAG-2<RO>rR2 istart address of selected 1essa~ PC,CRLF PC.PRINT mr FHESG1 FHESG2 FHESG3 FHESG4 ;send <CR> <LF> iPrint radix-50 1essaSe jaake sure nothing left in btJffer ;?ut two rhartlt'ter error code on LEDs ;~ointers to error 1essases /CONSOLE BREAK/ 0 /BREAK POINT ENCOUNTERED/ 0 /INVALID INSTRUCTION ENCOUNTERED/ 0 /INVALID STACK POINTER/ 0 120.076 174'071 163'174 124.006 163'155 0-00,174 A-36 ;r,u (Ur Error) ;b,c <Cb Error) ;p,ti (bP Error) ;n,I {In Error) ;p,s (SP Error) ;[,b (bl Errorl T-11 Evaluation Hodulo Honitor HACRO V05.00 Sund•• ll-Har-BJ 04!10 Paoe Jl Error CMd.itior1 and Startup Entrv Code I 2 I 3 4 5 6 7 8 9 10 137556 11 137560 12 1l7564 ll 137570 14 137576 15 ll7600 16 137604 17 1l7610 18 137612 19 137614 20 137620 21 137622 22 137624 23 137626 24 137630 25 137634 26 137642 27 137644 28 137650 29 137654 30 31 137662 32 137670 33 137672 34 35 137676 ;++ HONITl is the 1ooitor entrv Point to be used for nor1al exit fro1 user The PTOCl?liisor conte-xt is saved, except for the PC, which retair1s IHONIT is the entr':l point used blJ aonitor routines after the Processor conte;~t has tieer1 Pro!lra1s. its previous value so that the ?rosra1 can be r1Jn a!lain, saved. ;-106746 013746 004767 032737 001426 012700 016001 001404 005720 016011 005740 024040 005700 100366 013704 032737 001404 004767 004767 042737 ltONITI: : HFPS 007750 llOV 177214 JSR 000400 007706 IHONIT:lBIT Brn 000014 HOV 3$: 007760 HOV BEO TST 007760 "ov TST 4$: C!U' TST BPL 007750 "ov 020000 007706 BIT BEG 015400 JSR 015314 JSR 030400 007706 2$! BIC -ISPl PUf'C,-CSPl PC•UCSAVE ;but keep Previous user PC value isave user conte~t tF.BRt;A,@tFLAGSl;breakPoints currentl':j installed? 21 t014,RO BRKFIUROl •RI 41 ino i index last breab•oint address ;set breakPoint address it.his breakPoint is not defined ;point to Previous contents IROlt BRKFIL<ROI dR!I i restore contents of' breab•oint -<ROl ;go bac~ to address -<ROl.-<ROl tbact,tJp to next address RO JI ido four entries HIPC,R4 ;point to next location tF.TS~s,etFL~GS1isee if we should Print aessase ibranch it not 21 ; t>::JPe address PC,TYPADR PC,TYPLOI idisasse1ble next irislruction tF, BRM!F, APPL tr, !BAS, etFLAGS1 i indicate brea~.Points re1oved ;and enable break on ~c 032737 002000 007706 001402 000167 003026 000167 000276 lt: tf,KElP,~tFlAGS1;ke,,ad 1ode? BIT BEG JHP 11 CHON IT JHP KHONIT ,REPT .BYTE .ENDR <140000-.> 0 36 37 38 39 iPush PSr PC like fro1 a trar 000076 A-37 i':les' so to ~-e':IPad aonitor ;and So to console 1anitor T-11 Evalu•tion Hodule Honitor llllCRO VOS,00 Svnd•Y 13-H•r-63 04!10 Pa!e 32 Error Condition and StartUP EnttY Code 1 .SBTTL En\rs Points 2 3 4 s MONITOR ENTRY POINTS! 6 7 6 140000 000167 015330 ;-START!! JHP OIAONO Pdo dia~nostics1 then initialize 1onitor RSTART!!JHP $HALT ;HALT instructions and halt line vector 9 10 140004 000167 176742 11 12 13 140010 000167 177542 14 15 16 17 lsave context arid restart 1or1itor ltONITR! !JHP ltONITl ifro1 user Pro~ra1t1 save conte::t anlj re11ove ;breakPoints ;++ KEYPAD/LEO UTILITY ENTRY POINTS! IS 19 ;-- 20 21 140014 000167 17S7S2 22 23 24 25 26 27 140020 000167 176012 OGDISP: : JHP llSPD!G in RO bits 3 to O as a hex ;di9it at LED Position indexed b~ Rl, iR1=121l0106104t02100 -- lower disPla~ di~its iRl=tJ,11,07,05,03,01 -· uP"?er disPlaY d1Sits iR& bits 15 to 4 are cleared, 2 is added to Rl U?DISP:: JtlP DSPUHH iDisPla~ nuaber LODISP: :JHP DSPLNH iDisPlaY nU11ber in R2 as a 6 diSit octal value ;in the lower row ot LEDs. Returns 14 in Rl iand sarba9e in RO. DECDSP: : JHP DSPDEC iDisPlaY nU1ber in R1 as a S digit deci•al ;value on the row of t£Ds indexed b~ R2. iR2 = 010 for the lower row1 011 for the uPPer iReturns zero in Rl anrj R3, and sarbase in RO iand R2. 000167 176304 UPBlNK:: JHP BLN/111! iBla~ 000167 176272 LOBlHK!: JHP BLNKLO ;Blank the lower row of LEDs, 28 29 30 31 140024 000167 176014 32 33 34 35 140030 000167 176332 36 37 38 39 40 41 140034 42 43 44 140040 45 46 47 140044 48 49 so 140050 ;standard 1onitor entry (no error condition) IDisPla~ nu1ber in R2 as a 6 diSit octal value ;in the UPPer row of LEDs, Returns 15 in Rl iand garbage in RO. the uPPer row of LEDs, Returns zero in iRO and sarbase in Rt. Ret1Jrr1s zero in iRO and Sarbase in R1. 000167 176366 GETKEY! :Jl'IP KEYG£T ;Turn on LEDs and wait for a keYPress. Return ikey nu1ber in Rl, 000167 176440 ;Translate key nu1ber in Rl to a BCD value for ikeys 0 to 9, 012 for the ~LR k~1 013 for the iEX/ENTR ley, and -1 for all other keys, BCDKEY: : JHP Sl 52 53 54 140054 000167 176466 SS 56 57 Modifies KEYPIV. NU!!GET iDisPla~ nu1ber in R2 as an octal value on the il<>41er row of LED~. Activate keYPad and allow iuser to •odif~ the value in R2 with the keYs 10 through 7 and CLR. Return the value in R2, A-38 T-11 Ev•luation ltodult llonitor llACRO \005,00 Sundi• ll-K•r-BJ 04:10 Pase 32-1 EntMI Points 58 ichanged or not, when user Presses EXA. Uses 59 iR21 R11 and RO, A-39 T-11 Ev•luation "odule "onitor llACRO VOS.00 Sundas 13-"ar-83 04:10 Pase 33 Entr':I Points 1 2 if+ CONSOLE LINE UTILITY ENTRY POINTS: 3 ;-- 4 5 6 140060 000167 000104 7 Jiii' ;f'ro1Pt for a line fro• the console, F!XBP it~e Return line in BUFFER with Rl cleared. B 9 140064 000167 173346 10 11 140070 000167 173222 12 J"P GET BP ;Transfer the back Pointer <BP) to R3. JHP GETCH iRetr1eve character indexed b':I R3 fro1 BUFFER. ;Returns character in RO, R3 incre•ented b~ t. fReturns H set if character is a separator, iC set if it is lower case. J"P GETLCH ;Retrieve character indexed b':I <RJ - 1; f rot 13 14 15 16 140074 000167 173306 17 18 19 140100 000167 173306 20 21 22 23 140104 000167 173316 24 25 26 27 iBUfFER. JHP GETCHC Retyrns sa1e as GETCH. iRetrieve character ir1dexed b':I R3 fro111 BUFFER iwithout foldin~ lower case. Returns ch.:ir~cter iin RO, and R3 incre1ented b':I 1. Jiii' GETNXT iRetrieve next character which is not a ;s@?arator frot BUFFER startins at location i indexed ~':I R3. Returns character ir1 RO with ilawer case folded1 RJ indexes next character iin BUFFER, 000167 173334 Jiii' PURGE ;Eli1inate BUFFER contents below location ; iridexed b':I BP. 000167 174022 Jiii' ECHO iEcho contents of BUFFER to the console istartin9' with location inde:eed bY R3. Returns tR3 indexin!:I BUf'FER location Just be!lond last 28 29 140110 30 31 32 140114 33 34 35 36 37 140120 38 39 40 140124 41 42 43 44 45 46 140130 47 48 49 50 140134 51 52 53 54 140140 55 56 57 iechaed character. 000167 173400 Jiii' CRLF iSend a carria!:le return and lir1e feed to the iconsol@ (and ?rinterl. 000167 173400 JHP CHROUT ;send a (Pair of) character(s) to the console i(and Printer). Character to be sent should jbe in lower b':lte of RO. If UPPer bYte at RO ;is non-zero1 it will be sent as e; secor1d ;character, 000167 173404 JHP iSen.d a sinSle character froa the lower byte iof RO to the console (and Printer). Ret1Jrns CHROl iRO with its byte swapped. 000167 173414 J"P iSeod a sinsle character froa the lower byte CHR02 iof RO to the Printer <aux. PortJ onl!!. tReturns RO with its bytes swaPPed. 000167 173462 ASCOOT A-40 iOutPut an ASCII character in the lower 7 bits iof RO as a ~isible {string ot) character(s) Jon the console. Control characters are outi:-ut jas "<letter>1 with exc£1PtiorrS <SP> 1<ESC>1 (DEL.; T-11 Eval..tion Hodule Hooilor 111\CRO VOS.GO Sund•• 13-Har-&3 04!10 Paoe 33-1 Entr~ Points SS 59 140144 000167 173604 60 JHP PRINTA 61 62 63 64 ;++ PARSING AND OUTPUT UTILITY ENTRY POINTS! 65 66 67 69 140150 000167 004346 69 70 140154 000167 oom2 71 72 140160 000167 014560 ;-~ JNP GETEXP JNP GEN EXP JHP TYPOCT JHP TYPDEC 73 74 140164 000167 014470 75 76 140170 005037 007630 77 140174 000167 173040 79 ;outPut a strin!f of b1:1tes to the console (and ;Printer), Rl Points to start of strin3r which ;•ust end with a blank b~te. Returns R1 iPointins to b~te just after blank b~te, FIX!IPl ClR JllP ftBP GETLIN A-41 T-11 Evaluation Hodule Konitor HACRO V05.00 Sunda• 13-Har-83 01:10 Pase 34 Entr'3 Points 2 3 4 140200 s 140206 6 140214 7 140222 B 140230 9 140234 10 140236 11 140242 12 140246 13 140250 14 140254 15 140262 16 140264 17 140272 18 140276 19 140300 20 140302 21 22 !40306 23 140314 24 140322 25 140326 26 27 28 140330 29 140334 30 140340 31 140344 32 140352 33 140354 34 35 140360 36 140362 37 140364 38 140366 39 140370 40 140372 41 140374 42 !40376 43 140400 44 140402 45 140404 46 140406 47 14D410 48 140412 49 140414 so 140416 51 140420 52 140422 53 140424 54 140426 ,SBTTL KeYPad Monitor 042737 042737 042737 052737 012704 010402 004767 013705 010502 004767 032737 001411 042737 013702 001403 011202 004767 000077 000001 000001 000010 000007 175650 007750 175570 000200 007706 KHOHIT::m BIC 007756 007754 BIC BIS 007706 HOV HOV JSR HOV HOV JSR 007706 8lT 175530 am HOV JSR PC,DSPUNH B!C HOii 012737 140330 007676 KLOOP:: HOV HOVB 112737 000007 177444 ms 10<1427 000240 1$! BR 000777 005037 012706 005037 112737 006301 000171 141110 140430 140430 140430 140430 140430 140430 140430 141122 140430 140430 140430 141232 141372 141610 141550 141706 141714 141462 141650 tF.REG1@tFLAGSl ;set resister select ~ode ; iride}: PC ;set UP to disPla':I • PC • on IJF'Fer LEDs idisPla':I it i9et PC contents @tS:PC1R5 ;s~t uP to disPla~ on lower LEDs R51R2 PC,DSPLNH idisPla'~ it tF.SST1@tFLAGSl iwere we sinsle stePf'ing? t007,R4 R4,R2 PC,DSPNAH ;no KLOOP tf, SST, etFLAGSl iclear condition @llWATCH,R2 ;is there a watchf'oint? ino KLOOP Btu 000200 007706 007754 t000077.@tFLAGSHolear nevio•Js oode 11,@tlADDR i11ake current address and watchPoint even ;in case we ca~e fro1 console 1onitor tb@tlWATCH KEYCHD: :CLR HOV CLR 007726 000010 177444 KEYCMl: :HOVB ASL JHP 140360 007676 007462 DSPTBL: : , WORD .WORD .WORD .WORD .WORD ,WOR[1 .WORD .WORD .WORD .WORD .WORD .WORD .WORD .WORD .WORD .WORD .WORD .WORD .WORD ,WOR[1 @R21F:2 '~et watchf'oint contents idisPla'::I watchPoint contents in UP?er disPla':I tKEYCHD1etKEYPIVilink coa1and input routine to ke':IPress vector tOOMmPORC ;turn on LED disPla':I ;enable LED disPla'::I interruPt t240 iwait for ke'::IPress' ke'3 code returns in Rl 11 HKEYP!V tSTACK,SP etSPCLBF tOlO,etPIPORC RI @DSPTBLCRU idisconnect ke'::IPress vector iPOP saved resisters and return vector ; turn off flashing error' if an':I ;turn off LED disPla~ for faster ev.ecutiori ;1a~.e a word inde;: of Rl ldis?atch to aPProPriate routine ICLR INUHER lllUHER INUHER INUHER INUHER INUltER INUllER IEXAM INUHER INUMER INUMER IADV IBACK IREG IADDRK ISST IGO IBRKP IFUNC ;[CLRJ i[ 1 l i[ 4 l i[ 7 l i[ 0 l ;[ 2 J ;[ 5 ] H Bl ;[[XAJ i[ 3 l i[ 6 l i[ 9 l HAOVJ i [BACJ A-42 ;[REGJ HADDJ ;[SSTJ ;mo 1 i [BPTJ HFNCl T-11 Evaluation Module Hor1itor KACRO VOS •00 Sundas ll-llar-83 04:10 Ke!:IPad Monitor I 2 J 4 140430 5 140432 6 140436 ) 140444 B l40446 9 140452 lO 140454 11 140460 12 l40462 13 140470 14 1404n 15 l40500 16 l40502 17 140504 18 140512 19 140520 20 140522 21 140530 22 140532 23 140534 24 140536 25 140540 26 27 2B 140542 29 140550 JO 140552 31 140554 32 33 140560 34 140566 35 140570 36 140574 37 140602 30 39 140606 40 l40614 41 140616 42 140622 43 140626 44 140630 45 46 140634 47 140642 4B 140b44 49 140650 50 140652 5l 140654 52 140660 53 l40662 54 SS 140666 56 l40672 57 140676 Pa~e 35 .SBTTL Ke~ Co11and Routines 006201 004767 032737 00l40J 020127 101315 03270l 001404 032737 001306 032737 OOlOOI 005005 052737 032737 001004 042737 006305 006305 0063-05 006305 060105 176056 000040 007706 000004 000010 INUllERI : ASR JSR BIT MU CKP BHl 4$! BIT BEQ m 000005 007706 000002 007706 1s: 000002 007706 31: 000005 007706 000002 007706 2s: BNE BIT BNE CLR BIS BIT BNE BIC ASL ASL ASL ASL ADD ; restore ke!I nu111ber ;set BCD value for ke!:l code JF .FUNC,@tFLAGSl fis di Sit a functior1 selectiori? 41 rno fis disit higher than 4? R!.t004 i~es1 ignore digit IQOOP iis it Sor 9'? IOOOOlO•Rl 1no, a Ie9al octal diSit II tF ,DATA+F .AD£1R,@tFLAGS1 ino B or 9 as data or address irif'1Jl ;ignore the1 if Pressed !LOOP tF ,CHAr+r@tFLAGSt;has a digit ~-e!:l alread':I been Fressed? i!:les1 Just scroll digits H1 JI ielse initialize diSit accu111Jlator RS tF.CHAN,etFLAGSl;indicate that a digit has been Pressed tF.DATA+F,ADDR1@tFLAGSl ;address and data eritr~ scroll diSits 21 tF.CHAlh@tFLAGS1;others have sinsle d1Sit entrs iPrePare for fourth Oit (1ight be e or 9) R5 iscroll disit into RS (digit accu1ulatorl RS RS RI PC,KEYBCD RS Rt.RS H~ow do executior1 associated with diSit 032737 000005 007706 D!Gm::BIT 001511 Brn 010502 HOV 004767 175264 JSR 032737 00l007 010537 042737 000167 000001 007706 007756 000001 007756 000362 032737 000004 007706 001407 013700 007756 004767 00ll30 010510 ooow 000334 032737 001420 020427 101M6 006304 010564 006204 000167 2s: BIT BNE HOV BIC JKP tF,DATA,@tFLAGSlifor addressesr store ir1 SADDR 21 R5•!11ADDR J!,@llADDR i1ake sure address is ever1 KLOOP! itak.e another k.e!:l BIT tF .ADDR1@tFLAGSlib1Jt data can so &1an~ Places-are we Pok.ins RAH? ino 31 !llADDR,RO ;!:!!es' Set a COP!:.! of current address icheck. that it is not in protected RAM PC,KADRCH R5,!RO iPlace data at current address itake another k.e·:> !LOOP! BEU MDV JSR KOV JHP 0000!0 007706 3$! CKP BHI ASL MV ASR JKP tF.REG,@tFLAGS! icham!inS re:hsters or watchPoirit cor1tents? ino 41 idoes R4 ir1dex a reSis.ter {0 thru 7 and F'S)? R4.t000010 :no (R4 should be 0000111 SI i1:ake it a word inde}: R4 iand Place data in user register R5•1ROCR41 i restore R4 R4 itak.e another k.e!:l KLOOPl HOV JSR HOV !lllHHCH,RO PC,KADRCH R5,@RO BIT BEU 000010 007732 000302 013700 007754 001767 001260 010510 ~$: input iClear k.e~ Joins us here tF.DATA+F,ADDR,@tFLAGS1 ;Just disPla!:l new data or address ifor others, do sFecial disPla~s instead 11 iSet new value RS,R2 PC,DSPLNH ;and disPla~ on lower LEDs A-43 iassu1e R~ indexes watrhPoint contents icheck that it is not in Protected RAM ;def'osit data into watchPoint location T-11 Evaluation "odule llonitor "ACRO V05,00 SoodaY 13-"ar-83 04110 Pa~e 35-1 Ke~ C081and Routines SS 140700 59 60 140704 61 140712 62 140714 63 140720 64 140722 65 140n6 66 140730 67 140732 68 140734 69 140740 70 140746 71 140750 72 140752 73 140756 74 140762 75 140770 76 77 140774 78 141002 79 141004 BO 141006 SI 141012 82 141016 83 84 141022 8S 141030 86 141032 87 141034 88 141040 89 141042 90 141044 91 141050 92 141052 93 141056 94 141060 95 141062 96 141066 97 98 141072 99 141076 100 141102 101 141106 102 103 104 141110 105 141112 106 141120 107 !OB 109 110 141122 111 141130 112 141132 113 141136 114 141142 ;take another ke~ 000167 000264 JHP KLOOPl 032737 000020 007706 4S: 001526 020427 000014 103416 020427 000017 101013 006304 006304 1001: 010564 007700 042764 000001 007700 006204 006204 000167 000212 6t: 010537 007754 042737 000001 007754 000167 000174 BIT 8£0 CHP BLO C"P tf,BRKS,@tFLAGSt;chansins breakpoint or watchPoint address? ;no, iSnore (stranSe! that was a satet~ check) KLOOf>l ;R4 indexinS a breakpoint? R4rl000014 032737 001407 010100 012701 004767 000167 032737 001457 010504 020427 001414 010402 004767 006304 016405 006204 010502 004767 000167 000040 007706 1s: Biii ASL ASL HOV BIC ASR ASR JHP HOV BIC JHP BIT 8£0 "ov "ov 000004 174754 000146 JSR J~ 000010 007706 7$ ~ BIT BEO HOV CHP 000011 BEQ 175042 HOV JSR ASL 007732 "ov ASR 9t: JSR JHP 174756 000076 013702 007754 004767 174734 017705 046646 000764 "ov as: HOV JSR "ov BR SCLR:: CLR 005005 BIC 042737 000002 007706 000610 BR ;nor it's not 61 R4rl000017 ;rior it's not 61 i•ake an index for word Pairs R4 R4 ;place data in breakPoint address file R5r9RKFIL-0601R4l ;1ak.e breakPoint address even tlrBRKFIL-0601R41 R4 R4 ;take another ke~ KLOOPl R5retlWATCH ;assuae R4 indexes watchP-oint address tlretliATCH ;1ake watchPoint address even ;take another ke~ KLOOPl IF1FUNC1ftFLAGS1;are we enterini a function code? inor 1ust be enterins a resister nu1ber 71 ;set new diiit RlrRO iindex a lower disPla~ di9it t4rRl PCrDSPDIG idisPlas nev di!lit ;take another key KLOOPl tF.RE61@tFLA6Sl ibe sure we are selectinS a re!lister ;else i9oore kes KLOOPl ;save selected resister nu1ber R5rR4 jare watchPoint contents selected? R4rt000011 Bl i':les1 do sPecial disPlas R4rR2 idisPla:i register's na1e on UPPer LEDs PCrOSPHA" R4 IRO<R4lrR5 R4 R5rR2 PCrDSPLNH KLOOPl iaake a word index iSet resister's contents idisPlas on lower LEDs itake another kes HIWATCHrR2 PCrDSFUN" @IWATCHrR5 91 iset watchPoint address ishow it on uPPer disPlas iset watchPoint contents RS iclear diSit accu1ulator tr .CHAN11!tFLAGSl; in case of sinSle disi t 1ode DIGfXE ,ENABL LSB 032737 001421 013702 004767 017705 000004 007706 IEXAH:: BIT BEO HOV 007756 JSR 174674 HOV 046610 tF.ADDRr@IFLAGS!;exaoinins RAH? ino II ;set current address HIADDRrR2 ;show it on UPPer disPlas PC rDSPlillt i!let contents lfADllRrR5 A-44 T-11 Evaluation "odul• "onitor ltACRO l/05,00 Sunda1I IJ-"'r-83 04:10 Pa!le 35-2 Kew Co..and Routines 11S 1411% 010502 116 141150 004767 m670 117 141154 052737 000001 118 141162 042737 000002 119 141170 000167 177112 120 121 141174 032737 000010 122 141202 001.ol 123 141204 00570! 124 141206 1003S7 125 141210 100767 126 127 141212 032737 000040 128 141220 001763 129 mm OOS70S 130 141224 100761 131 141226 000167 000774 132 133 GNEXAH: :HOV JSR 007706 007706 BIS BIC KLOOPt: JHP 007706 it: BIT BED !ST BPL 11111 007706 2t: ;seneral exa1ine ent~ Point RSrR2 ;show it on lower disPla~ PCrDSPlNH IF,DATAo@IFLAGS!;so to data entMI ood• IF,CHANr@IFLAGSl;indicate no chan!e •et ;take another ke~ KLOOP tF.REG,@tFLAGSl ;exa1inin9 a retister? ;no 2$ fR4 initialized to -1 bw SREG R4 jconterrts 1>iJt in RS b'i D:!GE.XE GIEXAH ;1snore EXAM1 1ake user ?ush a di~it first KLOOl'l lf,FIJtto@IFLAGSllrxecution! ....,ial function' Jisnore all other occurrences of EXAH KLIO'I RS IR'l initialized to -I b• tFIJHC ;i•nore EXM, 11ak.e user Push a ~isit first KLIO'I Bltl ;execute special function OOflllt JltP .DSABL LSB BIT BED ISi 134 135 136 141232 032737 000004 007706 tADV:: 137 141240 001405 138 141242 OOS237 007756 139 141246 005237 007756 140 1412S2 000723 141 142 1412S4 032737 000010 007706 1•: 143 141262 001425 144 141264 005204 14S 141266 020427 000011 146 141272 103-111 147 141274 012704 000011 148 141300 013702 007754 149 141304 004767 174526 ISO 141310 017705 0%440 !SI 141314 000714 152 3S: 153 141316 010402 154 141320 004767 174566 !SS 141324 006304 1S6 141326 016405 007732 157 141332 006204 !SB 141334 000704 159 160 141336 032731 000020 007706 2t: 161 141344 001711 162 141346 005204 !Al 141350 020427 000012 164 141354 001001 165 14135.! OOS724 4tt 166 141360 020427 000017 !67 141364 101440 168 141366 005304 169 141370 000436 170 !71 ,ENABI. LSB BIT BEQ INC INC BR BIT SEQ INC CltP BLO Jilt/ MOii JSR ltO\I BR lf,ADDRr@IFLAGSllstePPin! thrOU!lh addresses' 1$ @HADDR ;no ;•o to next word eHADDR $EXAM IF.REGr@IFLAGSI lstePPinS thrOUSI! resisters? ;no 21 ; re!lister index R4 idon't step Past watchPoint contents R4ol000011 3$ iselect watohPoint contents IOOOOllrR4 ;!let watchPoint address @Hllr\TCHrR2 ishow it an IJl'Per diSfl'la~ PCrDSP~M Hllr\TCHrRS ; set uatchPoint contents· GNEXAH ;disPla~ re!lister'~ na1e or1 UPPer LEDs ASR BR R4oR2 PCoDSPNAlt R4 IRO<R4loR'5 R4 GHEXAH BIT tF.BRKS1ltFLAGSlist.ePPirul throU!lh breakpoints~ BEQ INC CH? KLOOPI R4 R4oi000012 4$ CR4H R4•i000017 llOV JSR ASL llOV BHE TST CKI' Bl.OS DEC BR BRKPl R4 BRKPI ;1ake a word inde~ ;set re~ister contents ;no, i~nore advance jincre1ent breakPOint index ido SPeeial inrr@1ent Patt~tn i1ake breakPoint di~la~ A-45 T-11 Evaluation Kodule llonitor HACRO V05.00 Sund•• 13-Har-83 04!10 Paoe 35-3 Ke!::! CaM:and Routines BR tf,ADDR,@tFLAGSlistePPinS thrOU!ih addresses? ;no 61 ;so to next word HIADDR e!IADDR IEXAH 6$! BIT BED DEC BPL CLR BR tF ,R£6,HFLA6Sl istePPins throuSh resisters? ;no 71 R4 iPrevent underflow 31 R4 icontinue in lADV 31 1s: BIT BED DEC CHP BHIS ltOV BR tn 141372 032737 000004 007706 OACK!: BIT 173 141400 174 141402 175 141406 176 141412 BED DEC DEC 001405 005337 007756 005337 007756 000643 177 178 141414 032737 000010 007706 1~ 141422 001404 180 141424 005304 181 141426 100333 182 141430 005004 183 141432 000731 184 185 141434 032737 000020 007706 186 141442 001652 187 141444 005304 188 141446 020427 000014 189 141452 103005 190 141454 012704 000011 191 141460 000402 192 193 194 195 141462 012704 000014 196 141466 010402 197 141470 004767 174416 198 141474 020427 000014 199 141500 103420 200 141502 006304 201 141504 006304 202 141506 016405 007700 203 141512 006204 204 141514 006204 205 141516 010502 206 141520 004767 174320 207 141524 042737 000077 007706 208 141532 052737 000021 007706 209 141540 000441 210 211 141542 013705 007754 212 141546 000763 213 214 215 141550 012702 000012 216 141554 004767 174332 217 141560 013705 007756 218 141564 010502 219 141566 004767 174252 220 141572 om37 000077 007706 221 141600 052737 000004 007706 222 141606 000416 223 224 225 141610 012702 000013 226 141614 004767 174272 227 141620 012704 177777 228 141624 004767 174506 tF.BRKS1@tFLA6SlistePPinS throush breakpoints? ino, isnore backup KLOOPl idecreeent break.Point index R4 ido special decre.ent Pattern RM000014 i•ake breikPoint disPla!::l BRKPl ;index watchPoint tOOOOlt.R4 BRKPl .DSABL LSB $BRKP!: KOV BRKP!! HIJV JSR CltP BLD ASL ASL iindexins watchPoint or a breakpoint? ithe watchPoint i1ake an index for word Pairs BIC BIS BR HOV BR @tlWATCH,R5 21 ASR ASR ltOV JSR lf! !$ iindex breakpoint 0 ;show na1e of break.Point on UPPer disPla!::l R4 R4 ;set break.Point address BRKFIL-060!R4),R5 R4 R4 idisPla~ it on lower LEDs R5.R2 PC•DSPLNH t000077.PtFLAGSliclear Previous oode tF,BRKStF,DATA,@tFLAGSl iset brea~Point and data oode KLOOP2 HllV 2t: t000014,R4 R4•R2 Pc.DSPNAH R4,t000014 tADDRK! :HOV JSR HIJV ltOV JSR BIC BIS BR $REG:: ltOV JSR llO\I JSR ;~et watchPoint address ;pro1Pt with ' Addr ' on UPPer disPla~ t012,R2 PC,DSPNAH ;get Previous address HIADDR,R5 jshow it on lower diSPla1.:1 R5,R2 PC,DSPLNN t0000771@tfLAGSliclear Pr@Yious 1ode tF.ADDR,etFLAGSliset current address entry 1ode KLOOP2 t013•R2 PC,DSl'NAK t-t.R4 PC,BLJl(LO A-46 jpro1Pt with • rEG • on uPPer disPlaY iinitialize re~ister index to illegal value tand blank lower display T-11 Ev•luaiion l!odul• llonitor MCRO Y05.00 S•nd•• 13-llir-83 04110 P•lle 35-4 Ke• c....nd Routines 22'1 141630 042731 000077 007706 BIC 230 141636 052737 000010 007706 BIS 231 141644 000167 176436 KLOOP2: J"P 232 233 234 141650 012702 000020 tFUNC:: "ov 235 l4l654 004767 174232 JSR 236 Hl660 012705 177777 HOV JSR 2J7 141664 004767 174446 B!C 238 !41670 042737 000077 007706 BIS 239 141676 052737 000040 007706 BR 240 141704 000757 1000077,@tFlAGSl;clear PreYious 1ode IF.REG.@IFLAGSI iand set resistor select oodo KLOOP 1020,R2 jprOllPt Mith ' (unc • on UPPer display PC,DSPNAH 1-1.'15 iinitialize aceuaulator to illesal value PC,8LNl(L0 ·land blorJ: lot1er- disPli!~ t0000771ltFLAGSl ;clear Previous aode IF.FUNC.@IFLAGSliilld set function select 1ode KLDIJ>2 m 242 243 141706 052737 000200 007706 244 245 141714 023727 007746 007400 246 141722 101004 247 141724 023727 007746 000004 2~ 141732 103007 249 141734 042737 000200 007706 250 141742 012700 000004 251 141746 000167 175376 252 253 141752 013702 007736 254 141756 013703 007740 255 141762 013704 007742 256 141766 013705 007744 257 141772 013737 007700 007676 258 142000 013706 007746 259 142004 013746 007752 260 142010 042716 000020 261 142014 032737 000200 007706 262 142022 001422 263 142024 os2m 000020 264 142030 012737 137174 000014 265 142036 012737 000340 000016 266 142044 013700 007732 267 142050 013701 007734 26B 142054 013746 007750 269 142060 052737 000100 007706 270 142066 000006 271 272 142070 273 142070 032737 001000 007706 274 142076 001352 275 276 142100 012700 oomo 277 142104 012701 000004 278 142110 013020 279 142112 077102 280 142114 012700 007760 281 142120 01270! 000004 282 142124 005710 28J 142126 001405 284 142130 012730 000003 285 142134 005720 $SST:: BIS tf.SST1@tfl~GSl ;show we are sinsle slePPins fGO:: mSP,tSCRPl\D ;is user SP in his RAH'? ;no1 show error 1essa9e ;and is there r/JOll for 2 Pushes? CN' tGOt:: BHI lt: CHP BHIS BIC "ov J"P 2$; "DY llO\I 4t: 9t: ltOV ltOV ltOV llOV "OY BIC BIT BEQ BIS llOY llO\I HOV llOV llOV BIS RT! 3t: ss: m BNE "ov ltOV ioos: "ov SDB llOV llO\I 200.: TS! BEU "DV TST u HISP,14 jyes, SP is accePtable 21 tF.SST,@IFLAGSI ielse abort ;SP Error l4•RO hlo to fatal error harrdler to reenter 90nitor FERROR @tlR2,R2 ;restore user context1 l!tlRJ1R3 HIR4,R4 @tlf!S,R5 iand user ke~Press vector @IKEYPVS1HKEYPIY ive're on user's stack now l!tlSPiSP @llPS .-<SP l iPush PS1 PC like fro1 a traP iclear T-bit I020dSPI IF.SST,@IFLAGSl iare we sinsle ste••i~? 31 ino ;1::1esr set T-bit t020dSPl ;•ake sure BPT traP is still connected IBRKPT1@10l4 1340.@1016 ;finish N!storins context PHR01RO HIRhRI i.oush PC Hll'C1-ISPI tF.USER1@tFLAGS1;show we are runnini user code iand si1ulate return fra1 trap tF.8RKGr@tFLAGS1jsinSle stePPins over a break Point Pif Yes then don't install 41 IBRKFIL1RO l41RI l<ROlt. IROlt Rt.1001 IBRl(F!L.RO 141Rl !ROI JOOS 13,p(ROH <ROI+ A-47 ;start of break point table ifoor entr'Js isuck UP data frOI break Paint locations ; istart of break Point table ;saee as last ti1e ;first see if \here was reall1::1 one set ibranch if not ;set break Point ;skip lD ne1t:t T-11 Ev•lu•tion llodul• llonitor KACR1J V05.00 Sund•• 13-K•r-83 04ll0 P•S• 35-5 Ke• C...and Routines 286 142136 287 142140 288 142142 m 142144 290 142146 291 112m 292 293 077106 295 142156 296 142164 297 14216.\ 298 1mn 299 mm 300 142200 301 142202 302 142206 303 142210 304 142214 305 142216 306 142220 307 308 142224 309 032737 001017 020027 103014 020027 103411 020027 103403 020027 103403 005000 000167 m ~oos: ~02 032020 300•: 000774 052737 000400 007706 SOM: 000725 000207 SOB BR BIT BR BIS BR 040000 007706 KAllRCHl BIT BNE 020000 Lit!' BHIS 007400 CKP Bl.O 010000 CKP Bl.O 017400 CHP Bl.O 2t: ctR 175124 JKP 1t: RTS Rl,200$ 500$ <RO>MROH 400$ ifour entr~s iskiP this entr~ i~o back tor next tF .BRKAtHFLAGS1; ir1dicate breakpoints installed 91 iand So tF.PROTr@tFLAGS1ikeYPad scratch Protection on? 1$ inot deposit anywhere iis address above UPPer instance of scratchPad? ·. RO.t20000 1$ iyes' definitel~ doesn't address Protected RA11 iis it below lower instance of scratchPad? RO•tSCRPAD 1$ i'::li!S ;is it within lower instance of scratchPad? RO•tlOOOO 2$ iYes' address is ille~al ROrtSCRPAD+lOOOOiis it between instances of scratchPad RAH? 1$ h1est not withir1 their so address is OK RO ;index user RA" error •essa~e FERR OR ;so to fatal error handler to reenter 1or1i tor iaddress is acceptable PC A-48 T-11 Evaluation llodule l!onitor llACRO V05,00 Sund.., 13-l!ir-83 omo Pa!le 36 K.. c....nd Routines l .SBTTL SPec1al Ke,,,.ad llonitor Functions 2 J iRS was Or lr 2, 3, or 4 RS 4 142226 006305 DOFUHC::ASL JllP PFNCl'l!L IRS) idisPatch to selected function s 142230 000175 142234 6 FNCTBL: : , WORD CANCEL ;o 1eans cancel breakPoints 7 142234 142246 ,WORD GO I LED il •eans turn on LEDs and ~oat user PC 8 142236 142270 i2 aeans cold start console aonitor .WORD CHON! 9 142240 142572 ;3 1eans select baud rates and console t~Pe .WORD SPEEDS 10 142242 142320 i4 aeans disable ke~Pad aonitor scratch Ptotec1 11 142244 142562 .WORD NPROT 12 CANCEL : : HOV t020oRO i8 words in breakPoint file 13 142246 012700 000020 14 142252 105060 007757 tt: CLRB BRKFIL-llRO> ;clear address/contents Pairs ROoll 151422~ 077003 SOB 16 142260 005037 007754 CLR mwmH icancel watchP-oint also 17 142264 000167 175710 ;~o to register select 1ode FNCDONl Jlt> KllOltll 18 19 142270 112737 000007 177444 GOILrnl !MOVB tOO 7o@tPIPIJRC iturn tin l£D disPlir.:i's ;ilnd go 20 142276 000167 177412 JHP IGO 21 22 142302 000454 SPDTBL!: 1WORD JOO, 23 142304 001130 •WORD 600 • 24 142306 002260 •WORD 1200 • 25 142310 004540 •WORD 2400 • 26 142312 011300 •WORD 4800 • ,llQRD 9600. 27 142314 022600 28 142316 045400 •llORD 19200 • 29 SPEEDS: :HOV ; index 'ConSol' 30 142320 012702 000021 t021'R2 JSR Pc.DSf>NAH ;show ProaPt on UPPer disPla1J 31 mm 004767 173~2 32 142330 11J705 007710 HOVB !ICDiFLGoRS ;set baud rate bits 33 142334 042705 177707 B!C t177707oR5 ;aask out other flass 34 142340 006205 5i! ASR RS ;shift to word index Position 35 142342 006205 ASR RS 36 142344 016501 142302 SPD18LIR5hR1 ;~et corresPOndins baud rate HOV ;index lower disPla~ 37 142350 012702 000010 HOV tOIOoR2 idisPlaY deciaal nuaber 38 142354 004767 174006 JSR PCoDSPDEC PCoKHGET ;wait ror a ke11 39 142360 004767 174052 JS: JSR ;was it 'Enter'? CllP RlrlO!O 40 142364 020127 000010 BEQ i1Jes1 ~o to ai.ix Port speed 11 41 142370 001436 fwas is a function ke':!? CllP Rlrt016 42 142372 020127 000016 43 142376 103067 BH!S 101 i"::ies1 exit ;w~ it advance? 44 142400 020127 000014 Rlrt014 CllP 45 142404 001410 BED 21 ;1Jes' aodi f!:I'. baud rate 46 142406 020127 000015 CHP RI ot015 iwas it backUP'? ino, wait for another ke':! 47 142412 001362 BHE 31 48 49 142414 005305 RS ;decrease baud rate DEC DEC RS so 142416 005305 41 51 142420 100007 BPL ishow new rate iPrevent underflow 52 142422 005005 CLR RS 41 53 142424 000405 BR 54 11!5)1 SS 142426 OOS72S TST iincrease baud rate 2•: ioverflow? CltP RSol016 ~ 142430 020S27 000016 ;,.., BLO 4t 57 142m 103401 A-49 T·11 Evaluation Hodule ftonitor MACRO V05.00 Sund.• IJ·llar·B3 04:10 Pase 36-1 Sf.ecial Ke~Pad Monitor Functions 58 142436 005745 59 142440 006305 60 142«2 006305 61 142444 006305 62 142446 106137 007710 63 142452 110537 007710 64 142456 106037 007710 65 142462 006205 66 142464 000725 67 68 142466 012702 000022 69 142472 004767 173414 70 142476 016501 142302 71 1425-02 105737 007710 72 142506 100002 73 142510 006201 74 142512 006201 75 14m4 012702 000010 76 142520 004767 173642 77 142524 00476) 173706 78 142530 020127 000010 79 142534 001653 80 142536 020127 000016 81 142542 103005 82 142544 012700 000200 83 142550 074037 007710 84 142554 000750 85 86 142556 000167 175562 87 88 142562 052737 040000 007706 89 142570 000635 4t: 1St es: TST ASL ASL ASL ROlB HOVB RORB ASR BR llOV JSR HOV TSTB BPL ASR it: 10$: -CRS> RS RS RS @ICOHFLG RSoHCOHFLG @ICOHFLG ;store index in baud rate bits ;preserve hi§i order bit <F .A64X} RS SJ 1022oR2 PCoDSPHAll SPDTBLCR5loR1 etCDHFlG 9' RI RI ;index •A.Port' ishou pro1Pt iset console baud rate ;is 64 Xset for auy, port? ;no, sa1e speeds ;else console rate I 4 ~IOoR2 ASR MOV JSR JSR CltP BEG CHI' BHIS HOV XOR BR PC,DSPDEC PCoKEYliET R!.1010 FMCDON RI 01016 !Ol IF.A64XoRO ROo@ICllNFLG Bl ;index lower disPla~ jdiSPla~ baud rate iwait for a ke1:1 ;is it 'Enter'? ;!:lesr finished iwas it a function button? ;':les, exit ;no1 tog~le aux Port baud rate ;cONFLG is an even b':lle iwait for enter ke':I JHP KEYCHl ;execu~ function ke':I NPROT!: BIS BR IF oPROT oHFLAGSHt"rro off protection lso to resister select 110de FNCDON A-50 T-11 Evaluation llodule Konitor llACRO \IOS , 00 Sunda• 13-Kar-83 04!10 Pa•e 37 SPecial Ke~Pad ~onitor Functions .SBTTL Console Konitor 2 3 4 s 6 7 8 9 10 11 12 13 ;++ REGISTER USAGE! RS R4 R3 R2 RI RO Cold entr~ POint: ;-- H IS t61mn 17 142600 18 142606 19 H2614 20 142620 21 142624 22 142632 23 142636 24 142644 2S 142650 26 142654 27 142660 28 142664 29 142672 30 142676 31 142704 32 1m10 33 142714 34 142720 3S 36 37 38 39 142724 40 142732 41 142736 42 142744 43 142752 44 142754 45 142762 46 142770 47 142776 48 49 143000 so 14300~ 51 143012 52 143014 SJ 143022 54 143026 55 143032 56 143036 57 143042 last l!)(Pression value. current ter1 Vilue and scratch current address runnins POir1ter for inPut buffer Pointer and seneral Passing to routines co1Putational scratch passins to botto1 level routines and scratch 012737 012737 012737 005037 105037 142737 105037 012767 113700 052700 010037 004767 OS2737 106427 012737 004767 004767 012702 004767 006500 040100 000004 007630 007672 000007 007673 133000 007710 000002 l77S64 172304 002000 000000 000100 170614 170610 143052 171042 oom6 CKOH1:: KOV 007330 KOV 00732S llO\I CLR CLRB 007710 B!CB CLR8 KO'I 035214 KOVB BIS KOV JSR PIS KTPS KOV 007706 177560 JS!l JSR KOV JSR ;initialize user SP for console 1onitor HlJhHISP t400t!OOt!OO,etTllPKOD iset default aodes tf,11\JLL•HLASllNHni\ialize last line fla;s ;initialize console buffer P-ointers mr HHFP ;clear host buffer Pointer also tOOMtCONFLG iclear console line flass (but not SPeed) HHSTFLG ;clear host flass tl!NE!ff,COHIK ;hook UP console inPut service routine etCONFLGoRO i!let current baud rate tooooo2.Ro ienable Pros. baud rate, disable xait interrupt ;transfer control word to console Port RO,HCIXCSR iset aux port ba1Jd rate and disable rc.smux tF,KEYP1@tFLAGSlfdisable ke~pad aonitor ienable interrupts tOOO t000100,etCSRCSRienable eonsole receiver interrupt PCoCRLF ;start a new line PC,CRLF iPoint to sreeting aessa!le tGRET •R2 PC.PRINT it11Pe 1essa!le ;++ ;M- 012767 106427 012737 032737 001412 012737 133000 035126 CKOHIT: :KOV KTPS 000000 000100 177560 KOV 004000 007706 BIT 9ED 134540 000120 112737 000046 007711 112737 000046 177452 000402 105037 032737 OOISO! 042737 004767 013704 004767 004767 OOS737 War1 entr~ Point: 007673 lS: 000200 007706 2$! 000200 007706 006702 007750 012212 012126 007466 MV llOVll KOVB BR CLRB BIT BEQ DIC JSR llOV JSR JSR TS! tl!HEIN•COllIN fhook uP col'YSole inPut service routine iehable interrUP"ts tOOO tOOOlOOtftcSRCSRienable console receiver interrupt tF,HOSTr@tFLAGSl;is host 1ode enabled? ioor clear host flass to ler1inate functions u tHOSTIN,etAUXIN thook UP host irll"ut service interruPt t046.HAUXFLG tsave a eoP~ of new ASCREG value t046,@IAICREG ireenable aux Port receiver interrupt 21 etHSTFLG tstoP host artivit~ tF .SST ,@tFLAGSl ;iiiere we sir1!ile stePPin9? ;no.1 scrap line CKOll3 tr,SSTr@tFLAGS1 iclear flas fro1 SG01 routir1e PCoTYPREG t~est disPlas resisters Hlf'C,R4 tPoint to next locatiori PCoTYPADR it!iPe address ;Qisasse1ble next ir1struction PCoTYPLO! HREPEAT twere we rePeatinS? A-51 T-11 Evaluation llod\Jle "•nitor llACRO l/05,00 Sund•• 13-"-r-83 04:10 Pase 37-1 Console Konitor 58 143046 001463 59 143050 000476 BEQ Bl! CltON3 ;no CKOH4 ;~es, A-52 keep cOMand line T-11 Evaluation llodule Honitor llACRO V05.00 Sund•• 13-ltar-83 04:10 Pase 38 Consoli! Monitor 2 143052 076725 143060 045710 143066 070226 3 143074 000000 4 143076 001640 5 143102 000000 6 143104 007716 143112 021026 7 143116 000000 000207 055207 GRET: 051646 035557 143076 000000 ,RAD50 /TEH COHSOl.E HOHITOR v1.o I .1101m 0 .RAD50 I WHAT I .WORD 0 023132 001156 OVERFU .RADSO /BUFFER OVERFLOW/ 046557 ,WORD 0 004540 WHAT! 8 PC,CRLF 9 143120 004767 170400 PRHERR:: JSR it'JPI! <CR> <LF> 10 143124 012700 056007 t400l13H007,RO ;t,,e <BELL> I HOV II 143130 004767 170374 PC,CHROUT JSR 12 143134 004767 170276 PC,GETBP ;set rur1ninS: Pointer to back Pointer JSR PC, ECHO 13 143140 004767 170776 JSR ;echo b1Jffer to corisole to indicate error 14 143144 012700 000134 it'JPI! \ <CR> HOV tl34•RO 15 143150 004767 170354 JSR PC•CHROUT 16 143154 004767 170344 PC,CRLF JSR 17 143160 000167 170602 PRINT iPrint error aessase .JltP 18 19 ;++ 20 Cot11and error entr'J Point: ;-21 22 23 143164 012706 007462 tSTACK,SP CHON2!: MDV ;we caae here fro1 unsPecififd dePth 24 143170 012702 143076 HOV tllHAT •R2 iPoint to error 1essase PC,PRHERR jprint erroneous co1aand line and error 11essa9e 25 143174 004767 177720 JSR 26 143200 012700 000077 ton.Ro HOV it':IPI! ? <CR> 27 143204 004767 170320 PC,CHROUT JSR 28 143210 000402 BR CHOH3 29 30 Ht 31 General error entr'Ji scrap rest of coaaand line, ter1inate host inPut: ;-32 33 pe,PRHERR 34 143212 004767 177702 ERROR:: JSR iPrint error 1essase 35 143216 142737 000200 007673 OiOH3:: BICll tF.LOAD.etHSTFLG;stOP loading fro• host ~6 143224 012706 007462 tSTACK,SP CHOH3t: ltOV iwe don't know at which level error occurred 37 143230 005037 007630 mP iclear both bacJ. Pointer and forward Pointer CLR idon't keep rePeatinS bad co11and line 38 143234 005037 007466 CLR HREPEAT 39 143240 152737 000004 007324 tF.NULLrftLINFLG;act like line was not eaPtY BISB 40 Ht Fresh co11and line and repeat entr~ Point: 41 ;-42 43 ;save old line ParsinS flass 44 143246 000337 007324 HLIHFL6 C"Otf4:: SWAB @tlIHFL6 ireset line Parsins flass tor new line 45 143252 105037 007324 CLRB PC,Pl.llGE ;purse botto1 of buffer1 clear runriins Pointer 46 143256 004767 170166 JSR ;repeat line or Pro1Pt for a new one? 47 143262 005737 007466 l!tREPEAT TST jpr01Pt for a new one 48 143266 001403 BED II 49 143270 005337 007466 HREPEAT icount rePetitions DEC 50 143274 000543 BR CHOH5 iar1d re-e>eecute line 51 52 143276 113737 007331 007330 1s: etPERHOD.etTHPHOD ; restore Fer1ar1ent lodes ltOVB 53 143304 004767 170214 PC,CRLF ;start a new line JSR t<24iSOtOS>tSOtl5•RI ;RAD50 triPlet 'TEH' 54 143310 012701 076725 HOV A-53 T-11 Evaluation Kodule "ooitor MCRO V05.00 SUnda" 13-Kar-83 04:10 Pase 38-1 Monitor Cori~ole ss mm 004767 170464 JSR 56 143320 012700 020076 l«l\I 57 143324 004767 170200 SB 143330 123703 007631 59 143m 001415 60 143336 004767 170600 61 143312 126327 007467 000015 62 143350 001367 63 143352 105037 007324 64 143356 005003 65 143360 142737 000001 007673 66 143366 000506 67 6B H3370 105737 007672 69 143374 001755 70 143376 105737 007673 71 143402 100444 72 143404 132737 000001 007673 73 143412 001403 74 143414 004767 171324 7S 143420 ooom 76 77 143422 004767 170076 78 143426 012701 032153 79 143432 004767 170346 BO 143436 012700 037124 Bl 143442 004767 170062 B2 143446 105737 007672 83 143452 001411 84 143454 004767 171264 85 143460 132737 000001 007673 B6 H3466 001003 87 143470 010100 BB 143472 004767 170032 09 mm 123703 007631 90 143502 001761 91 143504 005003 92 143506 105037 007324 93 143512 000671 94 95 143514 004767 171224 96 143520 106427 000340 97 143524 113702 007631 9B 143530 042702 177400 99 143534 001003 100 143536 120127 000012 101 143542 001407 102 143544 120227 000140 103 143550 103007 104 143552 110162 007470 !05 143556 105237 007631 106 143562 106427 000000 107 143566 000660 108 109 143570 106427 000000 110 143574 012702 14JI04 Ill 143600 000167 177406 2t: JSR CKPB BED as: JSR CKPB BHE CLRB CLR BICB BR 3f: TS18 BEG TSTB BK! me ll[Q JSR BR 9S: JSR KilV 5$! JSR ftOV JSR TSTB BEG JSR me 7t: 4$! Bii!'. KOV JSR CftPB BfQ CLR CLRB BR JSR ftTPS ltOVll 101: 11$: 6S! BIC BNE CKPB BEG CKPB BHIS KOVB JHCB KIPS BR KTPS llOll JKP ;t.,,,.e a sinsle RAP~O triPlet PC,PRINT! t400*040I076,RO l\.,e > <SPAC£> PC,CHROUT @fFP,R3 isee if a character has been t~~ed inor so check host buffer 31 Pecho character to console PC.ECHO ;is last character a <CR>~ BUFFER-llRJl,tOIS inor wait for one 21 ;reset line tla3s fro• £CHO ULINFLG iset running POinter to besinnins of line R3 tF ,[IYTEhl'tHSTFLGiclear host line ~Yte bucket ("0> fla9 ;e1eecute line Cl10N5 ;see if we have a character tro1 the host ;nor so back and chec~ console iare we loadird or just listenins? iloadinSI 4' tF,BYTBretHSTFLGiare we i!lnoriru:I host 1essa9es? 91 fno PC,HGETCH ;~esr set character fro• host 2$ iand throw it awa~ etllFP 2f etHSTFLG pC,CRlF ;start a new line to show 1essaS1e fro• host ;RAD50 tri•lel 'HOS' l<IO•SOtl7>l50t23•RI lt~Pe a sin3le RAD50 triPlet pC,PRINT! t400l0761124,RO ;'T>' pC,CHROUT ;coaf'lete the header ;see if we hav€ i character ttHFP ;no1 check console for ke~Press 71 ;get character fro1 host buffer PCrHGETCH tF.BYTB1@IHSTFLG;are we isnorinSI ho5t aessases? i~es1 throw character awa~ 7$ Rt.RO PCrCHRIJUT @lfP,RJ 5$ R3 etLINFLG 1$ ;else echo it to console ;see if console t!IPed a character iif r1ott continue hnst aessase ;PrePare to re-echo console inPut pc,HGETCH ;seit character trot host buffer iblock console interrupt for a while ;set console buffer inPut Pointer ;Prevent sisn extend ;we aren't at besinnin~ of line ;throw awa<:1 Ii~ feeds at beSlinninS of line mo etfP,R2 tl774QO,R2 101 Rl,1012 ;redispla!I Pro1Pt and echo buffer a!:lair1 Ill 21 iis buffer full! abort load Process ltranster character to console input buffer iad~ance buffer inPut f'Ointer ;restore ioterrUPts ;echo buffer to cor1sole 1000 IOVERFl•Rl ERROR il'fstore interrupts iPoint to error 1essa~e iand f'rint it R2·1140 6$ Rl,BUFFERIR21 HFP tooo A-54 ;~est T-11 Evaluation KodlJle Honitor MCRO V05.00 Sunda• 13-Kar-83 04:10 Pase 38-2 Console "onitor 112 113 114 ;++ Hext co..and entry Point: ;-- llS 116 117 143604 110 1rn10 m 120 143612 121 122 143616 123 143622 124 143624 125 143630 126 143634 127 143640 128 143M4 129 PC,GETNXT CKON6 ;set first 1eanin~ful character BR 004767 167570 COl!TIN! !JSR PC,GETLCH ;recover list acauired character 005737 001004 110337 105337 000337 105037 000402 007466 C"6N6:: TST HREPEAT ;are we rt'f"eatinS? 007630 007630 007326 007326 BHE KOVB DECB SllAB CLRB BR R3,H8P HBP Hctl!COK HCURCOH CKON7 ~767 ooom 167616 CltONS:: JSR tt: ;':Jes, so keeP last co11and ;else throw it away ;save old co11and flass iand initialize thea for next coa1and it+ Parse tOP level: 130 131 132 133 134 143646 m 143652 136 143656 137 138 143660 139 143666 140 143674 141 143676 142 143702 l43 143704 144 143710 145 143712 146 147 143714 148 143720 149 150 143724 151 143730 152 143732 153 143736 154 143740 155 143742 156 143746 157 l43754 158 159 143756 160 143762 161 143764 162 143770 163 143774 164 143776 165 144002 166 167 144004 168 144010 a ;-004767 167554 120027 000015 001544 152737 132737 001364 120027 001761 120027 001005 000402 000004 007324 000020 007324 .EHABL COil.UP: JSR CHON?: CHPB BEQ LSB PC,G£TNXT RQ,to15 DOCR 1s: tF,NIJll,HLINFLGishow th•t line is not eo•t• tF.COHH1@ILIHFL6iare we in a co11ent'? ;YeS, keep lookins for <CR> COltlUP RO,t054 ;is it coaaa'l' ;ignore co11as at top level COHLLf RO,t033 ;is it <ESC>? 21 ino ERROR2 000054 000033 BISB BITB BNE CHPB BEQ CHPB BNE BR ;set next aeaninitul character ;is it <CR>? iYes, so to <CR> handler 1io to seneral e~~ression handler 000167 000354 000167 mm 4S: JHP ERROR2! JllP DOEXl'R CltOH2 120027 103773 120027 101370 001006 010537 152737 000713 2$! CHPB BLO CHPB SHI BHE HOV B!SB BR iis character control1 sPace1 or '! '? RO.t042 ;¥es1 invalid co11and ERRm2 RO,tl37 ;is it above underscore? ;~esr invalid co11and ERROR2 ;not an underscore 51 iexecute underscore RS.HSllVEXP lf,SllVX.@tLINFLG;show ••ndin9 underscore ;!let next cotaanrj CltllH5 ss: CffPB ;is it caret? B"l DEC BR RO,t136 61 @tlADDR @IT HP HOD CKDN5 e!IADDR CltOl/5 C"PB llNE RO.tl34 71 Pis it reverse slant? 120027 001010 005337 105737 100703 005337 000700 000042 000137 007336 000010 007324 000136 007756 007330 DEC TSTB 007756 120027 000134 001017 BNE 6S! A-55 ino ;execute caret ;are we in b~te 1ode? bark uP a bYle ;else back UP a whole word i~t next coaaand ;~es1 ;no T-ll Evaluation l'todule Konitor HACRO V05.00 S•ndas 13-Har-83 04:10 Console Konitor 169 1"'4012 106437 007327 170 144016 001010 171 144020 010537 007756 172 144024 010504 173 144026 004767 011216 174 144032 004767 011042 175 144036 000662 176 177 144040 012702 151372 178 144044 000167 177142 179 180 144050 120027 000133 181 1"'4054 101l21 182 144056 120027 000100 183 144062 101314 184 H4064 001715 185 186 144066 116001 155n4 187 144on 042701 177770 188 144076 006301 189 144100 000171 144104 190 191 192 144104 143164 193 144106 144274 194 144110 151426 1vs 14m2 144124 196 144114 151164 197 144116 144134 198 144120 143164 199 144122 144274 200 201 202 144124 152737 000020 007324 203 144132 000624 204 205 206 144134 004767 167364 207 144140 010746 043164 208 144144 042767 000200 043156 209 144152 010501 210 144154 004767 010716 211 144160 012467 043144 212 1"'4164 000167 177414 213 214 215 144170 105737 007673 216 144174 100426 217 144176 106437 007324 218 144202 001423 219 144204 106437 007325 220 144210 103427 221 144212 013704 007756 m 144216 132737 000004 007325 223 144224 001004 224 144226 013704 007334 225 144232 010437 007756 Pa~e 38-3 HIPS Ill ASCOH BNE Bl HOii JSR JSR BR RS•@llADDR RS.R4 PC,TTPADR PC.TYPLOC Cl10HS es: KOV JHP IUNPEFX,R2 ERROR 7t: CHPB BHI CHPB Ro.1133 ERRDR2 R0,1100 PARDSP: •WORD .WORD .WDRD ,WORD .WORD .WORD .WORD .WORD CMOH2 DOEXPR DOLABL OOCOHK llOSYHB OO!IVAL CKON2 DOEXPR DOCOHH: BISB BR tf,COHHr@tLINFLG;inditate we're in a co1111ent CllONS iand continue OO!IVAL: JSR it!jPe last expression n1J1ericallY PC•CRLF TMPMOD,-<SP) fsave fla3s tF.8YTM• lllPHOD i•a~,e word •ode RS.RI PCoTYPNHl ; restore fl ass <SPlt. IKPHOD CKOllS llOV ;did the last exPres5ion have undefined s~•bols ;yes, refuse settins of the current address iexecute reverse slant ;set new address it~Pe R4 as rru1ber or label ;t~Pe location addressed b~ R~ Pset next co1aand ierror1 undefined exPression ;is it left bracket? ;no, invalid co11anrj ;is it alPhabetic? i~es1 beginning of expression or instruction 41 9111 ino1 at si!ln is invalid coa1and ERRDR2 BED iwe've narrowed RO to the 042 to 077 ranse PARAllS-040!RO),RI ;set parsins code HO\IB 1177770,Rl ;1ask out other infor1atior1 BIC i1ake it a word index ASL RI @PARDSP!Rll iand dispatch accordin~l~ J!P .DSABL LSB llOV BIC HOii JSR KOV JMP DOCR:: ISIB BHI HIPS BEQ HIPS BCS HOV BITB BNE HOV MOV ;o 1eans invalid coaaand fl 1eans §et expression or instruction ;2 1eans define label ;3 1eans stirl co11ent ;4 iaeans define s~1bol ;s aeans tYPe nu1ericoll~ ;6 aearrs valid as operator within exPressior1s ;? 1eans both 1 and 6 are true ;are we loadins fro1 host? HHSIFLG ;~es, suPPress <CR> co11and teat1Jre 31 fll!NFLG i3et co11and line flaSs iline is not e1Pt'!f, su do riothins 31 HLASLJH flast line caused sin9le step, so sleP asairi 51 HIADDR,R4 ;set current address IF,NULL•@ILASl.IN;did las\ line dUI> locations' 61 ino1 so don't advar1te PtADVADR,R4 iadvance Past last duaP R4•!11ADDR A-56 T-11 Evaluation Hodule "onitor "ACRO V05,00 Sooda• IJ-"ar-83 04:10 Console tkmi tor 226 144236 227 144242 228 144246 229 230 144252 231 144256 232 144260 233 IH264 234 235 144270 016705 033535 004767 010734 010437 007334 ot: 005737 007466 001002 l!Oll7 007630 000167 176756 3S: ~·: 000167 003122 ss: "OV JSR "ov TST -!,RS pe, TYPLIH R4 •HADVADR Pa~e 38-4 itYPe a line of locations ;save next address for subseGuent du1P iare we rePeatinS? ;14es1 so keep c:o11and line ;no, discard executed co11arrds JKP HREPEAT 4f RJ,etBP CKOH4 JKP STEP ;execute single steP BHE KO\li A-57 T-11 Evaluation "odule 11onitor MACRO V05.00 Sund•• 13-!ar-83 04!10 Pa!ie 39 Console rtoni tor 2 3 4 5 6 7 8 9 10 11 12 13 14 144274 15 144300 16 !W04 17 14H06 18 141312 19 144314 20 144320 21 144322 22 144326 23 144330 24 144332 25 144336 26 17 144340 18 144342 29 Hm• 30 144350 31 144354 32 144356 33 144362 34 144364 35 144370 36 144372 37 144376 38 144400 39 144404 40 144410 41 144412 42 144414 43 144420 44 45 144422 46 47 144426 48 144430 49 144434 50 51 52 144440 53 144H6 54 144452 55 144456 56 144460 57 144466 .SBTTL Parsin9 Routines ;++ DOEXPR parses an expression' instruction, directiver or verb, and handles it accordin!ih~. If aPProPriate, e»Pressions are deposited at the current location. Note that the old value of R2 (which 1a'J be a Pointer to • s":11bol froa the last invocation of DOEXF'R) is saved before Parsir1!l an expression. This is to acroaodate the .ESC directive1 whose Parsing will chan!le the value of R2, The old value is needed for seouences such as <s'=l1bol> .ESC K • The old value of EXPf"LG is also savedr for the saae reason. ;-004767 120027 001453 120027 001450 106437 102010 106437 100063 102003 005737 100031 010405 120027 001432 120027 001427 110027 001424 120027 001421 106437 100420 004767 105737 100406 010514 005237 000403 000212 000072 .ENABL LSB DOEXPR: :JSR PC•GENEXP CHPB BEQ CHPB BEQ HTPS BVC HTPS BPL BVC 1ST BPL 000075 007326 007332 007706 9S! 000077 2s: 000134 000137 000033 007324 010120 007330 HOV CHPB BEQ CltPB BEQ Clf'B BEQ CHPB BEQ HTPS BHI JSR rm 007756 R0,1072 10 R0,1075 141 HCURCOH 21 ~IEXPfLG 81 91 @IFLA651 31 R~1R5 R0.1077 141 R0,1134 141 RO,tl37 141 R0,1033 141 HLINFLG 61 PC,ADRCHI HTHPHOD Bill 41 INC "°" BR R5,@R4 i!IADDR 51 iset an exPression fis next character :? iljl?S• isoore expression ;is next character ;? i':lfs1 ignore expression ;has RS been set? i~es1 not Just a naae fwhat is na111e'? ;predefined s~tbal jdefined user ss1bol, proceed ;else see if we are in PASSl ~ode iuiier defined na1e has no value ir1 P~Ss2, error ;;et na1e's value iis next character 1 ? 1 ? ;11es' do nothin; ;is it \? ;ses1 do riothin; ;is it _? ;ses, do nothin~ Hs it <ESC>' ;ses1 do nothin!I ihas under line been ex!K'uted? ;~es1 duaP RAH locations jchec~ if odd address or not in user RAH iare we in b~te 1ode? i1:1es tde~osit data word 000167 176536 3S: JltP C"ON2 110514 005237 0077S6 000167 l 77152 4S: "OVB INC JHP R5,@R4 eHADDR CON TIN BICB HOV JSR BNE IF,SAVX1HllllfLG ;~et startins address @ISAVEXM4 idutP a line of locations PC• TYPLIN 141 BITB tF.IHSTr@tTHPKODiavoid t!:lfin; duPlicate addresses BEQ 71 ss: 14S: 142737 000010 007324 6S: 013704 007336 7S: 004767 010524 11s: 001366 132737 000100 007330 10$! 001771 A-58 jdefiosit bste of data irecover last character1 Parse next co11and 11 Ev1luation ttodule Mord tor KACRO VOS,00 Sunda. 13-Kar-83 04110 Pa~e 39-1 rsimJ Routines 58 144470 59 144474 60 61 144476 62 144500 63 144502 64 65 144506 66 67 004767 010512 000770 JS!l BR 102403 103317 000167 005500 Sl: 000167 002460 12$! BVS BCC JKP PC, TYPLINH 111 m 91 G!:TINS Jlil' DOVER8 .DSABl LSB A-59 iis a directive or verb ;is R01 ,, Bl, etc. ielse is an instruction ;handle directives and verbs T-11 Evaluation Hodull! Konitor KACRD V05.00 Sund•• 13-Har-83 01:10 Pase 40 Parsin9 Routines ;++ G£TEXP F<arsl!s a whole expression anO returns its volue in RS. GEHEXP Parses an exf'ression or reco!lf1izes ari instruction or ;':laboL 2 3 4 5 6 7 144512 8 144520 9 10 144522 II 144526 12 144532 13 144540 14 144542 IS 144546 16 144550 17 144554 18 144556 19 144562 20 144564 21 144570 22 144574 23 144600 24 144602 25 144606 26 144610 27 144614 28 144616 29 144622 30 144624 31 144630 32 144632 33 144636 34 144640 3S 144"44 36 144646 37 144652 38 144656 39 144662 40 144664 41 144666 42 144670 43 144674 44 144676 45 46 144700 47 144702 48 144710 49 144714 50 144716 ;-.ENABL LSB tF.VALUrftCURCOHiset fla~ to allow non-valu~ objects 152737 000002 007326 GENEXP: :BISB isYCh as undefined S':llbolsr directives, etc. BR 7i 000402 004767 005037 152737 005004 120027 001464 120027 001461 120027 001004 004767 004767 120027 001522 120027 001517 120027 001003 004767 000436 004767 100403 004767 000430 004767 100476 004767 106737 106437 100406 102446 103016 10i>437 102442 000412 GETCW'\I ROol043 11 PCoEXINIT PCoGETNXT R0.1074 LPAREN R0,1133 LPAREN R0,1047 3• PCoGETLIT GETOPV PC1111J"CH 2• PC,GETNHB GETDPV PCoRADCH 000576 007332 007332 PC,6ETNAH @IEXPFLG @IEXPFLG m 102011 142737 000004 007326 005737 007706 100032 000402 004767 004767 120027 001506 56 1~-4736 120027 57 !H142 001507 JSR HFPS KIPS BHI BVS BCC HTPS BVS 007326 SI 52 144720 53 144724 54 14U30 SS 144734 ;initialize al'td set valued expression ;clear level counter and ter1 flags tF.UNDF,~tCURCOH;clear undefined expression tlas ;initialize ter1 re~ister R4 ROol053 ;is it +? ;!:lest accept o~erator GETOPV ;is it -'? ROrt055 GETEXP: :JSR 000452 007332 7!: CLR 000004 007326 BISB GETEX!: CLR 000053 CHPB BED 000055 CHPB BED GETERlt: : CltPB oooon BNE 000402 JSR 16U32 JSR CKPB 000074 lf! BED 000133 CHPB BED 000047 CltPB BNE 001236 JSR BR 007526 3f: JSR BHI JSR 000450 BR 007436 2i: JSR 000246 166456 000076 000135 e•: PC•EXINI! mXPFLG m ai iis it t? iset valued expression ;set next character iis it <? ;':lesr do left Parenthesis lis it [? P':les, do left Parenthesis iis it ''? ;oo iParse literal ter1 ;force vilued e:.:?ression <ind gel operator iis it nu1eric? ino iset nulber ;force vah1ed exPressioru 9et operator ;is it RAD~O character? ino, illesal character ;parse naaed object isave condition flass ;recover actual values iuser defined s<::1111bol or undefined na1e ia directive or verb, tr~ to exit iPredefined s~abol1 Set oPeraloriis this a valued expression? ;no1 we have an instruclior1.1 tr':I lo exit iuse base value of instruction as data, Set Of'• BR ENDEXP GETOPR HCURCOH ENDEXP GETDPR BVC BICB TST BPL BR ;proceed if user s~1bol if defined tf,UNDfr@tcuRCOH;show we have encountered an ~ndefined S':llbol @IFLAGSJ iare we in PASS1? ENllEXP Jno1 don't allow undefined s'>lbol ir1 et:f'ression h1es1 proceed with expression GETDPR GETOPV: :JSR GETOPR::JSR CKPB BEQ CHPB BED GETDPR PCoEXINIT PCoGETLCH Ro.!076 RPAREN R0,1135 FPAREN A-60 ;initialize data expression irecover last character iis it>? ;~esr do ri~ht Parenthesis ;is it J? i!:lesr do risht Parenthesis fetch t-11 £valuation Module Monitor MACRO l/05, 00 Sund•' 13-Mar-83 04:10 Pase 40-1 ~int Routines '\.,'\\\'\ ~59"'"''' 144750 '\"L'l'>L\ 103412 ~'" 60 141752 61 1H756 62 144760 63 144764 64 144770 65 144774 66 67 144776 68 69 145002 70 145006 71 145010 72 1!5014 73 145016 74 145022 75 145024 76 145026 77 145030 78 145034 79 145036 80 81 145042 82 83 145046 84 85 145052 ea 145054 87 145060 Bil 145062 89 145066 90 145072 91 145076 91 145101 93 145106 94 14SllO 95 145114 96 1451!6 97 145122 98 99 145124 100 145130 101 145134 102 145140 103 145144 104 145150 105 106 HSl52 107 145156 108 145160 109 110 145162 111 145166 112 145170 113 114 145172 120027 103007 116001 042701 020127 103053 BLO CHPB BH!S HDVll B!C CKP BH!S 000060 155774 17777Q 000006 ""' '"' " \\~ .....~'"\,~\~"'\ "*.\."'\$\ '~· 61 ;~es1 not an operator RO.t060 ;is it above /? 61 ;~es1 not an operator ;s:et Parsiris: code PARAKS-0401RO),RI ;1ask out the s:arbas:e t177770•Rl Rt.16 ; is it an oPerator? DOOPER ;lS!sr do operator 004767 000216 6$! JSR PC•EXDOOP ;no 1ore 0Perators1 but de Previous one 105737 001015 106437 102410 106437 100401 102406 102003 005737 100101 000167 EHDEXP: TSTB BHE HTPS BVS KTPS Biil BVS 91: B'JC TST Bf'l 5S: JKP @ILEVEL 131 HCURCOH 51 @tEXPFLG 91 131 51 HFLA6SI 121 6ETLCH ;are we at top level? ino1 error ;is expression suPPosed to be valued? ;not necessaril'S ;was ter• valued? ;no, but it was user defined ;r;o, error iwas valued, no Proble1 iare we in PASSl? inor undefined s~1bol is not allowed iset last character back in RO CltOH2 ishow error 007333 007326 007332 007706 166344 JKP 000167 176116 131: 020627 007410 LPAREH: CHP IOJ773 004767 010546 113746 105237 004767 004767 004767 010504 112637 012605 004767 000700 004767 004767 004767 110037 004767 000602 000112 007343 007333 000102 166324 177432 007343 l66J04 000042 000004 1662..6 007343 166256 SP,IBOTTOMt10.t22.t2, iis there roo1 to recurse? i(that was Swords for future JSRsr 11 for interuPts, and 1 safety) 131 ;no, Parenthesis too deep 8LO ;force UPPer expression to be valued JSR Pc.EX!NIT R5,-(SP> HOV ;save accu1ulator @tOPERAT .-CSP> iand previous operator MOV8 ishow we are s:oins deeper IHCB etlEVEl ;initialize accu1. and operator for neKt level JSR PC.EX!Hl! PC,GETHXT ;get first character of nested expression JSR ;get value of nested e>:Pression JSR PC.GETEXl R51R4 h1ested value becotes operand HOV (5Plt.@tlJP£RAT ;re-cover operator ltOVB KOV tSPlt.RS iand accuaulator PC,GETNXT i~et character after risht Paren JSR ;and look for next operator SR GETOPR DOOPER: JSR JSR JSR ltOVB JSR BR PC.EXIH!T Pc.moor PC,GETLCH RO,@IOPERAT PC.GETHXT GETERH HLEVEL ;force valued expression iexecute Previous operator is:tit new operator istore it iset next character Hook for a ter• ;are we at top level? i~s1 too tanY riSht Parenthesis ido last operator inside Parenthesis ~rid return 105337 007333 100731 000417 RPAREH: DECB 004767 177764 011505 000207 FPAREH: JSR HOV RTS PC1RPAREH @RS.RS PC ;do a fetch 106437 007326 EXIHIT: HTPS HCURCOll jh.Js expression alread~ beer1 initialized? BK! 131 BR EXDOOP A-61 T-11 Evaluation Kodule Honitor ltACRO \I05, 00 5"nda• 13-Har-83 04110 Pa•• 40-2 ParsinS Routines 115 145176 116 145200 117 145206 118 145210 119 145216 120 121 145220 102007 BVC !12737 000053 007343 EXIN!li HOVB CLR 005005 a!CB 142737 000002 007326 4$! RTS 000207 106437 007326 122 145224 102774 123 145226 124 145232 125 145234 126 127 145240 128 145244 129 130 131 145250 132 145252 133 145254 m 145256 135 145260 136 145262 137 145264 138 145206 139 145270 140 145272 141 145274 142 145276 143 145300 144 145302 145 145304 113701 007343 006301 000171 145146 EXDOOP! HTPS BVS HOVB ASL JHP 012702 151372 000167 175742 12•: 152130 143164 143164 143164 143164 OPRTBL: .wo1rn 152134 143164 143164 143164 152142 152154 14l164 152160 143164 152164 i':les jset t as default operator iclear ex?ression arcuaulator RS tF,VALU1etCURCOHishow exPression is valued 41 t053.HOPERAT PC iif expression is valuedr do operator @tCURCOH inot valued 41 iSet oP-erator HOPERAT,Rl iaake a word index RI @OPRTBL-102fR1 I iexecute operator HOV tUHDEfX,R2 JllP ERROR .DSABL LSB .WORD .WRD .WORD .WORD .WORD .WORD ,WORD .WORD .WORD .WORD .WORD .WORD .WORD .WORD LOGOR CHOH2 Cl!OH2 CHOH2 CHOM2 LOGAHD CHOM2 CHON2 CHON2 HULT IP ADD IT CH0/12 SUBTR CHON2 DIVID A-62 iPoint to undefined exPressior1 aessa!le ishow error ..' i! ;t a ;i ;i ., ';( ;) ;i ;t ;, ;;, ;; T-11 Evaluation "odule "onitor MCRO V05.00 Sund•• 13-Har-83 04:1o Pa•e 41 Parsins Routines 1 2 3 4 5 6 145306 7 145310 8 145312 9 145316 10 145322 11 145324 12 145326 13 145330 14 145334 15 145336 16 145342 17 145344 18 19 145350 20 145354 21 145360 22 145362 23 145364 24 145370 25 145372 26 145374 27 145376 28 145400 29 30 145402 31 145404 32 145410 33 145412 34 35 145414 36 145420 37 145424 38 mm 39 145432 40 14543-4 41 145436 42 145440 43 145442 44 145444 45 145446 ;++ GETHHB parses a nulber and returns all condition fla!is lowered. ;-005303 010346 004767 004767 100373 012603 005001 120027 001427 004767 100402 000167 GETNJtB::DEC HOV 166000 007034 1s: 175614 4t: JSR JSR BPL HOV CLR CHPB BEO JSR 11111 JHP 004767 165742 3f: JSR 000056 006740 R3 R3,-ISPl PC,G!:TCH PC,NUHCH II IS1'l+.R3 RI Ro,t056 2$ PC•RADCH 31 CllOH2 PC,GETCH PC,NIJllCH Sf oom1 006776 JSR 100410 102770 162700 0000•0 006301 006301 006301 060001 000763 BHI BVS SUB ASL ASL ASL ADD llR t060,RO RI RI RI RO.RI 31 41 005303 004767 166016 010104 000207 Sf: 6f: DEC JSR HOV RTS R3 PC,6£TNXT Rl,R4 PC 004767 165676 004767 006732 100767 162700 000060 006301 010146 006301 006301 062601 060001 000762 2s: JSR JSR BK! SUB ASL HOV ASL ASL ADD ADD BR PC•llfTCH PC,Hl.llfCH 6• to60,RO RI Rl,-!SPl Rt RI ISPlt,Rl ROrRI 21 A-63 ;save runninS Pointer to Peek. ahead iis it 0 thtou!fh 9? hies' wait tor first rion-nuaeric character· ;~ back to besinnir19' of nu1ber ;is first non-nuaeric character a Period? ;~es1 Parse a deci1al nulber ;is it alphabetic? ;no, Parse an octal nu.tier ;ille!ialr libel besins with a nu1ber ;is it 0 throu!ih 7 or a throu!ih 9? inor end of nu1ber ;s and 9 are ille!i'al in octal nu1bers P1ike it BCD ; accUMJlate di Sits ;set next di9it ;~et character after nu1ber ;store value of ou1ber ;trailins deci•al F'Oir1t iaccU1ulate di!lits iset next di!lit T-11 Evaluation llodvle llonitor MACRO V05.00 Sunday ll-Har-83 04!!0 Paie 42 P•rsins Routines 1 2 l 4 5 6 7 8 9 10 11 12 13 it! GETNAtl Parses a na1e and converts it into RADSO at locations TBL TOP arid T8tTOP!2. If the na1e has a corres?ondins value1 it is Placed in R4. R2 is an index to where the na1e is stored. It can index either the RAD50 table in ROH for Predefined s~abols1 or the user s~•bol table. GETNAH returns condition flags to indicate these oPtions as follows: V=l 1eans the na1e has no value N=l 1eans the natie is user defined (not ~redefined) C=l 1eans the na1e is a 1ne1onic1 directive, or verb N=01 V=01 C=O 1eans that the naae is R01 SP1 PC1 B1r UR1 etc. N;:::Q, V=01 C=l aeans that the naae is an instruction N=01 V=l1 C=l eeans that the naae is directive or verb N=l• V=1 aeans that the na1e is an undefined s~abol N=1t V=O 1eans that the naae is a user s~1bol 14 15 16 17 18 19 145450 20 145456 21 145460 22 145464 2l 145UO 24 145U4 25 145476 26 145502 27 145504 28 145510 29 145516 30 145520 ll 145524 32 1455l0 3l 145534 34 1455lb l5 115542 36 145544 l7 145550 38 145554 39 145556 40 41 145560 42 145564 43 145570 44 145576 45 145600 46 145604 47 H5610 48 145612 49 H5616 50 51 145022 52 145624 SJ 145630 54 145632 55 1456l6 56 145640 57 145644 ;-.EHAl!t LSB 112737 005001 004767 004767 004767 100431 105337 OO!l66 0101l7 112737 000003 007341 GETHAK! !KOIJll CLR 1s: JSR 0067l2 JSR 105026 JSR 006606 BH! Dl:CB 007l41 BNE llOV oomo HOVB 000003 007341 CLR JS: JSR OOW2 JSR 165566 JSR 006546 BH! DECB 007l41 005001 004767 004767 004767 100421 105l37 001366 oom7 165546 004767 006526 100373 ~E 4s: JSR JSR BPl BR ooom 2s: 004767 000204 O!Oll7 007l20 012737 000003 007l41 005001 6t: 004767 000244 5t: ~101l7 007322 005l03. 004767 165610 Oll700 007320 JSR 005002 020062 156142 001011 020162 156144 001414 020127 006200 00100l ClR CHP BNE CHP ... 10t: ltOV HOV CLR JSR HOV DEC JSR HOV BEO CHP BNE 1J,etCOUNT2 Rl PCoASCRAD Pc.GETCH PCoRADCH 21 etCOUllT2 11 Rlo@tTBLTOP tloHCOUHT2 Rl PCoASCRAD PCoGETCH PCoRADCH 61 etCOUHT2 31 PCoGETCH PCoRADCH 41 51 PCoPADRAD R!oHTBLTOP lloHCOUHT2 Rl PC,PADRAD R!oHTBLTOP!2 R3 PCoGETNXT @IUlTDPoRO R2 ROoDSYHSCR21 iconvert ASCII in RO to RADSO in Rl ;get next character iis it a le~al RAD50 character? ino1 end of naae idiscarO all characters after 6 ;i~ character still Part of na1e? ;:ies iPad Rt with spaces istore first word of na1e ;set next 1eaninsful character ;Ro, Rl contain converted na•e ico1Pare na1e to predefined ones m R!oDSYHS!2!R21 ;get value of Predefined s:iabol PDSVAL ;aight this be a bste 1ode 1ne1onic? Rt.150*50102 1a ino A-64 T-11 EYaluation Module Monitor llACRO V05.00 SYnd.l• 13-Kar-B3 04:10 Pa!!e 42-1 Parsins Routines SB 145646 59 145652 60 145654 61 145656 62 145662 63 145664 64 65 145670 66 145674 67 145676 68 145700 69 145702 70 145706 71 145710 005762 156144 001406 022222 020227 000770 103760 000167 003670 020227 000054 103401 002005 006202 016204 007732 006302 000405 TST ern 1a: 21$! CKP CKP BLO JKP PDSVAL: !CHP 13t: BLO BGE ASR KOV ASL DSYKSt21R2l PDSVAL IR2lt.IR2lt RbtTOPNAK IOI GETSYK iand is na1e the saae without triilin! 'B'? i~esr handle b~te 1ode case iadYar1ce to next naae iend of table? inot <;iet ino 1atch to Predefined s~1bols R2,tDSYKUR-DSYKS;now ~t s•1bol's value in R4 m iRO throu!lh • ;B:1 or hi!her i•ake a word inde>; BR 141 R2 IROIR2hR4 R2 151 CHP BHIS KDV R2•tDIRVRB-DSYKS ;sASIC or hi!lher 71 8RKFIL-<DSYKURt4-DSYKS>IR2J,R4 m throy!!h 84 ;Ro thrOtJ!!h , 72 73 145712 020227 000100 74 145716 103004 75 145720 016204 007700 76 145724 000257 77 145726 000207 78 79 145730 020227 000300 80 145734 103003 Bl 145736 000277 B2 145740 000250 83 145742 000207 84 85 145744 006202 B6 145746 016204 155440 Bl 145752 006302 ea 145754 020227 000340 89 145760 103003 90 145762 012702 000064 91 145766 000421 92 93 145770 020121 006200 94 145774 001014 95 145776 020021 075131 96 146002 001411 97 146004 006202 98 146006 006202 99 146010 105762 155744 100 146014 100323 101 146016 006302 102 146020 006302 103 146022 052704 100000 104 146026 162702 000340 105 146032 000257 106 146034 000261 107 146036 000207 108 109 110 146040 012700 000040 111 146044 004167 006346 112 146050 105337 007341 l1J 146054 001371 114 146056 000207 14$: 15t: 7$: iflas a Predefined s~•bol iand return CCC RTS PC CKP ll!HS R2,ICKNEKS-DSYKS iCLC or hisher 171 sec 17t: 1Bt: 20s: 19t: ;fla3 a directiYe or Yerb CLN RTS PC ASR KDV ASL CKP BHIS KDV BR R2 CBASES-<<CKNEKS-DSYKS>l2>1R2J,R4 R2 R2,IKNEKS-DSYKS HiALT or hi!lher 181 IKNCCC-KNEHS,R2 ;index 1neoonic CCC 191 CKP BNE CKP BEQ ASR ASR TSTB BPL ASL ASL BIS SUB CCC SEC RTS ,DSABL Hwte 1ode naae? R!.150.50102 201 ino iSWAB ane1onic? R0,1<23150t27>•SOtOI i~es1 not b~te 1ode 201 R2 R2 ;instruction le!lal in b~te 10< PARAllS-<<KNEKS-DSYKS>l4>1R2l ;no 211 R2 R2 llOOOOO,R4 iadjust opcode to b~te •ode tKNEKS-DSYl'!SrR2 ;ad...iust index to instr1Jction table PADRll KOV JSR PAllRADl om BNE RTS iand rli:!tum i!iet Yalue of •net1onic ;rJa!I an instruction PC m 1040,RO PC,ASCRAD @ICOUlfl2 PADRI PC A-65 iroutine to pad RADSO triPlet with spaces T-11 Evaluation Mo6ule Monitor HACRO V05.00 SUl\da• 13-Har-83 04:10 Parsins Routines 1 2 3 4 5 6 146060 7 146064 a 146070 9 H6072 10 11 146076 12 146100 13 14 15 146104 16 146110 17 146114 18 146116 19 146122 20 146124 21 146132 22 146130 23 146140 24 146146 25 26 146150 27 146154 28 29 30 146156 31 146162 32 146166 33 146170 34 146174 35 36 37 146176 3a 146202 39 146206 40 41 146210 42 146214 43 146220 44 45 146222 46 146230 47 48 146232 49 146240 so 146242 51 146246 52 146250 53 146252 54 146256 55 146262 56 146266 57 Pa~e 43 it+ GETLIT Parses ASCII liter•ls. ;-- Jllf' CltOH2 iset next character' don't fold case iis it <CR>? ioo ;error, no character on line ltOV JllP RO•R4 GETNXT istore value ;get next character, return 004767 165326 120027 000015 001002 000167 175066 GETLIT::JSR CllPB BNE 010004 000167 165322 1s: 110137 004767 005303 105737 100403 042737 120027 001106 113737 000502 SETHOD: HOVB JSR llEC TSTB 007330 BH! BIC 000001 007756 1s: CHPB 000015 BNE KOVB 007330 007331 BR 007330 165312 m101 000002 EABS:: B!SB BR 000753 PC.GETCHC R0.1015 1$ RhHTHPHOD PC,GETNXT R3 etTHl'ltOD 1$ ;fix address when leavins b':tte 1ode lhetlADDR iis 1ode co11and last co11and on line? RO,to!S ECON ino ;1:tes1 set per1anent 1odes flTKPHOD,@IPERKOD ECON tF .ABS.RI SETKOD 012700 000020 105060 007757 077003 005037 007754 000467 ECAH:: HOV 142701 000100 152701 000200 000736 EBYT:: 9!CB BISB BR IF. !HST ,RI IF.BYTH•Rl SET HOO 142701 000200 152701 000100 EINS: ! B!CB BISB BR IF.BYTK,Rl IF.INST,Rl SETKOD 000731 1s: Cl.RB SOB CLR BR 012737 007320 007462 ECLR:: HOV BR 000451 132737 001447 106437 100044 102443 162702 004767 004767 ooom 000002 007327 ED£L:: B!T9 EDEL!: BEQ KTPS 007332 BPL BVS SUB 000006 JSR 003620 JSR 003406 BR t20rRO BRKfll-l!ROI Ro.u @llWATCH ECON tTBl.TOP,@tfBL80Ti1ove s!:!lble table Pointer to el1't!:I Position ECON tF,VALU,@tlASCOK;was last 1 co11arid 1 valued? i1:tes1 not just a na1e EERR !IEXPFLB El:RR EERR 16,R2 PC,TYPSYK PC,DELSYH ECON A-66 ;can't delete ?rerjef ined s!:l1bols ;can't delete a forward reference ;back Uf' to specified entry ;t!t'Pe current value before deletin~ ;delete entry T-11 £valuation "odule Monitor 1111CRO VOS, 00 Sund.,, 13-Har-83 04:10 Pase 43-1 Parsin!I Routines 58 146270 59 146274 60 61 62 146276 63 146301 64 146306 65 66 146312 67 146316 6B 69 70 146320 71 146324 72 146330 142701 000300 000703 EHUH:: 8ICB BR tf,INSTtf ,BYTH,RI SET HOD 010537 007466 110337 007630 000167 174734 EREP:: HOV JHP RS,etREPEAl R3,eJBP CHOH4 142701 000002 000672 ESYM:: BICB BR tF.ABS,RI SETHOD 004767 165102 004767 176172 000115 EEXT!: JSR PC,GETHXT PC,GETEXP llOVB ;enable repeated execution ;act like a new line starts after <ESC> N iexecute rest of line rePeatedl~ f9et character after Z iParse transfer address JSR JKP eR5 016746 040772 £REG:: 042767 000200 040764 004767 003360 012667 040754 000167 175224 £COH: 000167 174600 EERR: HOV BIC JSR HO\I JHP JHP lKPHOD,-ISP> ifor b~te •ode tf.BYJH,JKPHOD ; PC,TYPREG it~P.e contents of resisters arrd watd1Po1nt <SP>+.THPltOD irestore fla!is CltOH5 CHOH2 EttOV:: 106437 007324 100373 010501 013701 007336 142737 000010 007324 005737 007706 100760 020201 103760 105737 007330 100404 042701 000001 052702 000001 013704 007756 1•: 060104 l60104 010400 105737 007330 100401 005304 004767 006044 2f! 004767 006034 HTPS @tl!HFLG ;see if ut'Jderline has been executed ;it hasn't--error-- 1issins ~ara1eter EERR R5,R2 tset final address of SQUrce 1e1or~ block @tSAVEXP,RI ;set startin9 address of source tF .SAVX1@tlINFLGishow that saved eXPression has beer1 used @tflAGSI iare we in PASS! 1ode? ECON jyes' don't execute 1ove R2,Rl ;is final address below startins address? ;~es, show error EERR iare we in byte 1ode? etTHPHOD 11 iws ;else force startin9 address to even boundary ti.RI tl1R2 iand final address to odd boUfldar~ ;!let starting address of destination block @OADDR,R4 R2,R4 icalculate final address fre1 lenSth of source Rl•R4 R4,RO isave result for later iare we in byte 1ode? @t!HPHOD 21 iYes R4 iadjust result for Previous BIC and ~IS ;check that final destination address is le9al PC,ADRCH2 ;get startini destination address and check it PC,ADRCHl inow see if destination addressl>S straddle Protected RAH iis final addr below lower instance of Prat RAH RO.HUR ;yes• destination ranse OK 31 ;is start addr above uPPer instance of Prot RAH R4·120000 31 ;~es' destination ran9e OK idoes destin overlap lower instance of prot RAH R4•tl0000 ;~es1 ranse is un~ePtable 0 iis final addr below UPPer instance of Prat RAH Ro.120000 ;this is a trick test -- we know RO is not ;within the ran•• IURtl0000--17777 lro1 ADRCH2 ;yes• ran!ie doesn't overlaP UPP!r instance 31 llJSERAH,R2 iPoint to user RAM error •essa!e 73 74 146332 75 146336 76 1463H 77 146350 78 146354 79 146360 BO Bl 146364 B1 146370 B3 146372 B4 146m 85 146400 86 146406 87 146412 BB 146414 B9 146416 90 146420 91 146414 92 146426 93 146432 94 146436 95 146441 96 146444 97 146446 98 146450 99 146454 100 146456 101 146460 101 146464 103 104 146470 105 146474 106 146476 107 146501 IOB 146504 109 146510 110 146512 020027 006500 Bf'l HOV HOV BICB TSl SHI CHP BLO rm BHI BIC BIS l!OV ADD SUB HO\I lSTB BHI DEC JSR JSR 103415 CHP Bt.O 010427 020000 103012 020427 010000 103403 020027 020000 BHIS CHP BLO CHP CHP 111 112 113 146516 103404 114 146520 011702 154476 4t: BLO HOV A-67 T-11 Evaluation Module Monitor tw:RO V05,00 Sund•' 13-Har-SJ 04:10 Pa;e 43-2 ParsinS Routines 115 H6524 000167 174462 116 3t: 117 146530 020401 118 146532 101004 6S: 119 146534 112124 120 146536 020102 121 146540 101775 122 146542 000704 123 ss: 124 146544 005202 125 146546 005200 7i: 126 146550 umo 127 146552 020201 128 146554 101375 129 146556 IXl0676 130 EFND:: 131 146560 106437 007324 132 146564 1002r.i 133 146566 010537 007334 134 146572 142737 000010 007324 135 146600 004767 164622 136 146604 004767 175712 137 146610 024646 138 146612 010516 139 146614 005066 000002 140 146620 120027 IXl0!37 141 146624 001010 142 146626 004767 164574 143 146632 004767 175664 144 146636 010566 IXl0002 145 146642 005166 000002 tt:: 146 146646 013704 007336 2t: 147 146652 105737 007330 148 146656 100430 149 146660 042704 000001 ISO 146664 Ol1401 m 146666 011600 152 146670 074001 !SJ 146672 046601 000002 154 146676 001005 st: !SS 146700 004767 006344 156 146704 004767 006204 157 146710 000405 Jt: !SB 146712 OOS204 159 146714 105737 007330 160 146no 100401 161 146722 005204 6t! 162 146724 020437 007334 163 146730 1017SO 164 146732 022626 165 116734 000167 174652 166 167 146740 111401 4t: 168 146742 011600 169 146744 074001 170 146746 0466()1 000002 171 146752 042701 177400 JKP ERROii P~rint error aessase CHP BHI R4•Rl 51 IRllt.IWt R1,R2 61 ECOH ;now see if destination block is above or below ;source -- above 1eans use backward transfer ;else do forward transfer R2 RO -IR21,-(ROI R2•Rl 71 ECOH ;adjust Pointer$ for autodecre1ent llOVB CKP BLOS BR INC IHC KOVB CHP BHI BR KTPS BPL KOV BICB JSR JSR CHP KOV CLR CHPB BNE JSR JSR KOV COi! KOV TSTB BK! BIC KOV KOV XO!I BIC BHE JSR JSR BR INC TSTB BK! IMC CKP !LOS CKP JHf' KOVB HOV XOR B!C B!C @tl!NFLG EERR R5' etADVl\DR ido entire block f Perfor1 backward transfer ido er1tire block ;see if 1Jrtderline has been e~ecuted ;it hasn't--error--aissing Para1eter ;$ave uPPer search ranse li1it tf' .SAVX1@tlINFLG;show that saved e>:Pressior1 has been used ;get character after f' PC,GETNXT PC,GETEXP -<SPl.-(SPI RS,ISPI 21SPI R0,1137 II PC•GETNXT PC,GETEXP R5•21SPl 21SPl HSAVEXP,R4 HTKPKOD 0 t!.R4 @R4,R1 ISP!.RO RO.RI 2!SPl.R1 31 PC,TYPAllR PC, TYPLOl 61 R4 @tTMPHOD 61 R4 RMtADVADR 21 ISPlt. ISf'lt CONTIH ~R4•Rl ISP!.RO RO,Rl 21SPhR1 tl77400,R1 A-68 i!et \lal!Je ta be searched for ;aake space for two scratch location on stack ;save val1Je to be searched for or1 stac~; ;initialize co1P-le1ent of search 1as~. to zero iis next character an underscore? ;no, oPtional task Paraaeter not present ;~et character after underscore iset search 1ask lstore it on stack ;co1Ple1ent aask i!let starting address of search range fare we in bYte 1ode ;~es' Perfor1 bYtewise search ;for word search, 1ake sure address is even ;get a word i~et search value jco1Pare values i1snore bits that are 1asked out ;no 1atch ;t~Pe address of 1atched location it'*'e contents1 but not as an instruction iTYPL01 already incretented R4 ;advance to next location ;are we in b~te 1ode? ;~es, advance b'J one ielse advar1ce a whole word isee it er1tire ran!!e has been checked ;contil)Ue searchin~ idiscard stacked val1Jes ;rt't'over character in R01 farse riext r-oaaand ;.set a b~te i!!et search value i co1Pare values iignore bits that are aasked out iisnore discrePancies in high b~te T-11 fv•lu•tilXl Hodule Konitor HACRO V05,00 Sunda• 13-Har-83 04:10 Pa!le 43-l Patsin~ Routines 172 H6756 000747 173 174 175 H6760 004767 176 146764 013704 177 146770 012702 178 146n4 032704 179 147000 004767 180 147004 032704 181 147010 004767 182 147014 ll3704 183 147020 012702 18-4 147024 132704 185 147030 001402 186 IU032 004767 187 147036 188 147036 012702 189 147041 132704 190 147046 001002 191 147050 012701 191 147054 004767 193 147060 012701 194 147064 131704 195 147070 001401 196 won 004767 197 147076 012701 198 147101 131704 199 147106 001001 100 147110 004767 101 147114 012701 102 147110 031767 203 147116 004767 104 147131 000167 205 206 147136 106746 207 147140 106416 208 147142 001001 109 147144 011222 110 147146 004767 211 147152 011700 211 147156 004767 113 147162 106426 214 147164 001401 215 147166 022222 116 147170 000207 BR 164540 007706 156256 100000 000132 004000 000122 007330 156366 000100 EKOD:: JSR 11{)\1 HOV BIT JSR BIT JSR HOVB KOV me BEG JSR 000100 51 PCoCRLF PtFLAGSloR4 tDIRVB1,R2 tF oPASloR4 PColl tf,HOSToR4 Pt.II itTHPHOD.R4 tDIRVB!,R2 tF, INST .R4 41 PC,U ;start a new line ;get a coPs of sote 1ode flags ;Point to PASS1 co•1and tDlRllBAoR2 tf,ABSoR4 61 IDlRllBSoR2 PColl ID!RVBH.R2 lf,BYTKoR4 f Point to ABSOLU c-0.. and ~•: 156346 000002 156411 000056 156362 000200 164676 156376 000300 6t: 7f: sm 000021 156m 20s: 004000 040203 000004 177216 1s: 164621 004440 164346 HOV BIT8 BHE MV JSR KOV BITB Bl:U JSR KOV BNE JSR HOV Bl1 JSR JHP 2s: Hf PS HTPS BNE CKP JSR 3S! JSR HTPS BED CHP RTS HOV ,. isee if we 1 re in PASS1 or PASS2 iPrint PtOPer 1ode and Point to NOPROT ;see if HOST or NOHOST is actiYe ;print proPer •ode ;get a coPY of the rest of the 1ode flass iPoint to INSTRU coa11and isee if instruction 1ode is active ;branch if not iPrint proPer 1ode ;see if absol1Jte or ss1bolic llOde is active ; absolute 1ode ;point to s~1bolic 1ode iPrint ?tOPer 1ode ;poirit to BYTE co11and ;see if b~te 1ode is active ;it isn'tt Print rrothins PCoPRINT2 felse print BYT[ co11and iPoint to word 1ode tDIRVBIH,R2 ; it not b~te or instrurtior1 then word If ,!NST'f,8YTK,R4 101 Pc.ti tDIRVBTtl4oR2 ;point to vtlOde tf,VToPERKOD ;see if set iSo show wich vt 1ode PColl ECON ;and return -<SPI isave Z flas !get back a cap~ <SPI ;Print coaaand Pointed to b~ R2 11 ;else advance to next CO[llt.and CR1llo IR21+ ;Print co11and1 advance R2 PCoPRlHT2 t4001011t040oRO i<S>aoe) <tab> PC,CHROUT CSPlt ; recover Z fl as ;if we advanced before' don't do it asain 31 ;~iP over next co11arid CR2ll.CR11+ PC A-69 T-11 €valuation "odule Monitor KM:RO U05.00 Sun<li• 13-Mar-83 04:10 Pa!le 44 Parsins Routines 1 2 3 .SBTTL Directive and Verb Handlin~ Routines 4 147tn 1cl2702 000100 5 147176 6 147200 7 147204 8 147206 9 147210 10 147214 11 12 13 147220 14 147220 15 147222 16 147214 17 147226 18 14n30 19 147232 20 W234 21 147236 22 147m 23 147242 24 147244 25 147246 26 147250 27 147252 28 147254 29 147256 30 147260 31 147262 32 147264 33 !4726cl 34 147270 35 147272 3cl 147274 37 147276 38 147300 39 147302 40 147304 41 147306 42 147310 43 147312 44 147314 45 147316 46 47 147320 48 147324 49 147330 50 147336 51 147342 52 147346 53 147350 S4 1473S4 55 WJS6 56 147362 57 147366 006202 020227 000042 103403 005303 013701 007330 000172 147220 00\ltRB:lSUB ASR CMP 11!.0 DEC 1s: ltll\I JMP tDIRVRB-DSYKStR2;rf'IOve offset froa index to verb la~.e it a word index R2 ;is this verb an <ESt> sea. reF-laceaent R2,tVRBDS1-VRBDSP ino a ;1ak,e it so thclt we can use Previous routines R3 ;fro1 the escape seGuence handler HTMPftOD,Rl JdisPatch to Proper handlil'l!I routine @VRBDSPIR2> IJRBDSP:: .WORD .WORD ,WORD .WORD .WORD .llORD .WORD ,WORD .WORD .llORD .WORD .WORD ,llQRD ,llQRD ,llQRD .llORD .WORD VRBDSI: ,WORD .WORD .WORD ,lltJRD 147320 147432 147416 150202 150212 150222 150306 15Q504 150442 143164 143216 147770 1moo !474cl6 147'560 147634 147cl54 146150 146156 136752 146176 146210 146222 .WORD ,llflRD .llORD .WORD 147444 146270 150012 146312 146760 H6332 152040 .WORD .UDRD .WORD .WORD .WORD .UO!W .WDRD 147374 147406 012702 004767 112737 004767 020227 103010 105337 001763 012700 004767 000763 HELP:: MOV 156242 2s: 164174 JSR 000010 007341 KO\IB 1s: JSR 164432 156442 CMP BHJS DECS 007341 BEO 004440 164142 HOV JSR BR HRP Gl) STEP PASSI PASS2 HOST NOHOST TltlK LOA!r CMON2 CMON3 $.EVEN 1.ASCI I.BYTE 1.llORD 1.BLKB l.BLKW EABS ECAN IHALT EBYT EINS ECLR DELETE EN\JM IRPEAT ESYH EMOD EREG TYPTBL VTON VTOFF ; .START ;.END ;ABSOLU Point to the start of escape ;CANCEL ;EXIT mm ;JNSTRU ;CLEAAI ;DELETE ;WORD ;REPEAT ;SYMBOL ;SHOWHO ; S!iQljRE ;SllQUSY ;vTON ;VTOFF ;t!n"e the verb/dirPctive table on the console IDIRVRB•R2 ;start a new line PC,CRLF ;Put 8 co11ands on a line 18 .. etCOUNT2 ; Pr int a coa1and PC,PRINT2 ;have we done the whole table? RMCHNEllS ;~s 31 etCOIJHT2 Jhave we finished a line? ;~es 21 1400t011!040•RO ;t•P• <sPace> <tab> PC,CNROUT 11 A-70 T-11 Evaluation ttodule Monitor HACRO V05,00 Sunda" 13-Har-83 04:10 Pase 4H Directive and Verb Haridlins Routines SS 59 147370 60 61 147374 62 147402 63 64 147406 6S 1474H 66 67 147416 68 147424 69 147432 70 147440 COHTIH irecover character in RO, continue ParsinS line OS2767 004000 037726 VTOH: BIS 000167 174176 VTJHP: J/IP 1r.vr.1MPHOD CHOHS ;turn vt aode on 042767 004000 037714 VTOFF: BIC BR 000772 tr. VT, TllPHDD VTJMP tturn vt off 052737 000200 007706 STEP:: 152737 000001 007324 023727 007746 006500 GO:: 000167 1722S6 tr, SST, HrLA6Sl ishow we are sinSle stePPing tr.ss11.@tl!HFLG HISP,tlUR iis user SP in his RAH? IGO! i1Jse ke':IPad 1onito:- GO routine 000167 174216 3t: JllP BIS i!SB CHP JHP 71 72 73 147444 005203 74 147446 004767 175040 7S 147452 005303 76 147454 132737 000002 007326 77 147462 000167 176552 78 79 BO 147466 013737 007756 007334 s1 mm 004767 175022 82 wsoo 113746 007330 83 147S04 052737 000200 007330 84 147S12 013704 007334 85 147516 004767 005006 86 147522 112637 007330 87 147S26 110S14 BB 147530 005237 007334 89 147534 120027 000054 90 147S40 001003 91 147541 004767 163660 92 147S46 000752 93 94 147550 013737 007334 007756 95 147S56 OOOS71 96 97 98 147560 013737 007756 007334 99 147S66 004767 174730 100 147572 013704 007334 101 147S76 004767 004726 102 147602 010524 103 147604 010437 007334 104 147610 120027 OOOOS4 !OS 147614 001003 106 147616 004767 163604 107 147622 000761 108 109 147624 013737 007334 0077S6 110 147632 OOOS43 111 112 113 147634 004767 174662 114 147640 106437 007326 DELETE:: INC JSR DEC BITB JltP ;counteract earlier DEC RJ in this c3se R3 PC,GENEXP ;set s1:11bol nate to tie deleted ;now PrePare to use <ESC> seauence routine R3 tf,VALU,@tCURCOHirePlaces test on LASCOH in EDEL iSo to routine to delete a S':ltbol EDEL! t.BYTE: :11ov 1t: JSR HOVB BIS HOV JSR HOVB HOVB IHC CllPB BHE JSR BR @ttADDR,etADVADRiset a scratch coP':I of current address PC,GETEXP ;set a value to be deposited !ITllPHOD,-!SPI ifool ADRCHK into thinl',.ins we are in b':lte 1ode tr.BYTM,!ITHPHOD iSet runnins copy of current address @IADVADR,R4 ;check that it's not in protecle•j RAH PC,ADRCH2 !SPJ+,etTHPllOD irestore PrOPer 1ode bits RS,@R4 idePosit a b<;;le @IADVADR iadvance runnins address ;is next. ('hara('ter a ('011ria? R0,1054 2$ ino PC,GETHXT ;get ('haracter after COiia ;dl'f'osit another b~te 11 2s: ltADVADR1ltSAODR;uPdate current address VCOH HOV BR t.WORD: :11ov 1s: JSR HOV JSR HOV HOV CllPB BHE JSR BR 2t: HOV BR t.BLKB: lJSR HTPS ettADDR1itADVADRiset a scratch coP':I of current address PC,GETEXP ifet a value to be dePo5ited iset runnins address etADVADR•R4 icheck. that it's not in Protected RA/1 PC,ADRCH2 R5,(R4H idePosit a word iadvaoce runnins coP':I of c1Jrrent address R4,@IADVADR RO,tOS4 ;is next character a co1~a? 2$ ino PC,GETNXT ;set character after cot11a 1f idePosit another word @tADVADR,@ttADDF:i1JPdate current address VCOH PC,GETEXP @ICURCOH A-71 iset arsu1ent icheck if it contained undefined s~1bols T-11 Evaluation Hodule Monitor HACRO V05.00 Sund•• 13-Har-83 04:10 Pase 44-2 Directive and Verb Handling Routines BHE ADD BR VERR1 R51mADDR VCON ;it did, refuse .8LKB directive ;add it to current aOdress t.BLKW: :JSR PC1GETEXP HCURCOH VERRl R51R4 R4 R41HfADDR VCOll ;get ar~U1ent ;check if it contained undefined sYabols ;it dich refuse .Bl.KW d.irect-ive ;•ake a scratch COP~ idouble it ;add it to current address RO•HDELIH ;save deliaiter 115 147644 001146 116 147646 060537 007756 117 147652 000533 118 119 120 147654 121 147660 122 147664 123 147666 124 147670 125 147672 126 147676 127 128 129 147700 130 147704 131 147712 !32 147716 133 mm 134 147724 135 147730 136 147736 137 147742 138 147746 139 147752 1'40 147754 141 147760 004767 174642 106437 007326 001136 010504 006304 060437 007756 000521 110037 013737 004767 120037 001417 113746 0527J7 ms BHE HOV ASL ADD BR t.ASCI!!MOVB 007345 007756 007334 ltOV lt: JSR 163474 007345 CHPB BEO HOVB BIS HOV JSR HOVB HOVB INC BR 007330 000200 007330 007334 004562 007330 013704 004767 112637 110014 005237 007334 000754 @ttADDRr9tADVADR;~et a scratch COP~ of current address iset ne~t characterr don't fold to UPPer case PC16ETCHC ;have we reached deli1iter Yet? R01HDELIH iYesr done 21 @tTHPHOD,-<SPI ifool ADRCHK into thinkins we are in bYte 1ode tF,BYTH1!tTHPHOD i!iet running copy of current address ~IADVADlhR4 ichec+. that it's not in Protected RAK PC1ADRCH2 <SPl+.@ITHPHOO ;restore Proper aode bits R01@R4 ;deposit a bste iadvance running address HAllVADR II 142 143 147762 013737 007334 007756 2s: KOV 144 147770 0-04767 163432 JSR 145 147774 000462 BR 146 147 148 147776 005237 007756 I.EVEN: :INC BIC 149 150002 042737 000001 007756 BR 150 150010 000454 151 152 IRPEAT: :INC 153 150012 005203 JSR m 150014 0-04767 174502 KTPS 155 150020 106437 007326 BHE 156 150-024 001056 TST 157 150026 005705 BEQ 158 150030 001450 159 15()()32 120027 000054 CHPB BHE 160 150036 001043 161 150040 00-0167 176232 JHP 162 163 .ENABL 164 HOVE" INC 165 150044 005203 166 150046 004767 000006 JSR DEC 167 150052 005303 JHP 168 150054 000167 176304 169 11: JSR 170 150060 004767 174436 CHPB 17! 150-064 120027 000137 .. ~tADVAOR.@tlADDR;uJ>da\e current address PC•GE!NXT VCON ;set character after deliaiter HIADDR tt.@tlADDR VCON R3 PCoGETEXP @tCURCOH VEftRI RS RERR R01t054 VERR EREP Jcounteract earlier DEC R3 in this case ;get repeat count ;check if it contained undefined ssabols iit did, refuse REPEAT co••and isee if a repeat of zero was !liven ; refuse zero ;chec~ that a c0tiaa follows ino coaaa1 error, •issins Para1eter ;so to repeat coa1and line routine LSB R3 PC.II R3 EHOV i~et PC,GETEXP R01tl37 i!iet first address ;is it followed~ an underline? icounteract earlier DEC R3 in this case address Pair iPrePare to use <ESC> seouence rountine iso to routine to aove a 1eaorY block A-72 T-11 Evaluation Hodule Monitor Kl\CRO V05, 00 Sunday 13-Har-83 04:10 p,;. 44-3 DirectiYe and Verb Handlins Routines in 150070 001026 173 150072 174 150076 175 150104 176 150110 010537 152737 004767 000167 BNE "ov 007336 000010 007324 163316 174406 B!SB JSR Jiff' ino, 1issing Para1eter ;save the first address tF.SAVX,@tLINFLGishow we have saved so1ethinS: in SAVEXf' PC,GETNXT ;.!let character after underline ;Set second address GETEXP VERR R5,etSAVEXP 177 178 179 150114 180 150116 181 150122 182 150126 183 150130 184 185 186 187 150134 188 189 150142 190 191 150146 192 193 150152 194 15015.\ 195 196 150162 197 150166 198 199 150112 200 150200 201 202 150202 203 150210 204 205 150212 206 150220 207 208 209 150222 210 ·150230 211 150232 212 150236 213 150242 214 150246 215 150254 216 150260 217 150266 218 150274 219 150302 220 221 222 150306 223 150312 224 150314 225 150320 226 150326 227 150334 228 150342 005203 004767 177736 120027 000054 001007 000167 176424 FIND:: INC JSR CN'B BNE JHf' .DSABl 052737 040000 007706 HOPROT::BIS R3 PCrlt R0.1054 VERR EFN!• icounteract earlier DEC R3 ir1 this case ;get address Pair iis it followed b~ a co11a! ;no, 1issin~ para1ter ;so to routine to find a value <search ae1or~) LSB tF, PRDT 1@tFLAGSU turn off 1oni tor scratch f'rotectior1 ;fall into VCON 000161 173450 VCON! JHP CHOH6 icor1tinue Parsin5 000167 173012 VERR: JHP CllON2 ;general error 012701 151412 000167 173030 RERR: MDV IREPDfO,R2 ERROR ;f"!Peat of zero error Jiff' 012701 151372 000167 113020 VERR!l HOV Jiii' llJlfDEfX,R2 ERROR ;undefined expression error 042737 040000 007706 PROTEC: iBIC BR 000760 tF.PROT1@tFLAGSliturn on .onitor scratch Protection 052737 100000 007706 PASSI!! BIS 000754 BR lf,PASl,@tFLAGSl;show we are in PASS! oode VCON 042737 !00000 007706 PASS2:: BlC 000750 BR tF .PAS! .etFLASSHshow wo are in PASS2 1ode VCON VCOH 032737 001346 105037 105037 004767 052737 105737 012737 112737 112737 000167 004000 007706 HOST:: BIT BNE 007672 CLR9 007673 CLRB 164656 JSR 004000 007706 BIS TSTB !77550 134540 000120 HOV 000046 007711 HOVB HOVB 000046 177452 173304 JHP tF.HOST1@tFLAGSliare we already in host aode? 105737 100715 105037 112737 112737 042737 000677 NONOST: :TSTB BH! CLRB 007673 000042 007711 llOVB 000042 177452 HOVB 004000 007706 BIC iare we in host load 1ode~ ;!:l.es1 refuse NOHOST coatand ;clear host flags etHSTFLG 1042,@tAUXFLG ;save a COP~ of new AfCREG value 1042,PIAICREG ;disable aux rort receiver interriJPt tf,HOST,@tFLAGSlishow we are riot in host 11ode 007673 BR error VERR i~es1 !IHFP ;initialize host inPut buffer ian.d host fla9s i1atch aux POrt baud rate to console Port HHSTFLG PC,SETAX2 tf,HOST,!IFLAGS!;se\ ho<\ oode idiscard an~ jarbase in the Port HAfRBUF tHOSTIN1@tAUXIM ;hook UP host inPut service routine isave a new- coPY of AS.CREG valiJe ;enable aux Port receiver interr1Jpt irecover character in RO t046,HAUXFLG t046,@tAICREG CONT!N PIHSTFLG UERR UCON A-73 T-11 Evaluation Module Konitor "ACRO V05. 00 Sunda• 13-"•r-83 04:10 Pose 44-4 Directive and Verb Handlin! Routines 229 230 231 150344 150347 232 150352 233 150354 150357 150362 150365 150370 150373 150376 150401 150404 150407 150112 150415 150420 150423 150420 15~31 150434 150437 234 150441 235 236 237 150442 238 150442 239 150450 240 150452 241 150456 242 150460 243 150466 244 150470 056 101 015 !OS 105 124 040 050 123 105 040 oso 116 102 101 054 101 123 104 101 077 000 123 122 012 040 130 OSI 122 122 125 051 102 123 104 122 113 040 040 ;strin!I to 1atch for enablins of load 1ode 124 S.STRT: .ASCII /,START/ 124 OPTION: .BYTE 015·012 ;<CR>. <LF> .ASCIZ IE IEX!TI, R <RESlRIEl• B !SEND BREAK), "A !SEND "Al ?/ oso 111 054 040 105 115 054 040 105 040 IOS 116 136 040 040 051 000 105 OSI 136 oso ,BYTE ;because the linker won't zero fill 0 .ENABL LSB BLOAD! ! 032737 004000 007706 LOAD:: BIT BEG 001410 105737 007673 100405 152737 000100 007673 005002 000417 1S1B Biii me tF,HOST,@tFLAGStfis host 1ode enabled? ino, refuse LOAD coa1and LERR ;are we in host load 1ode? PtHSlFLG ;~es, refuse LOAD co1111and LEllR tF.LDST,@tHSTFL6;show we want to start loadinS uPon .START ;initialize index to 1atch .START strins R2 CLR BR TALK! BIT tf.T8AS,@tFLAGSliare we runnin~ Tin~ Basic? RTS VERR PC m 246 150472 247 150500 248 150502 249 250 1505~ 251 150512 252 150514 253 150520 254 150522 255 256 150530 257 150534 258 150540 259 150544 260 150550 261 262 150556 263 150562 264 150566 265 150570 266 150574 267 150576 032737 020000 007706 LERRl 001622 12s: 000207 BED 032737 004000 007706 TALK!! BIT BEO 001615 lSTB 105737 007673 8111 100612 BICB 142737 000100 007673 106427 005737 105737 004767 112737 TALK!: "1PS 000300 TST 177562 TSTB 177550 JSR 162754 KOVB 000011 177444 004767 000364 105737 177560 100017 113701 177552 000240 006201 ht: 1S: JSR TSTB BPL MOVB HOP ASR ;no ;~es, return to BASIC tF.ffOST,PtflAGSl;is host 1ode enabled? ;nor refuse LOAD COlfland VERR ;are we in host load 1ode? etHSTFLG i~es, refuse TM.K co11and VEl!R tf.LDSl,PlllSTFLG;show we want to i!!nore .START t300 mmuF HAlRBUF PCrCRlF 1011 rHttPORC ;disable interrUPts except console brea~ ;clear an~ sarbase in the Ports PC,CLRAPE HCIRCSR ;clear aux Port error ;user t!We a character? 21 ino @IAISREG,RI ;start a new line iturn on LED durin! virtual ter1inal operation ichec~ host Port status ;iii Place holder for the abov~ line ttt RI A-74 T-11 Evaluation Kodule Konitor HACRO VOS,00 Sunda. 13-Har·83 04:10 Pne 44-5 Directive and Verb Handlin~ Routines 2<18 150<100 103012 269 150602 013700 177562 270 150606 100407 271 150610 042700 177600 272 150614 120027 00000! 273 150<120 001450 m 150022 110037 177450 275 27<1 150626 113701 177552 277 150<132 132701 000002 278 150636 001751 279 150640 113700 177550 280 150641 042700 177400 281 150650 132701 000170 282 150654 001340 283 150656 132737 000100 007673 284 150664 001420 285 150666 010001 286 150670 005702 281 150672 001402 288 150674 042701 000040 289 150700 120162 150344 290 150704 001007 291 150706 005202 292 150710 020227 000006 293 150714 103404 294 150716 110037 177566 295 150722 000470 296 297 150724 005002 298 150726 105737 !77564 299 150732 100313 300 150734 110037 177566 301 150740 000710 302 303 150742 012701 150352 304 150746 004767 163002 305 150752 105737 177560 306 150756 !00375 307 150760 013700 177562 308 150764 100772 309 150766 042700 177600 310 150772 110037 177566 311 150776 120027 000001 312 151002 001707 313 151004 042700 000040 314 lSIO!O 120027 000102 315 151014 001012 316 1510!6 012701 100000 317 151022 112737 000057 177452 318 151030 077101 319 151031 '112737 000047 177452 320 151040 000650 321 322 1510-42 120027 000105 323 151046 001245 324 151050 112737 000010 177444 9$! 2s: 21 etCIRBLJF,RO 21 t17760o,RO RO•tl 31 RO ,@tAIXBUF HOVB BITB BEQ HOVB B!C B!TB BME @tAISREl;.Rl icheck host Port status t002,RI ido we have a character? 11 irro ;get character fro1 host l'tt\IRBUF ,RO PPrevent sisn extend t177400•RO ;is it break or an error? 1170oR1 61 ;~es, isnore character tf,LOST,HHSTFLG1>re we lookiM for .START? 51 ;no ;1ake a scratch COPY of character RO.RI idon't fold the Period R2 141 ifold lower case to UPPer case t040•RI Rlol.STRHR21 idoes character 1atch? ;no, so back to the'•' in ,START and tr~ a9ain 41 R2 R21t6 ;have we aatched entire strins? ;nor continue with next character 51 ROol!tCIXBUF ;send the character without dela!:I! 71 ;a aatch1 start loading ms BEG HOV TST BEQ 14$! ~-: 5t: 3$! Bl: 111: 10•: ;crs not asserted or transaitter not eAPt~ BCC llOV BH! BIC CltPB BEQ HOVB BIC CHPB BNE INC CHP BLO HOVB BR ClR TSTB BPL HOVB BR R2 PICIXCSR II Ro.PICIXBUF HOV JSR TSTB BPL HOV BHI BIC HOVB CHPB BEQ BIC CtfB BNE ltO'I HOVB SOB HOVB BR IOPTION,RI PCoPR!NTA PICIRCSR 81 @tCIRBUf,RO Bl 1177600,RO R01@tCIXBUF R01tl 91 t040,RO ROol102 101 tlOOOOO,R! t057o@tAICREG CHPB BNE HOVB a iSet character fro. console iignore error characters i1ake srJre no Parity bit set iis it ~A ? i~es' exit talk .ode ino, outPut character to host ;is console Port read!:! for a character ino' drop character ;!:leSr echo character to console PPoint to aess~e iPrint ASCII string on console ;wait for a character ;set character trot cor1sole ;cnar.x;ter caused an error1 try asain ;1ake sure no Parit!:I bit set ;echo character ta console ;is it "A'? ;~esr send it to host ifold lower case to UPPer iis it B? ino Rlr. isend break iwait a while 1047,HAICREu II ; resu1e two-way coaa•.mication R01t105 II tOl01i1Plf'URt ;rro, resu1e cot11J0icatiori ;turn off L£D indicator A-75 ris it E7 T-11 Evaluation "odule Konitor "ACRO VOS.00 Sunday 13-"ar-83 04:10 and Verb Handling Routines p.,. 44-6 ~irective 325 151056 112737 000046 326 151064 106427 000000 327 151070 032737 020000 328 151076 001201 329 151100 000167 172112 330 331 151104 152737 000200 332 151112 112737 000010 333 151120 112737 000046 334 151126 106427 000000 335 151132 032737 020000 336 151140 001356 337 151142 000167 172056 338 33? 151141> 112737 000067 340 151154 112737 000047 341 151162 000207 342 "ll'HTPS IJI 177452 007706 13t! 007673 7t: 177444 177452 007706 BIT BNE JHP t046•HAICREG Pdisable aux Port trans1itter interruPt ;reenable interrupts tooo tF.TBAS,@tFLAGSl;are we running Tin~ Basic? hies, return to BASIC 121 ;return to console 1onitor CHON3 BISB "OVB ltOVB "TPS BIT BNE JltP tF.LOAD.ttHSTFLG;set host load oode IOlO,ftPIPORC ;turn off LfD indicator t046,P!AICREG ;disable aux port transaitter interruPt ;reenable interrupts A.S,A.P. IOOO tF.TBAS1ftFLAGS1;are we running Tin~ Basic? ;1:1esr return to BASIC 131 ;return to console aonitor ~ON31 177452 CL RAPE: ltOVB ltOVB 177452 t06MtAICREG t047, ttAICREG RTS PC .DSABL LSB A-76 ;clear aux Port error flags iasser DTR• RTS, enable aux Port x1it and recv T-11 Evaluation "odule 11onitor HACRO ~s.oo Sunda• 1J-Nar-8J 04:10 Directive and Uerb Handling Routines 1 2 .SBTTL J 4 .ENABL 5 151164 !J27J7 000002 007J27 DOS'OO:: :BITB BED 6 1s11n 00142J 7 151174 0102J7 007J34 NOV JSR a 1s1200 004767 162222 9 1S1204 106437 007332 NTPS BNI 10 151210 100434 BCS II 1S1212 103413 12 15l2H oom7 17JJ02 JSR 13 lSl220 106437 007326 NTPS 14 151224 001010 BN£ IS 151226 01J702 007334 llOV 16 151232 020227 000054 CNP 17 1S12J6 10J407 BlO 18 1S1240 101012 BHI 19 151242 000167 171716 lt: JltP 20 13t: NOV 21 151216 012702 151372 JNP 22 1S1252 000167 171734 2J 24 25 1512S6 006202 4S: ASR 26 1S1260 010S62 007732 llOV 27 151264 000404 BR 28 29 30 1S1266 042705 000001 st: BIC 31 1512n 010562 007700 llOV 32 151276 000167 172314 ot: JNP 33 34 1S1302 102021 1t: BVC NOV 3S 1S1304 013746 007320 NOV 36 1S1310 013746 007J22 37 1S1314 004767 173202 JSR NTPS J8 151320 1064J7 007326 8HE 39 1S1324 001006 40 151326 010504 NOV 41 15!330 012637 007322 llOV 42 1S!334 012637 007320 NOV 43 1S1340 000446 BR 44 CNP 45 1513~2 022626 12s: 46 151344 0007S4 BR 47 48 151346 010446 2t: NOV JSR 49 1S13SO 004767 173146 NTPS so 1513S4 106437 007326 BNE Sl 151360 001332 KOV 52 151362 010504 10s: CNP 53 1S1364 022604 BNE 54 1S1366 001325 BR S5 151370 000742 56 S7 151372 102564 020071 OS4114 UNDEFX: .RADSO Pa~e 4S S!labol and Label Handli~ Routines LSB tF.VALU1etLASCO"icheck that last co11and was not valued iwas evaluated, error JI R2,@IA!l<MDR istore index here PC,GETNXT iiet next 1eaninstul character after = isee what ~ind of s~abol we are definins HEXPFLG iuser defined na1e II iwas a 10Nonic1 directive, or verb--error 31 i~t value to be eauated PC.SETEXP icheck if it contained undefined s~1bols HCURCON ;it did1 refuse s~1bol definition 131 ~IAD'IADR,R2 i!let back index R2•1DSYltUR-DSYNS;what is nate? ;Ro thrO\Bh , 41 SI '81 \hro~h B4 ielse show err·or CNON2 1 1 IUHDEfX,R2 ERROR ilB"ldefined expression error R2 RS,IROIR2l 61 iaake a word index iset aPPrOfrriate re~ister, watch~ointr or ',' ;breakPoints have even addresses II.RS RS,BRKFIL-<DSYltURt4-DSYNS>IR21 iset approprite DreakPoint CNOH6 21 is!labol alrea~ defined mBl!OP,-ISPl isave naae of s~abol we are definins ~ITBLTOPt2,-ISPl iset value to be set icheck if it contained undefined SY•bols ;it did, iSnore s~tbol definition ;set value to be set ISPlt.~T8LTOPt2;recover naae ISP l t. H TBLTOP 91 PC•GETEXP HCURCON 121 RS,R4 ISPlt.!SPl! 61 iF-OP saved na.e iauietl!J is:nore s~abol definition R4.-!SPl PC,GETEXP @ICIJRCON ;save Present value of SY1bol iSet value to be set ;check if it cootained undefined s~1bols iit didt refuse s~•bol definition ;put value in R4 ;see if s~•bol or label is beins chansed jit is1 which is not Per1itted ;no chanse, so auietlY i~ore coa~and 131 RS,R4 !SPlt.R4 JI 61 /UHll£FIN£D EXPRESSION/ A-77 1-11 Evaluation Hodule llonitor HACRO VOS,00 Sund•• 13-Har-83 04:10 PMe 45-1 and Label Handlin~ Routines S~1bol 151400 000340 0633:".i 074701 151406 057760 SB 151410 000000 59 151412 070530 017574 001136 1S1m 0020:".i 071330 60 151424 000000 61 62 151426 132737 000002 007327 63 1S1m 001702 64 151436 004767 161764 65 151442 106437 007332 66 151446 100275 67 151450 102037 68 151452 013704 001756 69 70 151456 013702 007462 71 151462 162702 000006 72 151466 020227 006500 73 IS!472 10101! 74 151474 012702 151504 75 151500 000167 171506 76 151504 076452 D45710 024324 151512 045400 77 151514 000000 78 79 151516 106427 000340 80 151522 010237 007462 Bl 151526 013722 007320 82 151532 013722 007322 83 151536 010422 84 151540 106427 000000 85 151544 000167 172042 86 87 1515SO 010446 88 151552 0!3704 007756 89 151556 000702 90 .wo1w 0 REPOFO: .RADSQ /REPEAT or ZERO/ ,WORD DOLABL::BITF BEO JSR HIPS BPL BVC HOV HOV SUB CMP 8Hl HOV JMP TBLFUL: .RADSO 9t: 11s: lf,VALU,PILASCOH 31 PC,GETNXT ;see what kirid of label we are Qefir11n9 PIEXPFLG ;predefined s':lllbols cBn't be 1abels 31 iuser na1e al read'J defuie·~ 81 ;get value to be set HSADDR•R4 HTBlBOJ,R2 ;set botto• of s~1bol table l/,.R2 ;~o down one entr~ R2rttUR ;is there sPace for new entr~? t!$ ;~s ITBlFUL,R2 ERROR /TABlE FULL/ ;Point to 1essase ;print error iessase .I/ORD 0 MTPS HOV HOV HOV MIPS i1ake s~.tiol table alterations atotic 1340 R2,etlBLBOT ib~ blockin~ cOflsole break' etc, elTBLTOP.!R2lt tstore first word of nate @ITBLTOP+2,IR21t;and second word ;store sy1bol's value R4dR2lt irestore interruPt service tOOO JHP COHTIN ltOV as: 0 R4.-<SPl @llAD!ll!.R4 101 BR .DSABl LSB 111JV HOV A-78 ; recover character in R01 get ne):t co1111ar1d ;save Present value of label iget current addressi which is value to be set T-11 Evaluation Module Monitor MACRO V05.00 Sund•• 13-Mar-83 04!10 Pase 46 SY•bol and label Handlin!! Routines ;++ 2 3 4 5 151560 013702 007462 6 151564 020227 007320 7 151570 103403 8 151572 005004 9 151574 000277 10 151576 000207 GETSYK 1atches a new na1e to the sy1bol table. ;-- CLR @ITBLBOT, R2 R2,ITBLTOP 11 R4 RTS PC GETSYM::MOV 2s: CltP BLO sec ;start searchins at bottD11 of table ianY 1ore entries? ;yes ;flas naae not found 11 1s: IR2l+.!ITBlTOP idoes first word of na1e 1atch? CltP 12 151600 022237 007320 BNE 31 inc 13 151604 001007 IR2>+retTBLTOP+2isecond word 1atch? 14 151606 022237 007322 CltP ;no BNE u 15 151612 001005 iset value 16 151614 012204 l10V IR2l+.R4 ishow this is a user defined S':ilbol SEN 17 151616 000270 iand that is has a value 18 151620 000242 CLV RTS PC 19 151622 000207 20 3S: TST <R2>+ 21 151621 005722 fadvance to next entry 4S: TST IR2lt 22 151626 005722 BR 21 23 151630 000755 24 Ht 25 KATSYK 1atches the nutber in Rl to sYabol vallJfsr startin9 with the aost 26 recently defined. Returns a Pointer in R2 if 1atched. Returns Nset if 27 no 1atch1 2B j-29 30 IF.ABS,@ITltPltOD iabsolute oode? 31 151632 132737 000002 007330 llATSYM! :am 1$ h1esr indicate no 1atch BNE 32 151640 001013 iset botto• of table 33 151642 013702 007462 MO'J !ITBLBOT •R2 iany 1ore entties? 2s: CltP R2•1TBLTOP 34 151646 020227 007320 BHJS 11 ino 35 151652 103006 ;do we have a 1atch1 4<R2l>Rl 36 151654 026201 000004 CHP ;!:les 3$ BED 37 151660 001404 ;go to next na1e 16,R2 4S! ADD 38 151662 062702 000006 2$ BR 39 151666 000767 40 lS! SEN 41 151670 000270 31! RTS PC 42 151672 000207 43 A-79 T-11 Ev•luation ltodulo lloo1tor KACRO l/05,00 SundaY 13-Har-83 01:10 Pa9e 47 S~ol and Label Handlin!! Routines ;tt I 2 3 4 5 151674 6 151702 7 151706 8 151710 DELSYK deletes the s~lbol table enlr~ just below R2. ;-- 062737 000006 007462 DELSYH:lADD 2tt CHP 020237 007162 101001 Bill RTS 000207 t6,@tTBLB01 R2•HT8LBOT 1• PC 016242 177770 016242 177770 016242 177770 -!OIR2h-IR2l -!OIR2l,-IR2l -101R2l ,-(R2) 2• 9 10 151712 11 151716 12 151722 13 151726 lt: 000765 HOV MV HOV BR ;done ~et? iho1 1ove UP all lower entries i1ove three words for each entrY 14 15 16 itt TYPREG tiJPl!S the contents of registers RO thro.u!:lh PS and the watehPoint address and contents it the address is not zero. 17 18 19 20 151730 112737 000011 007340 21 151736 012737 1561!2 007334 22 151m 004767 161554 23 151750 013702 007JJ4 24 151754 004767 162014 25 151760 010237 007334 26 151764 162702 156146 27 151770 004767 173074 28 151774 012700 020075 29 152000 004767 161524 30 152004 010401 JI 152006 004767 003064 32 152012 105337 oomo JJ 152016 001352 34 152020 013704 007754 35 152024 001404 36 152026 004767 003216 37 152032 000167 003056 38 152036 000207 39 40 41 42 43 44 152040 016746 035264 45 152044 042767 000200 035256 46 152052 013702 007462 47 152056 020227 007320 48 152062 103003 49 152064 004767 000012 50 152070 000772 51 152072 012667 035232 52 152076 000167 171502 53 54 152102 004767 161416 55 152106 004767 161662 56 152112 012700 020075 57 152116 004767 161406 ;-- TYPREG: lHOVB llOV 1t; JSR MV JSR MV SUB JSR HOV JSR HOV JSR DECB BNE HOV BEU JSR JIW 2i! RTS icount 9 re9isters t9 .. etCOONTI tDSYttS,etADVA[IR iborrow ADIJADR as a Pointer istart a new line PC·CRLF l!tADVADR,R2 PC,PRINT2 it~F-€ na1e of resister R2,HADVADR ;go bac~ to resister nate IDSYHSH•R2 ;~t contents of resister PC,POSVAL 1400l040t075•RO ;\ypo • <s•aco> PC•CHROUT R4,Rl ;get rE'!Jister contents Pc.TYPNHl itYPe nu•ericall~ HCOUNTI u @HWATClhR4 2• PC, TYPADR TYPL01 PC i9et watchf.oint address ;watchPoint not set ;type watch~oint address ;t':IPe in current ~ode ;++ ; TYPT!tL t':IPe!. thl' er1tire user s':labol table. ;-- TYPTBL: :HOV BIC HOV CMP ?S: BHIS JSR BR 1$: MDV JHP TYPSYN: : JSR JSR HOV JSR THPHOD,-CSPI i1ake ss1bols show UP in word aode tF.BYTM,THPHOD ;start at the botto1 of the table @IT8LBOT •R2 R2,ITBLTOP idooe ':let? u i':les PC,TYPSYH 71 ISP>+.TllPNOD CMNS itsPe the na1e and value of one SY1bol iPut back to watever 1ode it was in ;~et next co..and PC,CRLF istart a new line ; t':IPe s'Aho 1 na1e PC,PRIN12 1400l040t07S.RO a.,. <SPac•> PC,CHROUI 0 A-80 T-11 Evaluation Hodule HOl\itor HACRO V05.00 Sund•• 1J-Har-8J 04110 Pase 47-1 Syabol and label Handlin!i Routines SB 152122 012201 59 152124 000167 002746 HOV JHP !R2>+.Rl TlPNltl ;set value itYPe it nuaericalh1 T-11 Evaluation Module Monitor HACRO V05.00 Sund•• lJ-Har-BJ 04ilv Pase 48 Sy1bol and L.Wel Handlin!! Routines .SBTTL Arith1etic Routines 2 J 4 1521JO 050405 s 152132 000207 6 7 I521J4 005104 B 152136 040405 9 152140 000207 10 11 152142 010500 12 152144 005005 13 152146 060005 14 152150 077402 15 152152 000207 16 17 152154 060405 1B 152156 000207 19 20 152160 160405 21 152162 000107 22 23 152164 005000 24 152166 005704 25 152170 00140J 26 152172 005200 27 152174 160405 28 152176 10Jl75 29 152200 010005 JO 152202 005305 31 152204 000207 LOGOR:: BIS RTS R4,R5 PC LOGAND! :coH BIC RTS R4 R4,R5 PC R5,RO HULT!Pi!HOV CLR is: ADD SOB RTS RO.RS R4,11 PC ADD!Tii ADD RTS R4,R5 PC SUBJR:: SUB RTS R4.R5 PC DIV!Di: CLR TST RO R4 21 BEG 1s: 2t: ;1ake a cDf'!::I of first factor ;clear accu1ulator RS ;.ultiPlY bY successive addition ;count down second factor iinitialize auotient ;are we dividin!I b~ zero? iYes1 return 177777 jincreM!nt auotient ;trw subtractin!i divisor fro• dividend RO INC SUB JlCC HOV 1$ tsuccessful1 nG underflow RO.RS Dl:C R5 ;replace accuaulator with auotient ;ad.Alst for excessive increaent of RO RTS PC R4•R5 A-81 T-11 Evaluation ttodule Ji\onitor KACRO V05,00 Sund•• 13-"ar-83 04:10 Pate 49 ArithtN!'tic Routines 1 2 3 4 5 6 7 .SBTTL Instruction Encode/Decode Routines HI GETlNS takes an index to a aneaonic in R2t and the •ne1onic's base value in R4, It parses any needed operands aod stores the resultins code at the current address. ;-- B 9 152206 10 152210 11 152214 12 152216 13 152220 14 152224 15 152232 16 152234 17 152240 18 152244 19 152250 20 152252 21 152254 22 152260 23 152264 24 152272 25 26 152276 27 152300 28 152302 29 152304 30 152306 31 152310 32 152312 010446 004767 006202 006202 010437 142737 012624 010437 105037 116201 006201 006201 042701 004771 013737 000167 GETINS! :MOU JSR ASR ASR 007336 ltOIJ 000010 007324 BICB 002310 HOV 007334 007342 156034 llOV CLRB llOVB ASR 177741 152276 007334 007756 171314 BIC JSR ltOV JHP ASR 153172 143164 152770 153152 153024 152724 153016 33 152314 153006 34 152316 152714 35 152320 153102 36 37 38 152322 004767 173122 39 152326 100414 40 152330 103413 41 151332 OOU67 161050 42 152336 020227 000040 43 152342 103006 44 mm 006202 45 152346 006202 46 152350 060237 007342 47 152354 000250 48 152356 000207 49 50 152360 000270 51 152362 000207 52 53 54 152364 120027 000100 55 152370 001005 56 152372 062737 000010 007342 57 152400 004767 161022 INSDSP: .llORD .llORD .llORD .WORD ,WORD ,WIJRD .WORD .llORD ,W!JlD ,llORD R4•-(5Pl PC•AJIRt:Hl R2 R2 RMISAVEXP ;save the base OF-code value ;chec~ that it's even and in user RA~ i1ake a byte index ;for the PAR~S table ;save OPcode address here tF.SAUK,etLINFLGfPrevent interference with noraal use et SAVEXP (SPl!o!R4H istore base oPcode value ;first operand address R4•HADVADR iinitialize addr£1ssird 1ode scratch moDE PARAASCR2l ,Rt ;~et fortat code ;1ale a word index RI RI 1177741,Rl ;1ask out the 9arba9e Pc.eINSDSP(Rl I i!et appropriate operand seauence @tADVADR1@tSA.DDRiuPdate current address irecover next character, Parse next co1•and OJHTIH ;oo 1eans decode cortdition codes CONCOO ClllJl2 JNSOON EllTRAP BRDJSP REGOS! OPRAND SRCOST RTSREG S08DSP 101 aeans not an instruction ;02 1eans no Paraaeters ;03 ••ans "NN for E"T and TRAP ;04 aeans 8wbit branch disPlace1ent ;05 .... , RrDD for JSR and XOR ;06 1eans SS or DD i07 1eans ss,DD ;10 1eans R for RTS ;11 aeans R,HN fo, SOB .EHABL LSB iParse a sy1bolic nne PC•GETNA" ;user defined nillet error BK! 3$ ;instruction 1ne1onic1 error BCS 3$ PCrGETLCH i~et next character in RO JSR R2•tDSYKPS-DSYHS;is it RO throu9h PC? C"P 3$ ino' error BHIS ;get re!ister nuaber ASR R2 ASR R2 ;Put it in bottoa 3 bits of addressing aode ADD R21PIHODE CLN RTS PC G£TREG::JSR 3t: SEN RTS Fl.11.0PR!!CHPB BHE ADD JSR PC ROrllOO 5$ 110.etlKIDE PCrGETNXT A-82 iis first character@~ ;,., deferred aode ;set character after f i~est T-11 EYaluation "odule "onitor ltACRO V05,00 Sunda• 13-H•r-83 04:10 Pa!!e 49-1 InstNJctioo Encode/Decode Routines 58 152404 59 152410 60 152412 61 62 152.i6 63 152m 64 mm 65 152426 66 152430 67 152434 68 152436 69 152442 70 152444 71 152446 Tl 152452 73 152456 74 152460 75 152462 76 152466 77 152472 78 152474 79 152500 80 152506 01 152512 82 152514 SJ 152520 84 152524 85 152532 86 87 152534 8S 152536 89 90 152540 91 152546 92 152550 93 152556 94 152562 95 152566 96 152570 97 152574 98 152576 99 152602 100 152606 101 152610 102 152616 !OJ 152622 104 105 152624 106 152632 107 152636 108 109 152642 110 152646 111 152652 112 152656 113 152660 11~ 152666 004767 001672 100407 010046 '5S: mm 010m 004767 100044 012603 012600 120027 001445 120027 001011 010346 004767 120027 001430 012603 012700 120027 001454 004767 062737 120027 001421 013704 163744 062737 000207 177700 JSR BHI HOV HOV JSR BPL 000050 6•: 000055 160754 000050 000055 000043 91: 000142 000060 007342 000050 007334 007334 000007 007342 HOV HOV CHPB BEQ CHPB BNE HOV JSR CllPB BEQ HOV ltOV CllPB BED JSR ADD CHPB BEQ HOV SUB ADD RTS PC,RADCH 61 RO.-<SP> R3,-<SP> PC,GETREG 71 ISP>+.R3 <SP>+.RO RQ,1050 4' ROrtOS'5 it be a resister naae? ;nor definitel!I not a re~ister 1save charat:ter isave runnin9 Pointer iand tr\I to Set a resister r1aae isuccessful, 1ode 0 or t ;restore runnins Pointer ;restore character in RO iis it (? ivesr 1ode 11 2r or J ;is next character -? ;no definittl!I not autodecre1ent ;saYe runnin9 pointer ;get character after iis it <? iYesr 1ode 4 or S irestore runnins Pointer ;restore - in RO i1s it 11 i!les• do i11ediate and absolute ;~et an indeM or relative address ;indexed addressins •ode ;is it an index? ;1i~ht 91 R3,-1Sf) PC.GETNXT RQ,1050 IOI ISPH•R3 1055,RO RO•I043 111 PC,GETARG 16o.PIHODf RO,tOSO 121 f<Jes i!let next oPerand address HAllVADR,R4 !IADVADR,-CR4> i1ake this operand a PC relative address 107,@IHOll!: iiaPlicit PC reference PC 022626 000207 7$: CHP RTS (SP)f.!SP>t PC idiscard saved character aricl rurminS Pointer ; return 1ode 0 or 1 062737 005726 062737 004767 004767 100501 120027 001076 004767 120027 001005 062737 004767 000207 000030 007342 10s: ADD TST ADO JSR JSR BHI CHPI IJO,PIMODE ISPll tlO,HHODE PC,GETNXT PC.GETREG 21 RO,t051 BNE 2t JSR CIWB !NE ADD JSR RTS PC.GETNXT R0,1053 81 11MIHODE PC.GETNXT PC itor -(, add 40 total to addressinS ~ode tdiscitd saved roonins Pointer ;for (,add 10 to addre~sins aode ;get character after ( ;should be a re!iister naae inot a resister no1er error ishould be followed b~ ) ;no, error i!ftt character after ) ADD JSR JHP 127 ,@IHOllE PC.GETNXT GETARG ii11ediate, absolute are aodes 2 arid 3 with PC ;set character after t ;store i11ediate data or absolute address GETARG:: JSR HOV JSR HOV ADD 000002 007334 RTS PC,GETEXP e!ADVADR,R4 PC,A!IRCH2 R5,l!R4 tMIADVADR PC ;set an ar!lu1ent in RS i!let a.ddress of operand icheti:. that we are still in user RAK ;store ar9'1J11ent at operand addre;:.s ;incre1ent address 000010 007342 4S: 12s: 160644 177534 000051 160624 000053 000010 007342 160604 062737 000027 007342 004767 160570 000167 000000 004767 013704 004767 010514 062737 000207 171654 007334 001652 at: 11s: A-83 iis it +'! ;not done iaode 2 or 3 i5et character after + ' T-11 Evaluation Kodule Honitor ltllCRO V05, 00 Sunda!I 13-Har-83 04110 Pas. 49-2 Instruction Encode/DecodP Routines 115 116 117 152670 118 152674 119 152676 120 152702 121 152706 122 152712 123 124 152714 125 152720 126 152722 127 120 152m 129 152730 130 152732 131 152736 132 1S2742 133 134 152744 135 152750 136 152752 137 152754 138 1S2756 139 140 152760 141 152764 142 143 152770 144 145 152772 146 147 152776 148 1S3002 149 ISO 153006 15! 153012 152 153016 1S3 153022 154 1S5 156 1SJ024 157 1S3030 158 IS3034 159 153036 160 153042 161 153046 162 1S3050 163 1S30S4 164 153056 16S 153060 166 IS3064 167 153066 168 153070 169 IS3074 170 IS3100 ;is first operand followed b~ a co11a? ;nor error istore first operand 1ode ;set character after co~•o RTS R0,1054 21 pe,JNSDHl PC,GETNXT HHODE PC 004767 177402 100424 000416 RTSREG: !JSR Biii BR PC•GHREG 21 JNSDN2 i9et a re9ister nu1ber ierrorr not a resister na111e iadd it to opcode 004767 177372 100420 004767 177732 004767 177422 000406 REGDSTliJSR BHI JSR JSR BR PC,GETREG 21 PC,COHACH pe,ftl.OPR INSDN2 iset a re9ister nu1ber ierror1 not a re9ister na1e ichec~ for cona between 0Perar1ds ;!et a full operand 113701 007342 000301 006201 006201 000402 INSDNli HOVB SWAB ASR ASR BR HHODE,Rl RI RI Rl ;set addressins 1ode bits ;shift it 6 bits to the left 113701 007342 060177 034346 INSDH2l HOVB 1$! ADD HllODE1Rl 000207 INSDONl RTS PC 000167 170166 2$! JllP CHON2 012702 153266 000167 170204 20•: HOV JHP tBRANCH,R2 004767 1773S2 004767 177652 004767 177342 000756 SRCDST l : JSR JSR OF'RAHD : : JSR BR PC1FULOPR PC•COllACH PC,flJl.OPR INSIIH2 004767 171472 !06437 007326 001402 omos 007756 163705 007334 006205 032705 177600 001405 OOSIOS 032705 177600 001344 005105 042705 177400 060577 034236 000207 BRDISPl lJSR HTPS BED HOV 14S! SUB ASR BIT PC,GETEXP etCURCOH 141 etSADDll.RS etADWIDR,R5 RS 1177600,RS 131 RS 1177600,R5 201 R5 1177400,RS RS,@SAVEXP PC 120027 001036 004767 004767 105037 000207 000054 000042 160520 007342 COHACH: CHPB llHE JSR JSR cm BEQ 13$! COH BIT DHE COH BIC ADD RTS 11 Rt.~AV!:XP ;set addressing 1ode bits ;add thel f.o OPtode iPOint to branch error 1essase ERROR 171 A-84 iset first oPerand ;chec~ for caa•~ between Of'erands ;set seicortd operand ;store second operand aode i!fet branch destination ;did exf'ression cor1tain undefined s~•bol s1 irio, no proble1 hies1 take instruction 'BR , • so no ran!:le error j1ake it relative i1ake it a word offset ;does uPPer b~te 1atch bit 71 ;yes ;no, branch ranse error i1ake it an 8-bit nu1ber ;add disPlace1ent to OP-code T-11 Evaluation llodul• Monitor MACRO V05.00 Sunda• 13-Mar-83 01:10 Paso 49-3 Instruction Encode/Decode Routines ;get re!iister SOBDSP: :JSR PC.SETREB 004767 177214 ;error1 not a register na1.e BM! 21 100731 ;check for co11a between oF>erands PC,COHACH 004767 177554 JSR PC.GETEXP 004767 171402 JSR idid expression contain undefir1ed ss1bols? Hl:URCOM 106437 007326 MIPS ino1 no ?roble1 2U 001402 BEG ;~es' aake instruction 'BR ,• so no rans~ error nov HIADDRrR5 013705 007756 ;1ake it relative HADVADR.R5 163705 007334 21•: 5118 RS !BO 153136 006205 ASR ;SOB instruction uses ne9ated disPlace1er1t RS 181 153140 005405 NEB i6-bit disF-lace1er1t 1177700,RS 182 153H2 032705 177700 BIT ; rar19e or direction error 20t BNE 183 153146 001313 131 184 153150 000747 BR 185 PC,GETEXP i!let trap nuaber EMTRAP:: JSR 186 153152 004767 171344 ;sho1Jld be <256. t177400,R5 187 153150 032705 177400 BIT ;)255, t errorBNE 21 188 153162 001303 189 153164 000741 BR 131 190 ;get character after co11a PC,GETNXT t9t: JSR 191 153166 004767 160234 ;Rt 1ust be O when enterin!i -- is it C? Ro,1103 COHCOD!!CHPB 192 153172 120027 000103 193 153176 001003 BH£ 161 iset C bit tl .R1 194 153200 052701 000001 BIS 195 153204 000421 BR m 161: R0.1126 iis it V? 196 153206 120027 000126 CMPB 171 197 153212 001003 BNE t2,RI ;,.t v bit 198 153214 052701 000002 BIS BR 199 153220 000413 151 RO,t132 Hs it Z? 17S: CMPB 200 153222 120027 000132 BNE 181 201 153226 001003 14,Rl ;set Z bit 202 153230 052701 000004 BIS ISi BR 203 153234 000405 i1s it N? 1st: CMPB Ro.1116 204 153236 120027 000116 ino1 illegal character BNE 21 205 153242 001253 t10,Rl iset Hbll 206 153244 052701 000010 BIS 207 ;get next character PC,GETNXT 208 153250 004767 160152 1st: JSR RO,toS4 iis it a coua? CHPB 209 153254 120027 000054 ;~es' set so1e 1ore 210 153260 001742 BEG 191 ;co1Pensate tor opcode base 'lalYe = 241 or 261 DEC R1 211 153262 005301 iadd condition bits to OPCOde 212 153264 000637 BR 11 .DSABL LSB 213 214 215 153266 007521 054000 001155 BRAHCH: .RAD50 /BRAHCH OUT Of RANGE/ 153274 076417 022622 004167 153302 017500 .WGRD 0 216 153304 000000 172 153102 173 153106 174 153110 175 153114 176 153120 177 153124 178 153126 179 153132 A-85 HI Evalu•tion ltooole "onitar MCRO V05.00 Sunda• 13-Har-83 04110 Pase SO Instruction Encode/Decode Routines ;++ I 2 3 TYPINS decodes the instruction at address R4 and t':IPes it followed on the next line b~ the next address. ;-- 4 s 6 153306 7 153310 8 153312 9 153314 10 153316 11 153320 12 153324 13 153330 14 153332 IS 153334 16 153340 17 153344 18 153346 19 153352 20 153354 21 153356 22 153360 23 153362 24 153364 25 153370 26 153372 27 153376 28 153400 29 153404 JO 153410 31 32 153412 33 153414 34 153420 35 153422 36 153424 37 153430 38 153434 39 153436 40 153442 •1 1SJH6 42 153450 l3 !SJm 44 153456 45 153460 46 153464 47 153470 48 011405 010500 006300 006300 000300 042700 110037 005705 100027 042705 004767 006202 105762 100017 006302 012405 010246 006302 062702 011201 004767 012602 012701 004767 000412 012405 004767 010246 006302 062702 004767 012602 012700 004767 006202 11.\201 006201 006201 042701 004771 000167 177700 007342 100000 !Ml0130 156034 TYPINSl ll\OV llOV ASL ASL SWAB BIC HOVB !ST BPL B!C JSR ASR TSTB BPL ASL St: 000054 156502 160340 000011 160062 6t: 156034 177741 153514 001554 49 153471 012702 000212 1f~ 50 153500 51 153504 52 153506 53 153510 54 153512 55 56 153514 57 153516 3t: 020562 155620 103002 005742 000773 000207 154132 153540 4t: ;store the• here for operand decode ;not a b1:1te aode instruction ;first see if it's a bste aode instruction ;aatch to table1 set index HOV JSR HOV ASL ADD .JSR HOV llOV JSR ASR HOVB ASR ASR BIC JSR JltP <R4H,RS ;set OPcode iaatch to table Pc.JI R2•-<Sf') ;save index i1ake inde>: to 11ne11onic R2 t11N£11S,R2 pt,f·RINT2 ;t!IPe ane1onic <SPHoR2 ;set ir1dex b~k ;t!:!Pe <tab> 1011'RO PCoCHROUT ;1al-.e b!:lte instruction inde>: R2 PARAllS<R2hRI fset foraat c~ Rl RI ;1ask out the sarbase t177741•Rl PC,@IHTDSP<Rll ; t!:IPe of'erands it!:IPe next address and a tab TYPADI! HOV CHP BHIS !ST BR RTS ;index last base value IPARAftS-BASES-2.R2 ico1pare opcode to base valve R5·BASES<R2) ;1atch 41 -IR2l ikeeP lookins 31 PC "ov 0062M 160374 ;set bits a throush 13 JSR llOV HOV .JSR BR "ov 160406 SI ;set oPcode t!OOOOO•R5 pc,11 R2 PARAllS<R2) 51 R2 <R4)t.R5 R2,-(SP) R2 tltHEHS,R2 <!R2oR1 PCoPRIHTl <SPl+.R2 ISOlSOl2oR1 PC.PRINT! 61 HOV ASL ADD 156502 @R4,RS RS•RO RO RO RO t177700,RO RO,HllODE RS IllTDSP: .WORD .WORD TCOMCO NOPCOD A-86 ;not b~te aode, do it nor1all1:1 i restore R2 ifix R41 restore R5 ;save index faake index to 1ne1onic ;set 3 chracter aneaonic ;t~Pe it irestore R2 ltype B <SPl <SP> ;cvzN i16 bit value, net an oPCode T-11 Evaluation Kodulo Hooitor HACRO VOS.00 Sund•• 13-Kar-83 04:10 P,.e 50-1 Instruction Encode/DfCode Routines 58 153520 59 153522 60 153524 61 153526 62 153530 63 153532 64 153534 65 153536 66 67 6B 153540 69 153542 70 71 153544 72 153550 73 153554 74 153560 75 153564 76 77 15356.1 78 153S72 79 BO 153574 Bl 153600 82 83 153602 84 153606 85 86 153612 87 153616 SB 153622 89 153626 90 153632 91 92 153636 93 153642 94 153646 95 153650 96 153652 97 153656 98 99 153662 100 15366.1 101 153674 102 103 153676 104 153702 105 153706 106 153710 107 153714 108 153716 109 153720 110 Ill 153722 112 153724 llJ 153730 114 153732 153564 153722 15373! 1535H 153554 153544 153566 153676 ,ll{JR[I !HTDON irro operands .WORD .WORD TEKTRP TBRDSP TRGllST T!WRHD TSRJ)ST TRTSl«i TSOBDS ;EHT and TRAP ;a-bit dis~lace1ent .WORD .WORD .WORD .WORD ,WORD i~1DD iSS or DD ;ss,oo ;R Hi-bit roositive disPlace1er1t .EHABL LSB NOl'coo: :rsr oo5m 000553 004767 004767 004767 004767 000207 BR ;bac~ UP to nutber ;type it as data -(R1) 12f ;type an operand 000200 000026 000102 000164 TSRDST: :JSR JSR TOPRHD:: JSR JSR IHTOOH: RTS PC• TFllOP pe, TCOlllA PC,6£TDST PC• Tf\ILIJI' PC 004767 000070 000421 TRTSRG:: JSR BR PC.GHOST !REGIS itYPe resister nate 004767 000036 000763 TRGDST::JSR PC,TR£G!S 13$ it':IPe re~ister itype co11ta and second OPerand 012700 000054 000167 157716 TCOHKA: HOV JHP IOS4•RO CHROIJT 012700 004767 004767 012700 000167 000050 157706 000010 000051 157672 TPREG:: KOV JSR JSR HOV JHP tOSOrRO 113700 042700 006300 006300 016001 000167 007342 177770 TREGlS : : HOVB BIC Ast ASL llOV JHP HKODE,RO 1177770,RO RO RO DSYllS<RO>.Rl PRINT4 GET DST: HOVB 110537 007342 8IC8 142737 000300 007342 111! RTS 000207 R5.elHODE 1300oPIHODE PC 004767 177734 004767 177674 010501 042701 177700 006301 005401 000407 TSOBDS ! : JSR JSR HOV B!C ASL NEG BR PC.TREGIS PC,TCOHHA RS.Rt 1177700,RI RI RI 61 ;t!:IPe resister na1e 010501 042701 177400 005744 000404 TE"TRP!:trov BIC TST BR RS.RI 1177400,RI -IR4) 7$ iset lower 8 bits without si!n extend 156142 160126 m: BR PC,CHROIJT PC,TRfGIS 1051'RO CHROUT A-87 it~Pe coe1a iset bits Othrou9h S of opcode ;t':IPe operand itYPE! ( itYPe resister naae ;set bits O throush 2 ; inde)( reSistet na1e ;set RADSO triPJet jl':JPe it it!:IPe co11a ;set lower 6 bits ;1ake it a b!:lte disPlaceaent ;TYPl02 will advance R4 T-11 Evaluation Pkldule Monitor KACRO V05, 00 Sund•• ll-llar-83 04:10 Pase 50~2 Instruction Encode/Decode Rootines l1S 116 153734 117 153736 118 153740 119 153742 120 153744 121 122 153750 110501 006301 060401 005744 00016) 001162 TBRDSP: : HOVB ASL 61! ADD TST 7t: JHP R5•Rl Rl R4•Rl -(R4l TYPL02 ;set lower 8 bits with sisn e~tend ;;ake it a b~te disPlace1ent ;add in the 'PC' ;TYPL02 will advance R~ ;t~e this value 113702 007342 !FULOP! !HOVB @IHODE•R2 iaddressinS •ode scratch ideferred? m 153m Ol2702 000010 m 153760 125 153762 126 153766 127 153772 128 153776 129 154000 130 154004 Ill 154006 132 154012 Ill 154014 m 154020 ll5 154022 136 154026 137 mo3o 138 154034 139 154040 140 154044 141 154050 142 154052 143 154056 144 145 154062 146 154066 14) 154072 148 149 l54m ISO 154102 151 154104 152 154110 153 154112 m 154116 155 156 154120 157 154122 158 154124 159 154126 160 161 154!32 162 mm 163 154136 164 154140 165 154144 166 154150 16) 154152 168 154154 169 154160 170 154164 171 154166 001404 012700 004767 120227 103717 120227 103034 120227 001423 120227 001420 120227 103404 012700 004767 004767 120227 103245 012700 000!67 000100 157536 000020 m 1$! 000060 000027 BEG llOV JSR CHPB BLO CHPB BlHS CHPB BEU 000037 CHPB BEU 000040 000055 157470 !))546 000040 4f ~ 00005l 157446 CHPB BLO KOV JSR JSR CHPB lUHS KOV JHP 012700 000043 004767 157436 000167 001016 3f! HOV 12f: JSR JHP 120227 000067 001406 120227 0000)) 001403 004767 000776 000635 2t: 012401 060401 5t: oosm 000167 001000 010501 006201 103004 012700 004767 006201 103004 012700 004167 006201 103004 000103 157360 000126 157344 CKPB BEU CKPB BEG JSR tlOrR2 a ;no llOO•RO PC,CHROUT R2,120 !REGIS R2rt60 21 R2,127 31 R2•137 31 R2,140 41 1055•RO PC,CHROUI PC, TPR£G R2,140 INT DON 1053,RO CHROIJT tt~Pe e t1ode 0 or J? Just t~Pe resister na1e i1ode 6 or 7? ;1j'es, ir1dexed ;i11ediate? i1J'es Iabsolute? ;~es, i!~es ; autodecre1ent? ir.o H8Pe it~Pe resister naae in Parenthesis iaotoincre1ertt? ioo, finished it~PE' t it":We t 1043,RO PC.CHROUT TYPL01 ft~Pe ne>:t R2,t67 ; relative? location 51 ;~es R2•177 irelative deferred? 51 i'::les BR PC,TYPLOl TPRfG it!IPe next location it<&Pe re.!iister na1e iri Parenthesis KOV ADO TS! J!P !R41t.Rl R41Rl -(R4> TYPL02 ;get next location iadd in the 'PC' ;TYPL02 will increaent R41 don't do it now ;t!lf'e the value TCONCD: atov ASR 8CC ltOV JSR et: ASR BCC ltOV JSR ASR 9f: BCC RS.RI i.!iet OPCOdf ;c bit set? RI 61 ino 1103,RO PC,CHROUT Rt 91 1116,RO f'C.CHROUI RI 101 it'::IPE' C A-88 ;v bit set? il bit set? T-11 Evaluation 11odule Konitor ltACRO V05,00 Sund•• 13-Har-83 04ll0 Pase 50-3 Ir1struction Encode/Decode Routines 172 154170 173 154174 174 154200 175 154202 176 154204 177 154210 178 012700 004767 006201 103234 012700 000167 000132 157330 tos: 000116 157314 HOV JSR ASR BCC llOV 1132,RO PC,CHROUT Rl 11$ 1116,RO CHROUT .DSABL LSB JllP A-89 PN bit set? T-11 Evaluation Hodule Monitor HACRO V05,00 S\Jfld., !3-Har-83 04:10 Pase 51 Instruction Encode/Decode Routines 2 3 4 5 6 7 8 154214 005000 9 154216 005200 10 154220 162701 001750 11 154221 103374 12 154226 005300 13 154230 062701 001750 14 154234 006301 15 154236 010146 16 154240 006301 17 mm 006301 18 154244 062601 19 154246 062700 000060 20 154252 000207 21 ,SBTTL Co~version and lYPeout Routines 1++ BINASC strips the thousands disit froa the value in Rl and 1ultiPlies Rl b• 10. Use BillASl to ••t the 10000.s disit, ;-;divide by successive subtraction BINASC: :CLR 1s: INC SUB BCC DEC ADD ASL HOV ASL ASL ADD ADD RTS 11000 .. RI RI Rl,-(51') RI RI ISPH,RI 1060,RO PC BINASl::CLR 1s: INC SUB RO RO 110000,,Rl ;divide by successive subtraction BCC l$ DEC ADD ADD RTS RO 110000, •Rl 1060,RO PC ;workedr no borrow ifix RO iand Rl ;take an ASCII disit RO RO 11000, •Rl l$ RO ltrY to subtract 1000. ;workedr no borrow ifix RO fand Rl ;tulti•I• RI b• 10 itiaes B ;p}us 2 aakes 10 X iadd 060 to 1ake it an ASCII disit 22 23 154254 24 154256 25 1smo 26 154264 27 154266 28 154270 29 154274 30 154300 31 32 33 34 005000 005200 162701 023420 103374 005300 062701 023420 062700 000060 000207 ;++ RADCH checks if the character in RO is a legal RADSO character. Returns H=I if not. ;-- 35 36 37 154302 38 154306 39 154310 40 154314 41 154316 42 154322 0 154324 44 154330 45 154332 46 154336 47 154340 48 1543H 49 mm so 154350 51 154352 52 154m 53 ;tr~ to subtract 10000. 120027 103017 120027 103016 120G27 103011 120027 103010 120027 001405 120027 001402 000270 OG0207 000250 000207 000133 000101 000072 RADCH: : CHPB BHIS CHPB BHIS CHPB BHIS RO.till 2t R0.1101 C"PB R0,1060 BHIS CHPB BED CHPB BED II 000060 000056 000044 2s: SEN 1s: RTS CLN RTS ihiSher than Z? iA or higher1 l$ RO.t072 2$ R0.1056 J! or hisher! ;o Gr hi~her? ;period1 II R0,1044 1$ PC PC A-90 fdollar si!ln? T-11 Eviluation Hodule Monitor llACRO VOS.Q-0 Sund"" 13-Har-83 04:10 Conversion and T~Peout Routines Pa~e 52 it+ 2 3 4 5 6 7 B 154356 9 154362 10 154364 II 154370 12 154172 13 154376 14 154400 15 154402 16 154404 17 154406 18 154410 19 154412 20 154414 21 22 23 24 25 26 154416 27 154422 28 154426 29 154430 30 154434 31 154436 32 154442 33 154444 34 154446 35 154m 36 154456 37 154460 38 154464 39 40 154466 41 154470 42 154474 43 44 45 154476 154504 46 154510 47 48 l54Sl2 154520 49 154522 NU11CH chec~,s it the character in RO is riuaeric and returns fla!1s as follows: N=O, V=O character is 0 throu!1h 7 N=Or V=l character is 8 or 9 N=l an~ other character ;-- 120027 000060 103413 120027 oooon 103010 120027 000070 103002 000257 000207 000257 000262 000207 000270 000207 HUttCH:: CHPB 2i: 1s: !LO CHPB BHIS Cl'l'B BH!S CCC RTS CCC Sl:V RTS so RTS R0,1060 II Ro.ton II RO,tOJO 2$ iis il ()or hillher? ;no, non-nu1eric iis it hi9her than 9? ;'jlls, non-nu1eric jis it hi~r than 71. ;11esr 8 or 9 ;tla~ 0 throu~h 7 PC iflas 8 or 9 PC PC i++ ASCRAD oultiPti .. RI boJ 40 and adds the RAD50 eouiYalent of RO, ;-004767 120027 001416 120027 001414 120027 001412 060001 162701 120027 103002 062701 000207 157500 000040 CltPB PC,R1X40 R0,1040 II RO·l-056 BEQ 4f CHPB ADD SUB CHPB BHIS ADD RTS RO,l-044 5$ RO.Rt llOO•RI RO,tlOI II 1056,Rl PC INC ADD RTS RI 1033.RI PC ASCRAD: :JSR CHPB JIEQ 000056 000044 JIEQ 000100 000101 000056 005201 062701 000033 000207 1$! 4f: st: ;•ultiPl~ Rl b~ 40 ;spaces converts to 0 ;period is 34 idollar si!in is 33 ialPhabetics are 1 throush.32 rr.uaerics are 36 throush 47 054754 000566 001533 USERAH: .RAD50 /NOT IN USER RAH/ 021020 070265 ,WORD 0 000000 057144 000054 015725 ODDADR: ,RAD50 /ODD ADDRESS/ 074670 , lllJRD 0 000000 A-91 T-11 Evaluation Module llonitor HACRO V05,00 Sundas 13-Har-83 04:10 Pa•e 53 Conversion and TsPeout Routines 1 .ENABL LSB 2 3 Ht ADRCHK checks that the nulber in R4 is even if current aode is word size, 4 ADRCH1 aoves the current address into R4 and checks that it is in user RAH. 5 ;-6 7 @1$ADDRrR4 8 154524 013704 007756 ADRCHl:: HOV 9 154530 032737 040000 007706 ADRCH2: : BIT tF.PROTr@tFLAGSliaonitor scratch Protection disabled? 10 154536 001024 isesr proceed to odd/even check BNE ADRCHK iabove uPPer instance of aonitor scratch? 11 154540 020427 020000 CKP RM20000 12 154544 103021 ADRCHK ises BHIS ibelow lower instance? 13 154546 020427 006500 CKP R41HUR 14 154552 103416 ADRCHK ises BLO iwithin lower instance of 1onitor scratch? 15 154554 020427 010000 CKP R4rt10000 2$ ises1 user not allowed to deposit there 16 154560 103407 BLO R41-<SP) KOV 17 154562 010446 itranslate R4 froa lxxxx ran~e to Oxxxx SUB t100001R4 18 154564 162704 010000 CKP R41UUR 19 154570 020427 006500 ; restore R4 20 154574 012604 KOV CSPHrR4 iit's between instances of scratch 21 154576 103404 BLO ADRCHK 2$l 22 154600 012702 154476 KOIJ tUSERAK1R2 iPoint to aessa•e 1$l 23 154604 000167 166402 JltP ERROR itsPe error aessa•e 24 25 154610 105737 007330 ADRCHK ! !TSTB HTKPltOD 3$ 26 154614 100406 BKI 27 154616 032704 000001 BIT t11R4 3$ 28 154622 001403 BEG 29 154624 012702 154512 HOV tODDADR1R2 iPoint to aessa~ 1$ JO 154630 000765 BR 31 Jt: RTS PC 32 154632 000207 .DSABL LSB 33 34 35 it+ ; TYPASC tYPes Rl as an ASCII bste or word, 36 ;-37 38 39 154634 105737 007330 TYPAsc::rm HTHPHOD 1$ 40 154640 100404 BHI SWAB iin word aode1 tYPe hi•h order character first 41 154642 000301 Rl PC11$ 42 154644 004767 000002 JSR 43 154650 000301 SWAB Rl 1$l itYPe low order character in Rl 44 154652 010100 HOV R11RO JHP ASCOUT 45 154654 000167 156746 A-92 T-11 Evaluation Hodule Monitor ltACRO V05,00 Sund•• 13-Har-83 04:10 Pase 54 Cor1version ;md TsPeout Routines 1 2 3 4 5 6 154660 7 154664 8 154666 9 154670 10 154672 11 154676 12 154702 13 1547!e 14 154714 15 154716 16 154722 17 154726 18 154732 19 154734 20 15mo 21 22 23 24 25 26 154744 27 154746 28 154754 29 154756 30 154764 31 154766 32 154770 33 154772 34 35 155002 36 155004 37 155006 38 15'5010 39 155012 40 155014 41 155016 42 155010 43 155022 44 155026 45 155032 46 155036 47 155040 48 49 mm ;++ TYPD£C t~Pes t.he val~ in Rl as a si!lr1ed, 5-di!ii t deci1al nuaber followed b!:I a Period. TYPDE1 can be used lo ts-Pe unsisne-d n!JMers. ;-012700 005701 100003 0054-01 012700 004767 112737 004767 000402 004767 004767 105337 001371 012700 000040 000055 156626 000005 007341 177340 177272 156602 007341 TYPDEC::HOV 1•: TST Bl'L NE6 HOV JSR KIJYB JSR 51: Jt: 000056 ooow 156564 BR JSR JSR 11£CB SHE HOV JltP t040,RO Rl II RI toss.Ro PC,~OUT t5,@tc0UNT2 pt,BillASl 31 PC,SIHASC pc,c~our ftc1JUNT2 51 t056,RO CHRDUT itsPe a period ;++ TYPOCT t1JPes R1 as an octal word. j-- 005000 032767 001407 112767 000301 006301 006100 000411 112767 000405 005000 006301 006100 006301 006100 006301 006100 062700 004767 105337 001362 000207 TYPOCTI l CLR BIT 000200 032354 BED 000003 032355 000006 032337 1•: HOllll SWAB ASL ROI. 8R HOVB BR 2s: 4S: JS! 000060 156476 007341 CLR ASL RO tF.BYTH,THPHOli iis it in bste 1ode ibranch if ses II ;if t<Yte 1ode ool!:I three di!iits t3,COIJHT2 ionl'iJ low hY:te out RI Rl RO 31 IO.COUNT2 31 RO Rl ROL RO ASL ROL ASL ROL ADD JSR DECB BHE Rt RTS RO Rl RO t060,RO pc,CHROUT HCOUIH2 2f PC A-93 T-11 Evaluation Kodule Honitor KACRO V05,00 Sunda• 13-Kar-83 04:10 Pa!le 55 Conversion and TYPeout Routines ;++ 2 3 4 5 155042 6 155050 7 155052 8 155056 9 155062 10 11 12 13 14 15 16 155064 17 155070 18 155072 19 155076 20 21 22 23 24 25 26 155100 27 155104 28 155112 29 155114 30 155116 31 155122 32 155124 33 155126 34 155132 35 155136 36 155140 37 155144 38 155146 39 155152 40 15515,4 41 155156 42 155162 43 155164 44 155166 45 46 155170 47 155172 48 155176 49 155200 50 TYPSPC l':1Pes a tab, except in iristruction aode (type nothing) • f ·- 132737 000100 007330 TYPSPC: !BITe BNE 001004 KOV 012700 004440 000167 156446 2t: J~ 000207 tt: RTS tF,JHSToftTHPHOD II t~ooio11+040,RO ;SPace' tab CHROOT PC ;++ TYPNtm typ-es the value in Rt as a s!iabol or nuaber. TYPNH1 t~s the value in Rt as a nulber only, j-- 004767 174542 100402 000167 156676 000722 TYPNUtt:!JSR BK! JKP TYPN"1:: BR ;++ PCoHATSYH TYPNKl PRINT2 TYPOCT itrY to aatch a sYabol ;unsuccessful, tYPe nU11ericallY Petse tYPe sYabol's na1e R4 is advanced to the next location. TYPl01 ran be used within instruction t~Peout, TYPLOC t':1Pes the location addressed bY R4 in the current IOde. ;-004767 132737 001026 011401 105737 100003 111401 1)42701 004767 100403 012700 000402 012700 004710 005204 105737 100401 005104 000207 TYPl..OC:: JSR 177504 Bili 000100 007330 BNE TYPL01: !HOV 007330 133774 TSH BPL HOVB BIC TYPL02: :JSR BK! Jt: HOV 155076 21: 177400 174474 BR 5t: 007330 010546 004767 176110 012605 000207 OS! KOV JSR INC TSTB IHI INC RTS TYPLOI::HOV JSR KOV RTS PCoAMCHK IF .INST oetTltPllOII TYPLOI ;set current location as a word fR4oRl iare we in ~e aode? emPHOD ino TYPL02 eR4,RI ;else set location as a byte fpr-event si9f1 extension 1177400oR1 ;tr<J to tilt'h a s'Sabol PCoMlSYH iunsucces1jful 21 IPRINT2oRO 51 tTYPNHhRO PColROI R4 emPNOD 61 R4 PC R5o-<SPl PCoTYPINS <SPl+.R5 PC A-94 ;save R5 because TYPINS uses it ;t<JPe an instruction ; restore R5 T-11 Evaluation Hodul• Konilor KACRO \1()5,00 SundaY 13-Kar-83 04!10 Pa~• 56 Conversion and T~eout Routines 1 2 3 4 5 155202 004767 000042 6 155206 112737 000010 007340 7 155214 004767 177660 8 155220 004767 177616 9 155221 005704 10 155226 001406 11 155730 020405 12 155232 101003 13 155234 005337 007340 14 155240 001365 15 155242 000207 16 155244 ooom 17 155246 000207 18 19 20 21 22 155250 016746 032054 23 155254 042767 000200 032046 24 155262 004767 156236 25 155266 010401 26 155270 132737 000002 007330 27 155276 001006 28 155300 004767 174326 29 155304 100403 30 155306 004767 156462 31 155312 000402 32 33 155314 004767 177424 34 155320 012700 020072 35 155324 012667 032000 36 155330 000167 156174 itf TYPLIN t!IPes the next 8 locations or four locations if in binary 1M>de. j-- TYPLIN: :JSR 1s: 2s: 3S: l!OVB JSR JSR TST BEQ CKP BHI DEC PC,TYPADR 18 .. HCOUNTl PC•TYPlOC Pc.TYPSPC R4 31 R4•R5 21 HCOUIHI BN£ II RTS CLZ RTS PC itYPe address in R4 as label or octal nu1ber it!lf't' location in current 1ode1 advance R4 ifor 177776 to 0 rase idone iJet! i!les PC ;++ TYPADR t!IPH the value in R4 as a label or octal nu1berr followed b!I : <SP> ;-TYPl\DR::KOV BIC JSR KOi/ 91TB BN£ 11 JSR PC,KATSYK BK! 11 JSR PC,PRINT2 21 BR 1•: 2t: TllPlfflD, -! SP I ;for b1:1t.e 1ode IF,BYTK.TKPllOD PC,CRtF R4•RI IF, ABS •@ITKPKOD JSR KOV KOV JIW PC, TYPOCT 14001040+072, RO ; res tor 1ode !SPlh TKPKOD CHROUT A-95 T-11 Evaluation Module l'klnitor MACRO VOS , 00 Sund•• 13-Har-83 04:10 Pas• 57 Conversion and TYPeOJJt Routines 2 3 4 5 6 155334 7 155336 8 1553H 9 155352 10 155356 11 155362 12 1553M 13 155366 14 155370 IS 155372 16 155374 17 155376 18 155402 19 155406 20 155412 21 155416 22 155422 23 155426 24 155432 25 155434 26 155440 27 155442 28 155444 29 30 155450 31 155454 32 155460 33 155466 34 155472 35 155U6 36 155500 37 155504 38 155506 39 155510 40 155514 41 155516 42 155520 43 155524 44 155526 .SBTTl Power-uF DiaSnostics .ENABl LSB 005203 012737 012737 012705 012701 010102 005000 010041 005200 005201 077104 012706 012700 004767 042703 110337 012701 012702 005000 004767 005705 001035 012705 000377 177440 000011 177444 003133 007776 010000 005777 000146 177770 177444 133000 160000 00012Q 000117 DIAGHO:: lift 11{JV HOV HOV 11{JV ltOV ClR HOV t •: INC INC SOB HOV HOV JSR BIC HOVB HOV HOV ClR JSR TST SHE HOV 177560 HOV 000002 SLUTSJ: rm 000004 000004 BISB 000060 KOVB 105760 000004 SLU.1: rm 100375 BPL 110160 000006 HOVB SLU.2: rm 105710 100376 BPL 126001 000002 CHPB 001010 BHE 105201 INCB 120127 000072 CHPB 001362 BNE 142760 000004 000004 B!CB 105005 CLRB 005705 TST 2•: 001005 BNE 132737 000002 177564 BITB 001401 BEG 000670 BR 000167 161100 JMP ~·: 012700 105760 152760 112701 45 155534 4b 155536 47 155540 48 155542 49 155550 50 155551 51 155554 52 53 54 SS 155560 062100 56 155562 020102 57 155564 103775 iuse r3 as di9it to disPla~ nulOer ;1isht all se!laents iturn on led t400*006+13J,R5 iin1tialize error code '12' 17776,Rl 1fill RAl1 with paltern1 saving location for JSR R3 1377,e!PSPORA llhe!PSPORC R1,R2 RO RO,-<Rll RO Rl R1•1f 110000,SP 15777,RO PC,CHKSUH 1177770.R3 R3,HPSPORC 1133000,Rl IEND,R2 RO iset Sf' to toP of RAM ;chet<ksua cotPle•ent for RAH Pattern ichecks1J111 words fro1 Rt (=Ol to R2 (=:7776) ;1ask of all biJt disit select iturn off let;! and t1Jrn on disit iindex ROHs iset UPPer checksUI li1it to top of ROKs iPerfor1 chec~su1 of R011 PC1CttKSUlt R5 2S ido we have an error ~et? ;l::les1 exit and show it t400tOOO+l17rR5 iinitialize error code ' 3' 4S 12.@1177564 41 DIAGNO !START i?oint to console iclear out and recieYed sarbage jset aainenace bit iinit character to x1it iread~ to x1it ;no - wait ;ser.d char to reciever ireceived a char ;no - uait i!fot what ~OIJ x11itted ino - error iProduce rie>:t ascii character ; ilooP until checked 0 to 177 ;reset aaintenace bit i':ifs' cleir error icheck for error ibranch it error 1see if in diasno aode ; if not then soodb~ ;100? for eyer ;initialize scralchPad RAtt and start aonilor IRllt.RO R1,R2 CHKSUlt iacc1J1ulate checksu1 ;done l::let7 ino 117756o.RO 2(R0) J4,4(R01 160,Rl 4<ROI SLU.1 Rh61ROI (ROI SLU,2 2<ROI oRl 21 Rl Rl ,172 SLU.1 14,4(RQ) RS RS ,ENABl lSB CHKSU11: lA[l[I CHP BlO A-96 T-11 Evaluation Kodule ltonilor KACRO \IOS,00 Sund"' 13-Kar-83 04!10 Pa<e 57-1 Power-up Dia~nostics SB 155566 59 155570 60 155572 61 155574 62 155576 000305 005700 001001 105005 000207 1$: SWAB TST BHE RS RO CLRB R5 RTS PC itest result a ichecksut failed ielse clear error A-97 T-11 £valuation llodule Monitor llAtRO VOS.00 Sund•• 13-Har-83 04:10 Pa!li! 58 POiler-uP Oiasnostics .SBTTL Seecial Data Structures 2 3 4 5 ;+t INSTRUCTION ENCODE/DECODE and COHHAND DECODE TABLES: The five para1eters listed for each opcode are: 11 Base value of the opcode 2. Strins na1e of the opcode 6 7 8 J. 9 Para1eter orsanization: 10 00 - decode condition code bits (N1Z1VrC) 11 01 - nnnnnn Cl6 bit nu1berl 12 13 14 03 - nnn (8 bit nuoberl 04 - xx. !8 bi\ diSl'laceoentl 02 - no Para1eters IS OS - r.dd 16 17 18 06-ddorss 07 - ss.dd 1-0 - r 19 4. 20 21 22 23 24 25 26 The fifth para1eter is a code used b~ the top-level Parser to decode ASCII characters in the o•o to 077 ran.Se. The values of this Paraaeter are: 0 - lllesal character at to• leYel l - Interpret as tile first character of an expression or instruction 2 - :, or label definition 3 - ;, or couent 4 - •r or s!:lllbol definition 5 - ?1 or tYP-e as a nu1ber 6 - Valid JS an OPerator within exPressions 7 - Doth 1 and 6 aPPl• 27 28 29 30 31 32 11 - r'nn (6 bit disPlace11entl Eauals 1 if instl'IJCtion is le!ial in b'Jte 1ode ;-- 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 S2 53 S4 SS S6 57 .llACRD CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE INSTRS 000000,<HALT 000001,<W!IT 000002, <RI I 000003.<BPT 000004.<IOT .. >,2,0,0 )12r016 >,2,0,0 ),2,011 >12r0tl 0000051<RESET >121010 000006,<RTT )121016 0-00007,( )111011 000100' <.NCP )161010 000200,(RTS )1101010 000210r( )1l10r6 000240,<NOP >121017 000241,(CL )101010 000257.<CCC )121017 0002601( >r11011 000261,<SE >r01016 000277,<SCC )r2101l .,;space 000300,(SWAB 000400•<BR 001000.<BNE 001400,<DEO 002000.<86£ 002400•<BLT )161011 ;i )r41011 ;2 ;3 A-98 >1~1011 )r4101l }141011 >r•hOrl ;• ;t ;1 ;x ;1 ;• ;c ;) a ;+ ;, ;;, ;1 ;o H ;s ;6 T-11 Evaluation KoOOle Konitor KACRO VOS.00 Sund•• 13-!ar-83 04ll0 Pa<e 58-1 SPecial Oata Stn.tclure; SB CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE CODE COOE CODE .END! 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 7B 79 BO Bl B2 BJ 84 BS 86 B7 BB 89 90 91 92 93 94 I'S 96 97 98 99 100 101 102 103 104 !OS 106 107 155600 10B 155602 109 155604 110 155606 111 155610 112 155612 113 155614 114 155616 000241 000242 000244 000250 000261 000262 000264 000270 CBASES::.WORD .WORD .WORD .WORD .WORD .WORD .WORD .WORD 0030001(1!6! 0034001<11lE 004000o<JSR OOSOOOo<CLR OOSIOOo<CO! 005200,<INC 005300o<DEC 0054001<N€G 005500 •<AOC 005600o<SBC 005700o<TST 0060001<ROR 006100o<ROL 006200o<ASR 006300, <ASL 0064001< 006700o<SXT 007000.< 010000.<llOV 0200001<C!P OJOOOOo<BIT 0-4-0000o<BIC 050000o<8IS 060000 , <ADD 070000·< 07400(h<XOR 075000.< 077000o<S08 1000001(BPL 100400o<B"I 1010001 <BHI 101400o(lll0S 1020001<8VC 102400.<BVS 103000r<tcC 103000o<BHIS 103400o<BCS 103400r<8LO 104000r<E!T 104400o<TRAP 105000« 106400r<!IPS 106500·< 106700o<MFPS 107000·< 160000o(StJB 170000•< 000241 000242 000244 000250 000261 000262 000264 000270 A-99 ),4,0,1 >14,0,1 >1Sr011 )r6rl12 >161113 )r61lil >161114 ),6rlr0 >1611r5 ),61110 )161110 )16'110 )161110 )16rl10 )16'110 )11,0,0 )r61010 ),1,0,0 >171110 )1 711'(1 )17t110 >,1,1.0 >171110 >171010 >111010 )151010 )r1r010 >r1li010 >141010 )141010 >141010 )141010 ),4,0,0 )r4r0r0 )r4r0r0 ),4,0,0 >1~1010 >.~,o.o )131010 )1J1010 >tl10tO )16rOrO )111010 >16r010 >111010 )171010 >111010 me ;cLV iCLZ iCLN ;SEC ;sEv iSH ;sEN ;7 ;a i9 . ., "h i= ..., j) T-11 Evaluation Module Monitor HACRO VOS.00 Sund•' 13-Hac-83 04:10 Pase 58-2 Si:-erial Data Structures 115 BASVAL, HNEH• FORMAT, BYTHO[I, MISC ,HACRO CODE .WORD BAS VAL .ENDH BASES:: JNSTRS 116 117 118 119 155620 120 121 122 123 124 156034 BASVAL ,HNEH,FORHAT ,BYTH0[1,HJSC .HACRO CODE .BYTE <BYTH0Dl200>t<FORHA Tll0: msc ,EN[IH PARAl!S:: !NSTRS 125 116 156142 127 156146 128 156152 129 156156 llO 156162 131 156166 m 156172 133 156176 134 156202 135 156206 136 156212 137 156216 138 156216 072460 072530 072600 072650 072720 072770 074500 062170 063370 111100 127400 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 139 156222 010530 000000 Ho 156226 010600 000000 141 156232 142 156236 143 144 156242 145 156246 146 156252 147 156256 148 156262 149 156266 150 156272 151 156276 152 156302 153 156306 154 156312 155 156316 010650 000000 010720 000000 031324 027030 074745 062073 0620'3 032153 054740 07b464 046531 131014 127726 127736 156 156322 127473 157 156326 127551 158 156332 131247 159 156336 127534 lbO 156342 127534 161 156346 003243 162 156352 011366 163 156356 021411 164 156362 010174 165 156366 035203 166 156'71 012245 167 156376 014724 168 156402 111052 169 156406 170 156406 070530 171 156412 075265 062000 000000 062000 075630 075700 076400 060314 042300 014400 004444 014400 020560 012061 076710 070440 042420 044130 057665 011624 076400 017500 077745 004420 021145 014400 017574 007344 DSYHS:: .RAD50 .RADSO .RA!1SO .RADSO .RADSO .RADSO .RADSO .RADSO DSYHf'S: ,RAD50 .RADSO .RADSO DSYHUR: .RAD50 .RADSO ,RAD50 .RA050 .RAD50 /RO /RI I I /R2 /R3 /R4 /RS /SF' /PC /PS /WP /, I I I ! I I I /f:t /B2 I /BJ /B4 I f1IRVRI1:: .RAPSO /HELf· I .RAD50 .RA[•50 DIRVBl: ,RAD50 ,RAD50 ,RAD50 .RAD50 .RAPSO ,RADSO .RAD50 ,RAll50 .RAD50 •RAD50 .RAD50 .RA050 .RAD50 •RAD50 D!R'JBA: ,RAOSQ DlRVBB: ,RAI1'50 PIRVBD: •RA[ISO DlRVBH: .RAI150 DIRVBI: .R:.oso /GO /STEF' /PASS~ ! I /PASS2 I /HOST I /NOHOST I .'TALK / /LOAD ! /,START/ /, ErHI I /.EVEN , /,ASCI!/ ! 1BYTE / /,WORD I 1'. Bl~B I / ,BLKW , IASSOLU/ /CANCEL/ IEXlT I /BYlf i INSTF;!J · ,RA{!50 /CLEAR I .RAD50 /[l£L£ 7 E/ DJRVBN: ,RAD50 /WORD I DJRVBO: Dlf:VP.f': .RAD50 /REf'EAT/ D!RVBS: ,F:A!l50 /SYHBOL/ 1 A-100 ;Predefined s~tbol~- tlJsl riot. be 3 ;i13rcct.ers H1 ;1ensthr or ttlse a 'b1::te 10<1e' 1ersh•n of each ;r1a1e will also 1atch' i.e. XYZB will match lo iXYZ. Oril~ b':lt.e niode rine1tor1ics sho1Jld be 3 icharacters Ions. 1 T-11 Evaluation KodulP Monitor HACRD V05.00 s~ecial Data Structures 172 156416 I 73 156422 174 156426 175 156432 176 156436 177 178 156442 179 156446 180 156452 ISi 156456 182 156462 183 156466 184 156472 185 156476 186 187 188 189 190 156502 191 192 074017 074017 074017 106257 106257 110727 111225 DIR\'BT: , RADSO /SHOW/ID/ .RAD50 !>HOWF:[: .RAD50 /SHOWSY ' 053600 023160 .RADSO i~ TON .RHD50 /VTOFF I 012266 000000 012272 000000 012256 000000 073613 000000 073636 000000 0736l2 000000 073626 000000 1 CHNEHS:!.RADSO . RAD50 ,RADSO .RADSO .RADSO .RAD50 /Cll' /CLV /Cl:' /CLN /SEC /SEV , RAD50 /SEZ I .RAD50 /SCH BASVAL•HNEH·fORHAJ,FYTHOD·HISC .MACRO CODE .RADSO 'K:~EM" .EHDH HHEHS:: INST•'$ HNEHS\064 HNCCC i I eris.th of Precediris RA050 table , - DSYHS TOPNAH -- -- T-11 Evaluation Kodule Monitor tw:RO V05,00 SPecial Data Structures Sur1da~ 13-Mar-83 0-4:10 Page 59 ,SBTTL SPare Locations, CheckSUI• and Rffi't I1D1 2 3 4 5 6 7 8 9 10 11 000642 12 13 14 15 16 17 lB 157774 052744 19 20 21 22 23 24 157776 010 25 157777 010 26 27 160000 140000 13-Mar-B3 (4:10 Pase 58-3 111321 012m 000000 156566 000770 Sur1da~ it+ The locations derined b~ the following directive are free and 1ust be zero for the Power-uP diagnostics to war~- PfOF'erlY. When adding code in this sPace or chansin! ariY of the F-revious code, ed.iust lhe checksu• value at OECKS = 157774 so that the ROMs ~s ~ whole will have a :era word chetksu1. ;-.REPT .BYTE <157774-.> 0 .ENDR ;+1 The following word ad.iusts the Rott checksua lo zero. ;-- CHECKSll.WORD 52744 ;12-HAY-83 R. Arno\\ ;++ The lost b~te in each of the ROHs is used to identify lhe ROMs, ;-- ;version 1,Q, low b~te ;version I.Or hi9h b!:lte LO.ID!! ,BYTE HI.IO!: .BYTE 010 010 EHD!! START ,END A-IOI T-11 Evaluation "odule l'lon1tor HACRO V05.00 Sunday 13-"ar~BJ 04:10 s~1t>ol p,.. 59-1 table ADDIT mm G ADRCHK 154610 G ADRCHl 154524 G AORCH2 154S30 G AOVAJ1R, 007334 G ASCO\Jl 133626 G ASCRAD 154416 G AUXFLG, 007711 G AUXIN , 000120 G AUXOUT• 000124 G AICREG, 177452 G AIRBUf, 177550 6 AISREG' 177552 G AIXBUF, 177450 G FAS ES 155620 G BCDKEY 140050 I: BC[l18L 136522 BIHASC 154214 G BIHASl 154254 G BLN!;DS 136350 BLNKHl 136344 G lllNKLO 136336 6 BL DAO 150442 G BOTTOH, 1)()7346 G , 007630 6 BP BRANCH 153266 BRDISP 153024 6 BREAK 137114 6 BRKFIL, 007760 G BRKPT 137174 G BRKPl 141466 BUFFER, 007470 G CANCEL 142246 G CBASES 155600 G CHECKS 157774 6 CllKSUH 155560 6 CHROUT 133530 6 CHROl 133540 G CHR02 133554 G CL RAPE 151146 CHllEHS 156442 6 CHOHIT 142724 G CHON! 142572 G CHOH2 143164 6 CHON3 143216 G CHON31 143224 CHON4 143246 6 CHONS 143604 G CHON6 143616 6 CHIJH7 143652 CHTLC , 007344 G CO HACH 152670 COHLUP 143646 CONBRK, 0001<0 G COHCOD 153172 G COHFLG' 007710 6 COHIN • 000060 G COHOUT, 000064 G CONTIH 143612 G COUHTl' 007340 G COUNT2' 007341 G 133524 G CRLf CURCOH' 007326 G CIRBUF, 177562 G CIRCSR, 177560 G CIXBUF• 177566 G CIXCSR, 177564 G DEBNCE, 007704 6 DECDSP 140030 G DELETE 147444 G DELIH , 007345 G DELSYK 151674 6 DGDISP 140014 6 DIAGllO !5S334 G DIG EXE 1<0542 6 DIRVBA 156346 DIRVBB 156352 DIRVB!r 156356 DIRV!IH 156362 DIRVBI 156366 OIRVBN 156402 nIRVBO 156406 DI RV BP 156406 DIRVBS 156412 DIRVBT 156416 DIRVBI 156256 DIRVRB 156242 6 D!SPLA 135344 6 DIVID 152164 G DOCOIVI 144124 OOCR 144170 G DOEXPR 144274 G DOFUNC 142226 6 DlllABL 151426 G OON\IAL 144134 OOOPER 145124 OOSYHB 151164 G DOVE RB 147172 G DSPDEC 136366 6 DSf'DIG 135772 G DSPLNH 136044 6 DSPHAK 136112 G DSPNUH 136050 DSPT!L 140360 G DSPUHH 136036 G DSYHPS 156~02 IISYMS 156142 G DSYHIJR 156216 EABS 146150 G E9YT 146176 6 ECAH 146156 G ECHO 134142 G EClR 146222 G ECON 146354 rnEL EDELi EERR EEXT 146232 G 146240 140360 146320 G 14656-0 G 146210 G 146760 G 146364 G 153152 G 160000 G 145002 146270 G 146332 G W276 G 143212 G 143720 1357S6 146312 G EXDOOP 145220 EXINIT 145172 EXINll 145200 EXF'FLG' 007332 6 fERCHR 1:!7~42 G FERRO!l 137350 G 150114 6 FIND FIXBP 140170 FLAGS!= 007706 6 fHESAG 137424 G FHESGI 137434 FKESG2 137450 fKESG3 137472 FHES64 137522 FHCDON 142264 FNCTBL 1-42234 G , 007631 G FP FPAAEN 145162 FULOPR 152364 G F.ADS, 000002 F,ADDR, 000004 f,APPL, 011)()00 F.A64X, 000200 F.BRKA, 000400 F,BRKG' 001000 f , BRKS, 000020 F, BYTi>' 000001 F,DYTH, 000200 F, CHAH 000002 F, COHM 000020 f,CPBO, 001)()10 f,CPB!c 000020 f .CPB2° 1)()0040 f,DATA, 000001 f,FUNC, 000040 f,HOST, 004000 F.IHST 000100 f,KfYp, 002000 F.LDST, 000100 Efllll ElNS EHOD EHOV EHTRAP END ENI•EXP ENUM EREG EREP ERROR ERROR2 ERRSEG ESYH 0 0 0 A-102 f,LOAD, 000200 f .HNEH, 001)()01 f,NULL, 000004 f .PAS!, 100000 f,PROl, 040000 f,REG, 090010 f.SAVX, 000010 F.SST, 000200 F, SSTl, 000001 F, STOP, 000002 F, TBAS, 020000 F.UNDF, 000004 F,USER, 000100 F.USRD' 000010 F.VALLI, 000002 F.VT , 004000 GENEXr 144512 G GETAR6 152642 G 6ETBP 133436 G 6ETCH 133316 G 6ETCHC 133412 6 GETDSl 1536..S2 GETERH 144556 6 GETEXf' 144522 G GETEXI 144540 GEllNS 152206 G GEJKEY 140044 G 6ETLCH 133406 G GETLIN 133240 G GETLIT 146060 G GETNAH 145450 G GETHHB 145306 G GET HUH 140054 G GETNXl 133426 G GETOf'R 144724 6 6ETOPV 144720 G GETREG 152322 G GETSYH 151560 G 6NEXAH 141146 G 147432 G 60 601LED 142270 G 6RET 143052 147320 6 HELP HEXSEG 13-lOlo G HfP ' 007072 G H6f.TCH 134744 6 HJ. ID 157777 G HOST 150222 G HOSTBF" 007632 G HOSHN 134540 G HSTFLG 007673 G INSDHl 152744 INSDN2 152760 INSDON 1:.2770 INSDSP 152276 INTDON 153564 INTDSP 153514 0 IOI HIT IOVECT ITRAP KADRCH KEYBCD KEYCHD KEYCHl 135076 G mm G MATSYM 151632 G 137334 G 1421s.:. 136514 G 140330 G 140344 G mm 136H6 G KEYS£! 13WO f[YPIV• 007076 G KEYPVS, 007700 G •LOOP 140106 G KLOOPl 141170 KLOOP2 141644 KHONIT 140200 G LASCOK, 1)()7J:7 f, LASLIN' 007325 G LEDl'J , 000104 G LERR 15om LEVEL , 007333 G LINEIN 133000 G LIHFLG' 007324 G LOAD 150442 6 LOBLNK 140040 G LOD!Sf' 140024 6 LOGAN[1 152134 G LOGOR 152130 G LO.ID 157776 G LPAREH 145046 HF8251' 007464 6 HNCCC ' 156566 6 HNEHS 156502 G HODE : : 007342 G KONITR 140010 G HONITl 137556 c HOVE 150044 G HULTIP 15~142 G NAKTBL 136154 G HOHtlST 150306 G NOPCtlD 153540 G HOPROT 150134 G HPROT 142562 G NUHCH 154356 G NUttGET 136546 6 Q[r[rADR 154512 OPERA!, 007343 G Of'F:AND 153a!6 G OPRTBL 145250 OPTION 1503~i OVERFL 143104 PADRA[1 146050 PADRl 146040 PARMS 156034 G PARDSP 144104 PASS! 150202 G f'ASS2 150212 G T-11 f11aluatiori Module Hcnitor MACRO VOS.00 Sunda<J 13-Mar-93 04!10 f'ag:e 59-2 SY1bol ti!l>le Pl•SUAL 145670 G PERltOD, 007331 G PfUEC ' 000024 G PRINT 133766 G PRINT A 133754 G PRINT! 134004 G PRINT2 133774 G f'RIHT3 134014 G f'R!HT4 134010 PR NE RR 143120 G PROTEC 150172 G PURGE 133450 G PllRFVS' 007674 6 PICREGo 177446 G PIPORA' 177440 G PIPORC 0 177444 G f'lf'ORD' 177544 G PIPORf: 177542 6 PIPOROo 177442 G RAl•CH 154302 G REGDST 152724 G REPEAT 0 007466 G REPOFO 151412 RERR 1'50152 RPAREN 145152 RSTART 140004 G RTSREG 152714 G R!X40 134122 G 160000 000000 000 001 Errors detected! 0 • ABS. SAUEXP' 007336 G SCRPADo 007400 G SCRPDl' 006500 G SEGBUfo 007712 G SETAUX 135170 G SETAXI 135126 SETAX2 135124 SETH OD 146104 SLUTS! 155454 SLU.1 155472 SLU.2 155504 SOBDSP 153102 G SPCLBf o 007726 G SPDTBL 142302 G SPEEDS 142320 G SRCDST 153006 G STAl:K ' 007462 G START 140MO G STEP 147416 G SUBTR 152160 G ]AU( 150504 G TALK! 150530 TBLBOT' 007462 6 TBLFUL 151504 TBLTOP' 007320 G TBRDSP 153734 G TCOHHA 153602 TCOHCD ll1132G TEHTRP 1~3721 G TFULOP 153750 G TIME , 007730 G THPHOD' 007330 G TOPHAM' 000770 G TOPRND 153551 G TPREG 153612 G TREGIS 153636 G TRGDST 153574 G TRTSRG 153566 G TSOBDS 153676 G TSRDST 153544 G TY PA DR 1ss2so G TYPASC 154634 G TYPDEC 154660 G TYPINS 153300 6 TYPUN 155202 G TYPLOC 155100 6 TYPLOI 155170 G TYPLOI 155114 G TYPL02 155132 G TYPNH1 155076 G TYPNUH 155064 G TYPOCT 154W G TYPREG 151730 G TYPSPC 155042 G IRW,f,GBL,ABS,OVR> IRw.r.LcL.REL•CON) lSt Asseabler stotistics Wor~. file reads: {l Worf file writes: 0 Size of 1.1orl file: 1{1760 Words I 43 Paoes) Size of core Pool: 13312 Wards 1 52 P,;isesl 0Peratirl.!i ssstee: Rl-11 ElaPsed ti1e: 00:02:30.51 DK!HON21DK!HON2/C 0 DK!HON2 A·l03 TYPSYH 152102 G TYPTBL 152040 G UCSAUE 137004 G UNDEFX 15ll72 UPBLNK 140034 G UPD!SF 140020 G USERAH 154476 USER!U' 000100 G IJSERVS' 007702 G 150142 VCON VERR 150146 VERRl 150162 VRBDSP 147220 G VRBl•Sl 147262 VTJHP 147402 VTOff 147406 147374 VTON WHM 143076 IADDR ' 007756 G IAD[IRK 141550 G IAf•V 141232 G mo: 141372 G IBRKP 141462 G 141110 G ICLR IEXAH 141122 G IFUNC 141650 G IGO 141714 G IGOl 141722 G IHALT 136752 G IHONIT 137570 G INULLI 135676 G IHUHER 140430 G IPC = 007750 G Sf'S = 007752 G IREG 141610 G IRPEAT 150012 G IRO = 007732 G IR! " 007734 G IR2 = 007736 G IR3 007740 G IR4 :: 007742 c, $R5 ' 007744 r, ISf' ' 007746 G 141706 r, ISST !START 136660 G IUR = 006500 G !WATCH' 007754 G $, A~-CI 14'700 G l.BLfl 147634 G l.BLKU 147654 G I.BYTE 147466 r, I.EVEN 147776 G 0 l.STn 15034-4 1,WOR!t 147560 G APPENDIXB SCHEMATIC DRAWINGS ... ........... J:J I .. •JZ• .. I J4 .•••••••••••• ............. + + + + a lD w ("') l/l w ! - - - - - - - - - - - - !?f>!l.i60MMl 10.40 F.B.S. ----------------1 Figure B-1 DCTl 1-EM Component Placement B-1 PROCESSOR CYCLE OECOCf: ADDRESS LATCH £22 TI TI Tl Ti Tl Tl Ti Tl EAI 7 H EAI 6 H Tl SAL 15 H TISALl4H TISAL13H Tl SAL12 H Tl SALi l H EAI 5 H EAl 4 H EAi 3 H EAI Z H [Al I H [AI ID H Tl [[ACK L TtSALllDH Tl SAL9H Tl SAL 8 H Tl ECOUT H Tl EPI H Tl ERAS l Tl ECAS l Tl EOMG H Tl ESEL () H Tl ESEL I H Tl EWLB L Tl ECAS L Tl EWHB L T2 ROY L Tl ECAS H Tl DAL'tH Tl ED8tN l Tl READ H----~~.U Tl TCU< H Tl EWHBL-~~-~---.._ Tl BCLR L ·><>-~--------- Tl EWRH l TISAL7H TISALbH Tl SAL5 H Tl SAL'iH TI SAL 3 H TI SAL 2 H Tl DAL 3 H TIDAL2H TIDALIH Tl DALID H Tl EWRL L Tl EDMGL--tt-----;l!~~!__----~ Tl HBDIR H Tl EDBIN L--t+----"2+f.:.E~2o_!7/ TISALIH TISALllH Tl TCLK H Tl ERES L TIBCLR. H ''!><>"----- TI READ H T4 PC3 H +5V TIDCLKH TI D A L l 2 H - - - - - - ' Tl ESEL I H---------~ Tl EOBIN L - - - - - - - - - - - - - - - ' JZ - - - - - - - - + 12V .,_---~--+5V oa be8UF Tl T(L.kH +5V +5V TEB Tl DAL 15 H Tl BCLR H Tl )ALIS H Tl CALl4 H TIDAL13H Tl DALl2H TIOALllH Tl OALlltiH Tl DAL Q H Tl DAL BH Tl EDBIN L T2 ESEL L TI Tl TI Tl TI TI TI TI o:i I DAL 7 H DAL b H DAL 5 H DAL 4H DAL' H DAL 2 H DAL I H DALIJ H IZ 1 TZ ARD I)( L TIDALt3H C1 4J +sv E2' 2K l > ' - - - ! - - - L - - - - - TZ ROY L ----1<"/ E \I AWA TOR DATA BUS BUF"FER T 2 06 7 H T2 l 8 b H T 2 DB 5 H T2fi84H T 2 OB 3 H TZ f·B ZH TZ OB I H T2 DB 1 H STA~T Tl DAL 14H T2DBISH T20814H T2 Ofl 13 H T2D812H T 2 OB It H TZDBllJH T 2 DB Q H Tl DB 8 H " PERIPHERAL (HIP DECODER TI DAL I I H lb BIT MODE Tl DAL,Q H RffRESH ON Tl DAL 8 H NORMAL WRITE 74LSl38 E26 12 Dro TISAL3H Tl SAL4 H Tl SAL SH Tl SALO H T2 PPI L T2 PCI L T2 DLART L Tl E\JLB L Tl TISALllH Tr SAL till H TISALQH TISAL8H Tl EDBIN l TZ ESEL l ADDRESS J41llGIJI• Tl ECAS l L TISAL7H \.;.> T2ACISJ:i T2 A014 H T2 ADl3 H T2AD!2H T2AD!IH T2 ADIQIH T 2 AD 9 H T2 Ml 8 rl TIHBCIRH Tl CALEN L T2 AD 7 H Tl AO 6 H Tl AD 5 H Tl Afl 'I H Tl AO 3 H TlAC2H Tl AC I H Tl AD ¢1 H TI flAL IS H TI DAL t'I H Tt[lALl~H Tl TI Tl Tl DAL I ! H OAL I JI H DAL 9 H DAL SH USER OATA 'eus BuffER T ! I AL 7 H TI DAL 6 H TIOALSH T! DAL 4 M Tl DAL 3 H Tl DAL 2 H Tl f\AL t H Tl DAL© H E2l 2K R2 'Tt DAL12 H IU T! ECOUT H T2 COUTH Tl EPI H T! ERAS L Tl ECAS L Rl Tl ESELGH TIESELIH TIEOMGL Tl EDBIN L I .. I •• +5V (l't) EZl (1'tl2K 7 T2 PIH R4 T2 RAS l SI HALT R5 1•• 1•• 1•• TZ CAS L Rb T2 SEL (I L +5V R7 T2SEL1l {l'f) • b ' - ' - , - - - T2 PF l r--="-' (14) L---------l~--- I NC 10• T2 01'16 L NO 52 R9 Ill Al7 2.lK AB INT Tl OBIN L .,. .,, ~ ~ ::zi: Tl SAL 7 H Tl SAL 6 H 2 •• ...' .. I A7 'A5 TISAL"iH TJSALlfH • AZ TISALJH TISALZH Al ~A<il Db~ TZ Dll'tM De;~ TZ DllJH I A8 z AT Clftfi-- TZ OBIZH D'ltf-- TZ 0811 H ii AC> lfA'i DZ~ Tl DBllH OJ~ TZ 08QH ot ~A't bAil 8~ TZOBBH •• Tl SALIM 5M T~~!:~__J Tl EWRL L ~ 07g_._ TZ D87M 06~ TZ DlbH or;tlt-- TZ oer;H OP.f~ TZ DB 1tH OJ 1 TZ081H TZ DBZH 01~ .' r; r----! r---'; TZOllH D t f 2 , . - TZ OllH r;:::::t ~ ~TZ0811tM ~TZ081JH ~TZ DllZH ~ TZ 08 7 N ~ rz oe•w DISH ~ Tl TZ 08 .. H JJ I z ?.--- Tl DI lN •' ,------, f.f-- TZ 0811 H ~TZ D811H tk!--- TZ DI <ii H fL-- T Z 0&8 H p 11+-- TZ DBZH ~ rzr·11w ti-- TZ ['1111 H r----i ks1,e1z.rl1 TZ AAOI L ::ZJ f,?-- TZ DI 1"1N I z ozf..!---- 5,.P'I" TZ ARDI L. ~ XE'2 •Ea> ..1.• All 07.g__ Tl 08 flj H ,. rsocKEfl EZI q q All TISALllH Tl SALllH Tl SAL Q H Tl SAL 8 H ~ I Tl [WRl. L Tl [WAHL . - - - - - - - Tl EAi 7 H , - - - - - - - T l [AlbH [Al 5H r - - - - - T I EAi 'tH ~----Tl TZ 08 1 H TZ 08 b H TZ OB 15 H TZDBllfH TZ DB Iii H TZ OB IZ H TZ DB II H TZDBllH Ell 2• TZ DB r; H T2 08 't H TZ OB ii H TZ 08 Z H TZ OB I H T2 OB II H TZ DB 9 H TZ 08 8 H .---'-'-"'"-''"',...-Wt) ,, E2T--, I I I lK I L-. 11 Tl EDBIN L +5V (llf) I l _.J • TZ HALT L Ti; INTF L Tit tNTB L Tl INTA L AIP'-------------''flA• T'i (NT7 L: Tc; INT& I..: T'; INT'l L T'i INT2 l :~l>""---·-+-------__,,,~~~ZAZ 17~:! T'f Ol'IR L Tl EAi I H Tl EAi I H Tl EAi 2 H Tl .EAI 1 H Ell TZARDIX L TZARDIX L Tl EOBIN L ... TZ PF l.: II ;:Al 65 ,.. Ell l'i 16 Tl (Pl H--.!.il'<l5f~"-----'--' H Al7H H AIC:iH H AISH HAl'-H Tl AI I H HAii H HA(,ZH nAtlH 74LS3H 3 DI f,_;,------~-------~ T2 OB 7 H TZ DB b H 12 oei:; rz os .. >'-"'--------+-.._---------'.i7 02 >-"--------+-.._..~------"lB 03 12 083 l - ' - - - - - - - - + + - i - + - . - - - - - - ' - ' 18 1 04 17 oi:; ~-------++-l-~~-------'-'l 14 Dti 1-'---------++-i-~,.+,----~ T 2 082 H >-'--------+-.._..+--<-H~-----<P 07 OC T4 PB 7 H T4 PB b H 14 PB<; H 7"+S2i+IZ E~7 4 DI F-------+~-------"< z IAI ROCl>·µ2~--------------''I E~b 4 IA2 ll. Rl(l)~~'------------------':!.1 b IA3 R2rn~•'----------------'"l 8 IA"+ R3(1)~·'-----------------'0l Rl5 .., "' Ri'7 Rib I 7 ZA"+ A4(1)~1 ~·-------------'-'-l Rl8 6-------------.!.21 I 5 2A3 Rsm·µ'-" "' "' "' Rt9 I 3 2A2 RMD•µ1 -'~--------------'-ll """' T4 UDP L T4 UG L T4 UF' L T4 UE L T4 UD L T4 UC L T4 UBL T4 UAL R21 I I 2AI R7W~1 ~2 --------------'-.!.1 EN T4•P8'tH Tl EDBJN L TI EWAL l Tl BCLRH z IAI T4 PB 3 H T4 PB 2 H T4 PB I H T4 PB I H 't IAZ T4 PC 3 H T4 PC 2 H T4 PC t H b IA3 SIA"+ 17 2A4 15 2A3 t l 2AZ T 4 PC I H 1 I 2AI IG ll. '" IY2 JI 18 lb RZl IYl RI~ "' "' "' "' Rib RZ7 R28 20 "' T4 LOP L T 4 L6 L Tit Lf L T 4 LE L T4 LO L T4 LC L T 4 LB L T4 LAL T4 lolL8 L E2l 2• + 5 v -'"-'~"'--'-'--= Tc; 0(, 4 H T'} 06 3 H TS DG 2 H TS DG I H DB (\ Di"' e tN'tl48 IN'tl40 D.,_,,.IN4148 DS IN41't6 D" T<> 06 Q H IN4148 7 14 WHB L Tl (\llHSL E2l 2• ' 2 ~~ +5 v ----' :...'":;>.,,....:.•~ " ' . 2 II 12 AD 3 H + ~v T4 PC 5 H TZ AO l.f H rz AD'> H TZ AO 6 H TZ AO 7 H TZ A09 , T2 AO 11 H T2AOl2H T2 A013H 12 AO!l.f"' TZ AO 15 H BAI II H HAI I BAI 2 H T3 AI 3 H n AI If H T3 At") H Tl AI 7 H T4 PB I H '" '" RESET L PB I H T4 PB 2 H T4 PS' H T4 PB 4 H T4 PB") H T4 P9 b H T4 PB 7 H TZ HALT L TZ PF' L T4 DMR L T4 INTB L T4 RESET L TZ PIH Rl8 Rl• T2AR0t7L T4 IACK L TZ Ol"IG L TZSELIH T 2 SEL T4 WLB l T4 WHB l T4 PC 7 H IK H BAI 6 H TZ ARD 3 L I IK H T2AOlllH T2AA02L Rle Tl EAES L H T2AD8 H T4 I/EC L . T4 PC 't H T4 PC t> H 12 AD I TZ AD 2 H Tl E01"16 H • 6 T2 AO I H eH TZ RAS L ""° IK + ~v ""' T 2 CAS L T2 OBIN l All IK Tl EIACK L " T Z COUT H T4 lACK L T2 ROV L NUMERIC DISPLAY UPPER LEFT DlGET E52 "" E50 T4 UAL T4 UF L C.2 ('17 UPPER RIGHT DIG ET T'iINT3L <31 T'ilNTZL • ll Tc; DG 3 H T'i DG 2 H Tc; DG I H re; DGll H '" LOWER LEFT E51 '" E•9 E•l T4 LAL T4 LF L E"I ... ." ,. ElO G II T4 LOP L T4 LB L ( T4 LG L T4 LC L o• T4 LD L ANODE ~ I 15 06 5 H T'i 06 ... H TS 063 H T'i OGZ H T'i 06 I H T'i 061 H 0\ l 8251 Ell TZ007 H TZOac H T2005 H TZ DB 4 H T2 DB 3 H T2 082 H T2081H T2 0811 H TZ PCI L rt SAL I H Tl EDBIN L TI EWRL L Tl TCLK2H T!BCLRH T'i POSR L T'i PCTS L T'i BRCLI< H LOWER RIGHT DlGET DIGET ;J TZ OB TZ DB TZ D8 TZ DB AN '" '" THRU re; INTF L T4 UD L T4 UE L C• t=•ll'+7UF T4 ue L T4 UG L T4 UC L T4 UDP L + +>v~~,---~~~~--,1 '" DH. AUXILL6.Rr CZ I CllUF 15' ·~ T'i 06 It H ... "" 7'tl4'i ,. " '""" • +12v DTE T') LJG I H 82 T'i 06 2 H F2 T4 PC I H 9 F7 F8 10 T4 PC 3 H FQ 11 ~T5DLSIL Ell "" Fb .]_ T4 PC 2 H k"4 82 E58 T4 PC Cl H CONSOLE kl• 82 T'i POTA L T'i 06 3 H 82 re; PRTS L TS DLSO L T') 06 't H Rlb 271 DI LED I T'i OG c; H C5 HOPF . R•2 , -12v re; Peso L T I Ct. HOPF C7 HOPF 1 CB lllPf ""' IOI APPENDIXC ERROR MESSAGES C.1 DIAGNOSTIC ERROR MESSAGES The following flashing error messages are displayed if the DCTI !-EM fails its diagnostic tests. These are fundamental errors and must be corrected before you attempt to do anything else. UPPEA DISPLAY LOWER DISPLAY MEANING I I I I,I I I I I I·I·I I II I j j II I I I I I j I I I I·I·I I·I I I I I I I IEI ·I·I I·I E 2 J , , 0 2 1 0 I EI · I · I· 0 I IE 3 0 1 1 AAM cha::ksum test failed. Try replacing RAM chips. ROM checksum test failed. Try replacing ROM chips. RAM and ROM checksum tests failed. Board may have major problems. OLART feedback test failed. Board may ha11e major problems. C.2 KEYPAD ERROR MESSAGES If the DCTI I-EM detects an error while you are using the keypad, it displays a flashing error message on the upper and lower rows of LEDs. The upper row of LEDs displays a two-character error code and the lower row of LEDs displays: The entire error message disappears and the OCT 11-EM is returned to register mode when you press the HALT switch or any key on the keypad. The keypad error messages are as follows. UPPER DISPLAY I I I I· I I I b LOWER DISPLAY MEANING You tried to e;..:ecute a program with a BPT instruction 1n it. A break was detected on the console terminal pan while the keypad was active. C-1 You tned to execute a program with an invalid mstruction m it. You tried to execute a program and used an unacceptable value for the SP. See chapter 5 for more information. You tried to a!ter a protected location in the keypad monitor scratch pad (locations 7400 through 7776). C.3 CONSOLE MESSAGES The console displays 12 different messages (Table C-1). Most of these are error messages that indicate a problem with your input or with the execution of your program. This paragraph explains each of the messages and its probable causes. Some of the error messages are preceded by the portion of your input that caused the error. If this is the case, your erroneous input is displayed between backslashes on the line above the error message. C-2 Table C-1 Console Messages Message Meaning BRANCH OUT OF RANGE You input a branch instruction which was too far from the branch destination. Recall that branch instructions have a range of -J28 to 127 (decimal) words. BREAK POINT ENCOUNTERED A breakpoint (Bl, 82, 83, or 84) or a BPT instruction was encountered while your program was executing. BUFFER OVERFLOW The console monitor was accepting input from a host and a line exceeding 96 characters was received. As with all errors generated during host loading, this error stops the OCT! 1-EM from loading further input from the host. CONSOLE BREAK The BREAK key on the console keyboard was pressed. If you are executing a program, execution stops and the DCTJ 1-EM internal register values at the time of the break are saved. If you arc in HOST, TALK, or LOAD modes. CONSOLE BREAK causes a return to NOHOST mode. INVALID INSTRUCTION ENCOUNTERED INVALID STACK POINTER NOT IN USER RAM An invalid op code was encountered while your program was running. The stack pointer did not have a value between 4 and 6500 (inclusive) when you started your program or when you single stepped. You attempted to alter a location that was in the protected monitor scratchpad area (locations 6500 through 7777, inclusive). ODD ADDRESS You attempted to access a full word in RAM on an odd address bounda~ Use the BYTE mode to examine or alter locations at odd addresses. REPEAT OF ZERO You input a REPEAT command that had a count of zero. TABLE FULL You attempted to define more than 66 symbols. UNDEFINED EXPRESSION You attempted to use an undefined parameter, operand, or other data object when a defined expression was required. For example, you referenced an undefined symbol while in PASS2 mode. WHAT'? You attempted to input a line that had a syntax error in it. C-3 INDEX A ABSOLU command, 4-7, 4-29 Address decoding, 6-6 Address pointer, 4-6 Address space, 5-13 standard RAM space, 5-15 expansion RAM space, 5-15 monitor space, 5-15 1/0 space, 5-15 for external hardware, 5-16 reserved, 5-16 Altering memory with console, 4-1 0 with keypad, 3-10, 3-32 Altering registers with console, 4-5 with keypad, 3-4, 3-32 .ASCII command, 4-21, 4-29 B .BLKB command, 4-21, 4-29 .BLKW command, 4-21, 4-29 Breakpoints canceling with console, 4-20 canceling with keypad, 3-27, 3-32 displaying with console, 4-20 displaying with keypad, 3-20, 3-32 setting with console, 4-19 setting with keypad, 3-20, 3-32 Buffers, 6-5 .BYTE command, 4-21, 4-30 BYTE command, 4-7, 4-30 c Cancel breakpoints, 3-27, 3-32 CANCEL command, 4-16, 4-20, 4-30 CLEAR command, 4-14, 4-30 Connectors, 6-8 60-pin (JI), 6-8 through 6-9 auxiliary serial (13), 6-10 console serial (14), 6-11 power supply (J2), 6-10 Console altering memory with, 4-10 altering registers with, 4-5 command summary, 4-29 connecting a, 4-1 control commands, 4-3 default modes, 4-2, 4-21 entering programs with, 4-12 examining registers with, 4-5 examining memory with, 4-7 host loading with, 4-22 input rules, 4-2 monitor, 1-1, 3-28, 5-1, 5-15 output formatting modes, 4-6 single stepping with, 4-17 transferring control to and from, 4-2 using breakpoints with, 4-19 using watchpoint with, 4-16 Console commands ABSOLU command, 4-7, 4-29 .ASCII command, 4-21, 4-29 .BLKB command, 4-21, 4-29 .BLKW command, 4-21, 4-29 .BYTE command, 4-21, 4-30 BYTE command, 4-7, 4-30 CANCEL command, 4-16, 4-30 CLEAR command, 4-14, 4-30 DELETE command, 4-14, 4-30 .END command, 4-26, 4-30 .EVEN command, 4-21, 4-30 EXIT command, 4-2, 4-30 GO command, 4-16, 4-30 HELP command, 4-21, 4-30 HOST command, 4-23, 4-30 INSTRU command, 4-7, 4-30 LOAD command, 4-24, 4-30 NOHOST command, 4-23, 4-30 PASSI command, 4-25, 4-30 PASS2 command, 4-25, 4-30 REPEAT command, 4-21, 4-31 SHOWMO command, 4-21, 4-31 SHOWRE command, 4-5, 4-31 SHOWSY command, 4-14, 4-31 .START command, 4-25, 4-31 STEP command, 4-17, 4-31 SYMBOL command, 4-7, 4-31 TALK command, 4-23, 4-38 VTOFF command, 4-3, 4-31 VTON command, 4-3, 4-31 .WORD command, 4-21, 4-31 CTRL/ A, 4-3, 4-24, 4-25, 4-32 CTRL/C, 4-3, 4-32 INDEX-I CTRL/0, 4-3, 4-24, 4-32 CTRL/Q, 4-3, 4-32 CTRL/R, 4-3, 4-32 CTRL/S, 4-3, 4-32 CTRL/U, 4-3, 4-32 CTRL/X, 4-3, 4-32 CTRL/Y, 4-3, 4-32 I INT switch, 3-25, 6-7 INSTRU command, 4-7, 4-30 Instruction format, 4-11 Interrupts, 5-5, 6-6 J D Jumpering, 2-4, 6-4 Default operating modes, 2-3, 4-2, 4-21 OCT! I-AA microprocessor, 1-1, 6-3 DELETE command, 4-14, 4-30 Directives, 4-20 Debugging, see Breakpoints, Single stepping, Watchpoints E .END command, 4-36, 4-30 EPROM, 6-4 .EVEN command, 4-21, 4-30 EXIT command, 4-2, 4-30 Error Messages console, C-2 diagnostic, 2-4, C-l keypad, C-1 Examining memory with console, 4-7 with keypad, 3-7 Examining registers with console, 4-6 with keypad, 3-2 Expressions, 4-3 K Keypad altering registers with, 3-4 altering memory locations with, 3-10 command summary, 3-32 entering programs with, 3-12, 3-16 examining registers with, 3-2 examining memory locations with, 3-7 monitor, 1-1, 2-3, 5-1, 5-15 number system, 3-2 single stepping with, 3-17 special functions, 3-26 cancel breakpoints, 3-27, 3-32 go with LEDs, 3-27, 3-32 release protection, 3-30, 3-32 set baud rates, 3-28, 3-32 start console, 3-34, 3-32 using breakpoints with, 3-19 using watchpoint with, 3-22 L LOAD command, 4-24, 4-30 G GO command, 4-16, 4-30 Go with LEDs, 3-27, 3-32 H Host Loading configuration, 4-22 example of process, 4-28 preparing a loadable program, 4-25 the HOST command, 4-23 the TALK command, 4-23 HELP command, 4-21, 4-30 HALT switch, 3-24, 6-7 HOST command, 4-25, 4-30 M MACRO-It, 4-20 Memory expansion module, 6-11 Monitor, 1-1, 2-3, 3-8, 3-28, 3-30, 4-2, 5-1, 5-15,6-4 Monitor subroutines, console, 5-8 through 5-13 ASCOUT, 5-9 CHR02, 5-9 CHROUT, 5-9 CRLF, 5-9 GETCH, 5-9 GETCHC, 5-9 GETLIN, 5-8 GETNXT, 5-9 INDEX-2 PRINTA, 5-9 TYPDEC, 5-9 TYPOCT, 5-9 using, 5-10 keypad/LED, 5-2 through 5-8 BCDKEY, 5-3 DECDSP, 5-3 DGDISP, 5-2 GETKEY, 5-3 GETNUM, 5-4 LOBLNK, 5-3 LODISP, 5-3 UPBLNK, 5-3 UPDISP, 5-3 using, 5-4 N STEP command, 4-1 7, 4-31 Subroutines, see Monitor subroutines SYMBOL command, 4-7, 4-31 Symbols defining, 4-14 deleting, 4- I 4 displaying, 4-14 symbol name rules, 4-13 Symbol table deleting, 4- I 4 displaying, 4-14 System specifications, 1-1 T TALK command, 4-23, 4-31 Timing, 6-7 Traps, 6-6 NOHOST command, 4-23, 4-30 u p User LED, 3-25, 5-5 PASS 1 command, 4-25, 4-30 PASS2 command, 4-25, 4-30 Peripheral chips, 6-4 address decoding, 6-6 auxiliary serial line (825 IA), 6-5 DLART console serial line, 6-5 parallel port (8255A), 6-4 reserved locations for, 5-15, 6-4 Processor status word, 3-2 Power supply cable, 2-1 connector, 2-2, 6-8, 6-10 requirements, 2-1 R v VTOFF command, 4-3, 4-31 VTON command, 4-3, 4-31 w Watchpoints canceling with console, 4-16 canceling with keypad, 3-27 displaying with console, 4-16 displaying with keypad, 3-20, 3-22 setting with console, 4-16 setting with keypad, 3-22 .WORD command, 4-21, 4-31 RAM, 6-5 Release protection, 3-30, 3-32 REPEAT command, 4-21, 4-31 s Set baud rates, 3-28, 3-32 SHOWMO command, 4-21, 4-31 SHOWRE command, 4-5, 4-31 SHOWSY command, 4-14, 4-31 Single stepping with console, 4-1 7 with keypad, 3-17 Stack pointer, 2-3, 3-2, 5-2 .START command, 4-25, 4-31 Start console, 3-28, 3-32 INDEX-3
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies