Digital PDFs
Documents
Guest
Register
Log In
EK-DCTEM-UG-001
September 2000
221 pages
Original
5.2MB
view
download
Document:
DCT11-EM Evaluation Module User's Guide
Order Number:
EK-DCTEM-UG
Revision:
001
Pages:
221
Original Filename:
http://avitech.com.au/mm-files/dec-dct11em/EK-DCTEM-UG-001.pdf
OCR Text
EK-OCTEM-UG-OO 1 DCTll-EM Evaluation Module User's Guide mamaama EK-DCTEM-UG-OO 1 DCTll-EM Evaluation Module User's Guide Prepared by Educational Services of Digital Equipment Corporation 1st Edition, September 1983 <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: mD~DDmD MASSBUS DEC PDP DEC mate P/OS DECsystem-IO Professional DECSYSTEM-20 Rainbow RSTS DECUS RSX DECwriter DIBOL TOPS-I 0 TOPS-20 UNIBUS VAX VMS VT Work Processor CONTENTS Page PREFACE CHAPTER 1 OVERVIEW II I.~ INTRODUCTION ...... .. ............................................................................... I-I THE DCTII-EM AT A GLANCE ....................................................................... I-I CHAPTER 2 INSTALLA TIO!,; ~.I ,, INTRODUCTION ....... . .................................................................................. 2-1 POWER SUPPLY REQUIREMENTS .................................................................... 2-1 CONSTRUCTING A POWER SUPPLY CABLE ................................................. 2-1 POWERING UP AND VERIFYING CORRECT OPERATION ........................ 2-3 ./GMPERI!';G ............................................................................................................. 2-4 CHAPTER 3 KEYPAD OPERATION 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 ALTERING 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 INTRODUCTION ........................................................................................... 4-1 TRANSFERRING CONTROL BETWEE,\; THE CONSOLE TERMINAL AND THE KEyPAD ................................................................................................ 4-2 3.2 3.3 3A 3.5 3.6 3.7 3.8 3.8.1 3.8.2 3.8.3 3.9 3.10 3.11 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:'\lSOLE INPUT ....................................................... 4-2 CONSOLE CONTROL COMMANDS ................................................................... 4-3 EXPRESSIONS ......................................................................................................... 4-3 EXAMINING REGISTERS .................................................................................. 4-5 ALTERING REGISTERS .................................................................................. 4-5 EXAMINING AND ALTERING MEMORY LOCATIONSINTRODUCTOR Y CONCEPTS ............................................................................. 4-5 The Address Pointer ........................................................................................ 4-6 Output Formatting Modes ................................................................................. 4-6 EXAMINING MEMORY LOCATIONS ............................................................. 4-7 ALTERING MEMORY LOCA TIOT\'S ................................................................. 4-10 INSTRUCTION FORMAT ........................... .................................................... 4-11 TYPI NG IT\' A PROGRAM .......................... ..................................................... 4-12 USING SyMBOLS .................................................................................................. 4-13 Symbol Names ................................................................................................. 4-13 Commands That Define and Manipulate Symbols .......................................... 4-14 EXECUTIT\'G AND DEflLGGING PROGRAMS ............................................... 4-15 Using the Watchpoinl.. ................................................................................. 4-16 Using the Single-Step Function.................... ................................................ 4-17 Using Breakpoints. .. .......................................................................... 4-19 DCTII-EM DIRECTIVES...... .................. . . .............................................. 4-20 MISCELLANEOUS CONSOLE FUNCTIONS ................................................... 4-21 LOADING THE DCTII-EM FROM A HOST COMPUTER ............................. 4-22 Configuring the DCTII-EM for Host Loading ............................................... 4-22 The HOST Command.. . .. ........................................................................ 4-23 The TALK Command .................................................................................... 4-23 The LOAD Command .... . .................................................................... 4-24 Preparing DCTII-EM Loadable Programs on a Has!" .................................. 4-25 An Illustration of the Host Loading Process ................................................... 4-28 CONSOLE COMMA NO SUMMARy............... ................................................ 4-29 CONTROL COMMAT\'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 5.4.5 5.4.6 INTRODUCTION ............................................................................. .. ................. 5-1 THE MONITOR ..................................................................................................... 5-1 The Stack Pointer .............................................................................................. 5-2 MONITOR SUBROUTINES .................................................................................... 5-2 Keypad/LED Subroutines .................................................................................. 5-2 Using the LEOs and Keypad ..................................................................... 5-4 Using Keypad/LED Subroutines - Example Programs .......................... 5-5 Console Subroutines ........................................................................................... 5-8 Console Character Manipulation ............................................................ 5-10 Using Console Subroutines - SampJc Program ....................................... 5-10 DCT I I-EM ADDRESS SPACE ..............................................................................5-13 Standard RAM Space .............. .. .................................................................. 5-15 Expansion RAM Space.... .. ................................................................... 5-15 Monitor Space .................................................................................................. 5-15 I/O 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 IV CONTENTS (Cont) (H.\PTER 6 HARDWARE to, t-o ~ 1>.14 1>.15 1>.16 (,.17 INTRODUCTION ..................................................................................................... 6-1 DCTll-AA M1CROPROCESSOR ........................................................................... 6-3 RAM .................................................................................................... ,", ................... 6-3 MONITOR EPROM ................................................................................................. 6-4 PERIPHERAL CHIPS AND DRIVERS ................................................................. 6-4 Parallel Port (8255A) ......................................................................................... 6-4 DLART Console Serial Line .............................................................................. 6-5 Auxiliary Serial Line (8251 A) ........................................................................... 6-5 INTERNAL DATA BUS BUFFER ......................................................................... 6-5 USER BUFFERS ..................................................................................................... 6-5 PROCESSOR CYCLE DECODING ........................................................................ 6-5 ADDRESS LATCHING AND RANGE DECODIl"G ........................................... 6-5 PERIPHERAL CHIP ADDRESS DECODING .................................................... 6-6 INTERRUPTS AND TRAPS .................................................................................. 6-6 TIMING ..................................................................................................................... 6-7 MISCFLLA I\EOUS CONTROL LOGIC ................................................................ 6-7 KEYPAD/LEDS ........................................................................................................ 6-7 HALT AND INT SWITCHES ................................................................................. 6-7 CONNECTORS ......................................................................................................... 6-8 HARDWARE EXPANSION - EXAMPLE ......................................................... 6-11 APPENDIX A MONITOR LISTING .\PPE"'D1X B SCHEMATIC DRAWINGS APPENDIX C ERROR MESSAGES to ~ to ~ to ~ to ~ I to ~.2 to 53 to b to ~ ~ to 9 to 10 b II to 12 b 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 DCTII-EM Keypad, Switches, and Displays ............................................................ 3-1 Connecting a Console Terminal to the DCTII-EM .................................................. 4-1 Connecting a Host Computer to the DCTII-EM ................................................... 4-22 LED Segment Assignments ........................................................................................ 5-4 SEGBUF Assignments ............................................................................................... 5-4 DCT II-EM Memory Map ....................................................................................... 5-14 Map of I/O Space .................................................................................................5-16 DCTII-EM System Block Diagram .......................................................................... 6-2 Address Range Decoding .......................................................................................... 6-6 60-Pin Connector Pin Assignments .......................................................................... 6-11 16 KB Memory Module .......................................................................................... 6-12 v TABLES Table No. 4·1 4·2 6·1 6·2 6·3 C·I Title Page Control Command Summary. ............... .. ................ . ... 4-3 DCTII·EM Directives.................. .. ......................................................... 4-21 Reserved I/O Locations for Peripheral Chips ................ .. ......... 6-4 Interrupt Vector Locations .................................................. . ............................. 6-7 DCT II-EM Connector Pin Assignments ............... ..................... .. ..................... 6-H Console Messages... . ............ ............. ................ ................... .. ................ c- 3 vi PREFACE This book explains how to use the DCTII-EM evaluation module. Although the book presents many topics in simplified form, some technical background is assumed on your part. It is assumed, for example, that you are familiar with the basics of microprocessor software and hardware. However, you need not be familiar with microprocessors manufactured by Digital Equipment Corporation. To understand software details such as those contained in the monitor listing (Appendix A), you should be familiar with the MACRO-II language. To understand hardware details, you should be able to read and interpret schematic diagrams and data sheets. The book is organized as follows. Chapter I is an introduction to the DCTII-EM and contains a specification summary for your reference. Chapter 2 explains how to install and power up your DCTlI-EM. Chapter 3 shows you how to operate your DCTlI-EM using the on-board keypad and switches. Chapter 4 shows you how to operate your DCTII-EM using a console terminal. Chapter 5 provides software information and describes the use of monitor subroutines. Chapter 6 gives an overview of the DCTII-EM hardware and contains information you will find useful if you plan to design external circuitry. Appendices A and B contain the DCTII-EM monitor listing and schematics, respectively. Appendix C contains a summary of error messages. You will find that this book requires a high degree of interaction between you and the DCTII-EM. Chapters 3 and 4, in particular, are structured so that examples are an integral part of the text. vii CHAPTER 1 OVERVIEW 1.1 INTRODUCTION The OCTlI-EM is a standalone, single-board computer. It is designed as a tool to introduce you to the OCT I I-AA microprocessor CPU chip and the PDP-II architecture. It contains supporting hardware and software which greatly simplify the task of evaluating the DCTlI-AA for your application. The OCT I I-EM gives you considerable flexibility in designing your own software and hardware. You can write programs to run on the DCTII-EM which are substantially.the same as those written in the versatile PDP-I I assembly language. You can also design your own hardware interfaces to use with the OCT I 1EM. In fact, your hardware can connect directly to the DCTlI-EM's internal data paths through an onboard, 60-pin male connector. This chapter summarizes the features of the DCTII-EM. You will find more detail in the chapters that follow. 1.2 THE DCfll-EM AT A GLANCE Central Processor • • OCTII-AA microprocessor 133 ns cycle time (standard) Memory • 4 K bytes of RAM, expandable to 8 K bytes • 16 K bytes of EPROM which contains the DCTII-EM monitor Input/Output • • • Two serial ports, one for a console terminal and the other for an auxiliary RS232-C device Onc 8-bit parallel port One 60-pin connector for use by expansion hardware; allows access to DCT II-EM internal data paths Host Communication • • • Host computer can be connected to the auxiliary serial port for down line loading of programs Character format is asynchronous, 8 bits, ASCII, no parity, one stop bit Available baud rates are: 300, 600, 1200, 2400, 4800, 9600, 19200 Software • • • Software is EPROM resident Keypad monitor for performing operations with the on-board keypad Console monitor for performing operations with a console terminal and with a host computer I-I On-Board Control Hardware • • 20-key keypad (4 X 5 array) HALT push-button switch On-Board Displays • • Two rows of 6-digit octal LEOs User LED Interrupts • • Four levels of interrupt priorities On-board interrupt push-button switch Diagnostics • Contained in EPROM, automatically run at power-up time Documentation (provided with DCTll-EM) • • • DCTl/-EM User's Guide DCTlJ-AA (MICRO/T-ll) User's Guide DC3f9-AA DLART Data Sheet Physical • • • • Width: 20.3 em (8 in) Length (including connectors): 27.9 em (II in) Height: 3.8 em (1.5 in) Weight: 450 gm (15 oz) Environment • • • • Noncaustic environment required Operating temperature: 10 to 40 degrees C Relative humidity: 10% to 90% (noncondensing) Altitude: Up to 2.4 km (8000 ft) DC Power Requirements • For keypad operation only: +5 V (±5%) <il. 2 A • For console terminal operation: +5 V (±5%) <il 2 A +12 V (±IO%) <il 50 mA -12 V (±10%) <il 50 mA 1-2 CHAPTER 2 INSTALLATION 2.1 INTRODUCTION DCTll-EM installation consists of attaching a power supply. powering up, and verifying that the board is operating properly. 2.2 POWER SUPPLY REQUIREMENTS The DCTII-EM requires a +5 Vdc supply (±5%) capable of delivcring up to 2 A. If you plan (0 use the console or auxiliary serial ports, you also need a +12 Vdc supply (±10%) and a -12 Vdc supply (±IO%) each capable of delivering up to 50 rnA. 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 DCTII-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 (10 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. ( / W1HE = : PIN /1 fcRIMPP'N 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. . 'e :r KEY MR '0342 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. -12 V GNO +5 v --+-'<iiii'"·1 KEY Figure 2·3 Power Supply Connector Pin Assignments 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 DCTll-EM as shown in Figure 2-4. 2-2 POWER SUPPLY INSERT (} POWER SUPPL Y CABLE c:mn CIIIJ ~ 1,:00000 00000 100000 ICOOOO DCT11-EM M~ Figure 2-4 ,o144 Power Supply Connector You are now ready to power up your DCTII-EM. 2.4 POWERING UP AND VERIFYING CORRECT OPERATION Make sure your DCTII-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 DCTlI-EM runs its diagnostics automatically. Thc 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. 111+111 1+1+1+1 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 DCTlI-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 LEOs are blank after you power up, your DCTll-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 LOWER LJISPLAY DISPLAY MEANING I I I' I I I I I I I'I'I I'I E RAM checksum test failed. Try replacing RAM chips. 0 I I I I I I IElll+1 I I I, 1,1 I I j IEllloj'l I I I 1,1 I I I IEI'I' I I'I 121 0 ROM checksum test failed. Try replacing ROM chips. RAM and ROM checksum tests failed Board may have major problems. DLART feedback tesl failed. Board may !lave maior problems. If you suspect your board has major problems, contact Digital Equipment Corporation or the authorized distributor from whom you purchased your DCTI1-EM. The DCTlI-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 DCTII-EM keypad. Install a jumper between these posts if you want to disable the generation of DCTII-AA microprocessor cycle slips. If you do this, you must also change the OCTll-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 DCTlI-EM. 2-4 CHAPTER 3 KEYPAD OPERATION 3.1 INTRODUCTION This chapter explains how to operate the DCTII·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 DCTlI-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 watch points. Perform halts and interrupts. Perform a number of other functions. The DCTII-EM keypad, switches, and displays are arranged as shown in Figure 3-1. LED DIGITS (UPPER ROW) '----I J KEYPAD (LOWER ROW) I HALT SWITCH LED DIGITS 1 _INT SWIlCH .---J '--_---' H A L T PC PS 0 8 GJ B B 80 D B B 8 D D B B PRonc I • N T USER D LED~~ = = 000 WP GOLED SP CONSOL BAUD CANCEL ENTER ElG B B B 000 ... " Figure 3-1 DCTll-EM Keypad. Switche>, and Displays 3-\ 1034~ Figure 3-1 shows two rows of six LED digits which display data, addresses, and other information. Below the two rows of LED digits is a single LED (called the user LED) which you can use as an indicator in your programs. To the right of the LEOs are the HALT and [NT push-button switches. These switches perform the functions their names imply; that is, they can halt and interrupt OCT I I-EM operation. To the extreme right is a 4 X 5 array of switches called the keypad. The keypad is used to enter commands, instructions, and other information to the DCTll-EM. Pressing keys will generally cause responses to appear on the LED displays. 3.2 NUMBER SYSTEM Information that is input or output via the keypad/LED combination must be represented in octal notation. Since the DCTll-AA is a 16-oit processor, the acceptable range of octal inputs and outputs is 000000 through 177777. 3.3 EXAMINING REGISTERS To examine the contents of a DCTll-AA internal register, you must first place the DCTll-EM in register mode. Do this by pressing the REG key. The LEOs display: 111-1+11 1 111111 Now you may examine a register by pressing any of the following keys: o through 9 or CLR, which is equivalent to key O. [n general, the name of the register being examined appears on the upper row of LEOs, and the contents of the register appears on the lower row of LEOs. The exception to this is when the watch point (WP) is examined. [n that case, an address called the watchpoint (WP) address is displayed on the upper row of LEOs, and the WP contents are displ,ayed on the lower row. Keys 0 through 7 select RO through R7, the eight registers in the DCTll-AA register file. Registers 6 and 7 are dedicated and are referred to as the stack pointer (SP) and program counter (PC), respectively. Key 8 selects the processor status (PS) word. Only the lower 8 oits of the PS word are meaningful. The PS word contains the current processor priority, the processor condition codes (N, Z, V, and C), and the T-bit. Key 9 selects the watchpoint (WP). The WP is useful in connection with program debugging and is discussed in Paragraph 3.8.3. 3-2 NOTE If you have just powered up your DCTll-EM or if you ha"e haIted its operation, it is not necessary to press the REG key to get into register mode. The upper row of LEOs will display: 111+111 The lower row of LEOs will display the current value of the PC, and you can simply press one of the keys 0 through 9 or CLR to select a register. Examining Registers - Example ] You want to examine the contents of various registers. It is assumed that the registers still contain their initial (power-up) values. UPPER KEY IREGI G DISPLAY I 11,1+11 I II' HII LOWER DISPLAY 1 I I I I II COMMENTS Get Into register mode 101+101+1 [] 1 11+1 I I I+H+H GJ I 11+11 I H+H+I lelRI 1 I 1'101 I I 1+101+101 0 1 11+1 I I 1+101+101 0 I+H+H H+H+I The ADV and BAC keys allow you to examine register contents sequentially. Pressing the ADV key allows you to examine registers in ascending order. You cannot advance beyond the WP. Pressing the SAC key allows you to examine registers in descending order. You cannot back up beyond RD. If you want to examine registers nonsequentially after you have pressed ADV or BAC, you must first press the REG key to reinitialize register mode. Otherwise, you will alter the contents of the register you are currently examining. 3-3 Examining Registers - Example 2 You want to examine more registers. You begin by examining them sequentially. It is assumed that the registers still contain their initial (power-up) values. KEY UPPER DISPLAY LOWER DISPLAY COMMENTS 1111111 Get mto register mode. 111+111 1+1+1+1 /01+101+1 H+I+H H+H+I 101+101+1 111+111 H+H+I 111+111 1+1+1+1 You wanced to examine R4 but you altered RO instead. Clear the incorrect entry. 1111111 This is how to examine A4 1+1+1+1 Now you're sequentially examining again. 3.4 ALTERING REGISTERS To alter the contents of a DCTII-AA internal register, you must first examine the register as described in Paragraph 3.3. To review, this means you must place the DCTlI-EM in register mode by pre~sing the REG key and examine the desired register by pressing one of the keys 0 through 9. Once you have done this, press the EXA key and alter the contents of the selected register by pressing keys 0 through 7 in the desired order. 3-4 The previous contents of the register will be cleared and you will see the new contents being shifted in from the right side of the lower row of LEOs as you press keys. If you wish ta clear the contents af a register, press the CLR key after yau have pressed the EXA key. Pressing the CLR key also clears a register while you are entering data. Altering Registers - Example 1 You want ta set register R3 to 000232 and the SP to 6000. It is assumed that the registers still contain their initial (pawer-up) values. UPPER KEY IREGI [2] B [J [2] 0 leLRI IREG] 0 B 0 G LOWER DISPLAY DISPLAY COMMENTS [ l'I'[ai I I I I I I I I I II' HI I [01+101+1 I 11'101 I I 1+[01+[01 I iI'H I I H+H+I I I I' HI I 11+101+1 I II' HII 1+1+1+1 1II' HII [01+/01+1 I I 1,1+1 I I I Ii I II I I 1+1 I I l+i+I+1 I I 1+1 1+1+1+1 I 1+1 I 1 [01+/01+1 I [ lsi pi I I /01+/01+1 I Get into register mode EKamine R3 Enlel 232 0 I I I 3-5 You change your mind. and clear R3 instead Get back into register mode to change another register. Examme R6 !the SP). It currently" 7400. Set SP = 6000. 111+111 1+[0[+101 IIl lplli 1+1+1+1 s The ADV and BAC keys allow you to alter register contents sequentially. Pressing the ADV key allows you to alter registers in ascending order. You cannot advance beyond the WP. Pressing the BAC key allows you to alter registers in descending order. You cannot back up beyond RO. Press the ADV or BAC keys until you arrive at the register you want to alter, then press the desired sequence of keys 0 through 7 to enter the data. If you want to clear the register, press CLR. If you want to alter registers nonsequentially after you have pressed the ADV or BAC keys, you must first press the REG key to reinitialize register mode. Then press 0 through 9 to select the desired register. followed by EXA, followed by the data you wish to enter. It is generally easier to stay in seq uential mode and step forward or backward to the desired register than to perform nonsequential alterations. Altering Registers - Example 2 You have just completed example KEY ISAcl 8 0 IBAC! IBAC! 0 UPPER DISPLAY and now want to sequentially change some registers. LOWEA DISPLAY COMMENTS I I 1'1 51I I 1+101+101 1I I,lsi II 1+1+1+1 R5 IS now alterable. Enter 43. I I I' 151 I I 1+1+1+1 1I I' I_I II 1+101+101 I II' HII H+H+I 1 II' HI I H+JoI+1 IADvl I I I' I_I I I 101+101+1 ISACI 1 II' HI I H+H+I 3-6 R4 is now alterable. R3 is now alterable, Enter 1. R4 is now alterable. But now you want to clear R3 and alter RO. IClRI ISACI ISACI ISACI 8 1I 1+1 I I 101+101+1 1II' H 1I 1+1+1+1 I I I' I, I I 1 101+101+1 11 1'101 1 I 101+101+1 I II' HI I 1+1 1+1,1 0 RO is now alterable. Enter 1. 3.5 EXAMINING MEMORY LOCATIONS To examine a memory location, you must first place the OCT II·EM in address mode. Do this by pressing the ADR key. The first time you do this, the LEOs display: 11+1+11 1+1+1+1 Subsequently, when you press the ADR key, the upper row of LEOs displays: and the lower row of LEOs displays the most recently examined address. Enter the address of the memory location you wish to examine by pressing the appropriate sequence of keys 0 through 7 . The previous address will be cleared and you will see the address you are entering being shifted in from the right side of the lower row of LEDs as you press keys. If you make a mistake entering your address, you can press the CLR key to clear your entry and try again. Once you are satisfied with the address you have entered, press the EXA key. The address of the location you are examining (the address you just entered) appears on the upper row of LEOs, and the contents of this location appear on the lower row of LEOs. Only even addresses can be examined. If you enter an odd address, it is rounded down when you press the EXA key. 3·7 Examining Memory Locations - Example I You have just powered up your DCTII-EM and want to examine some memory locations. There is a program that resides in the OCT 1 I-EM called the monitor which begins at address 140000. You will learn more about the monitor later, but for now, all we want to do is examine some of its locations. UPPER KEY DISPLAY LOWER DISPLAY COMMENTS IADRI I 1+1"1,1 I 1+101+101 8 1Hdldl'l I H+H+I 8 1 Get Into address mode Enler 140000. Hdldl'l I 1+1+[,[-1 ~ 1 Hdid 1'1 I 1+1+1+1 ~ 1 I+i+( 1 1+1+\+1 ~ 1 Hd Id 1,1 I G 1Hdldl'l I 1+101+101 B 1 Hd idl' I I 1+1+:+1 I+H+/ol The ADV and BAC keys allow you to examine memory locations sequentially. Pressing the ADV key allows you to examine memory locations in ascending order. Advancing beyond address 177776 results in examining locations starting at 000000. Pressing the BAC key allows you to alter registers in descending order. Backing up beyond 000000 results in examining locations starting at 177776. If you want to examine memory locations nonsequentially after you have pressed ADV or BAC, you must first press the ADR key to reinitialize address mode. Otherwise, you will change the contents of the memory location you are currently examining. Examining Memory Locations - Example 2 You have just finished example I and now want to examine more locations in the monitor. You start by examining them sequentially. 3-8 KEY IADVI IADVI 1ADVI IBACI IADRI 8 8 G 8 G 8 IEXAI tSAcl UPPER DISPLAY LOWER DISPLAY COMMENTS 1+1+1+1 1+1+1+1 I,I+H+I 1+1+1+1 1+1+1+1 1,I+i+1 1 1,1+1+1-1 1+\01,1+1 11+1+1 1 1+101+1-1 1H+I'I I 1+1+1+1 1H_I_ I' 11 1+1+1,1-1 1H- I_ I' 11 H+I+H 1H_I· I' 11 1+1,1-1+1 1H·I·I 'I 1 I+H+H I H· I_ 1,1 I 1+1 1,1+1 1+1+1+1 1+1+1+1 1+1+1+1 1,1+1+1-1 2 Relnltialize address mode lot flof1sequcnllal examine You try to eX<lrnlne 140101 0 3-9 The address IS rounded down anel you examine 140100 Now you're sequentially examlnmg agam. 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 OCT I I-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 sequencc. 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 LEOs as you press keys. Pressing the CLR key will clear the location before or during data entry. Altering Memory Locations - Example 1 You have just powered up your DCTII-EM and want to aller 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 DCTII-EM memory and address space, but for now the discussion will be limited to these locations only. UPPER DISPLAY KEY LOWER DISPLAY 0 Hd:d I'll 101+101+1 I l+i+11 101+101+1 I H+I'i I I+H+I'! I Hdl+1 I 1+101+101 I H+I'II 1+1+1+1 ~ I H+I'I I H+H+I ~ I Hdi+1 I I+H+H ~ I Hdl+1 I H+I+H leXAI 101+101+1 1+1+1+1 101+101+1 101+101+1 IADRI 0 [2J leLR! G I 3-10 COMMENTS Get Into address mode. ElHer 2004 You made a mistake and entered 1 tnstead of O. Clear entry. 1ry again - enter 2004. 2004 is cUHently empty. Enter 32 [] \AORI 101+101+1 101+101+1 I Hdl+1 1 1+1+1+1 0 I H+[,[ 0 0 H+['I 1 1+1+[+[ 1H+I,[ 1+[+[+1 0 1[+1"1'[ I 1+[+1+1 !eXA! \0[+101+1 101+[01+1 I+H+H 1+[+[+1 8 [ [+[+[o[>[ Back to address mode to alief another !ocatic.n Note - most recent address examined is dIsplayed. Enter 2000. [ [ 2000 is currently empty. Enter 1. The ADV and BAC keys allow you to alter memory locations sequentially. Pressing the ADV key allows you to alter memory locations in ascending order. Pressing the BAC key allows you to alter memory locations in descending order. Press the ADV or BAC keys until you arrive at the memory location you want to alter and press the desired sequence of keys 0 through 7 to enter the data. If you want to clear the memory location, press CLR. Altering Memory Locations - Example 2 You have just completed example I and now want to sequentially alter memory locations. UPPER KEY IADVI 0 [] IADVI DISPLAY LOWER DISPLAY !oI+[O[+1 I+H+H 101+[0[+1 101+[0[+[ 101+[0[+1 101+[0[+1 \01+[01+1 1+[+[+1 3-1 1 COMMENTS Location 2002 is now alterable. Enter 47. location 2004 is now alterable 0 IADVI GJ 0 lBACI leLRI 101+101+1 1+1+1+1 101+101+1 101+101+1 H+H+I 101+101+1 101+101+1 1+1+1+1 101+101+1 101+101+1 101+101+1 101+101+1 Enter 5. Location 2006 is now alterable. Enter 22 Location 2004 is now alterable Clear II 3.7 ENTERING AND EXECUTING A SIMPLE PROGRAM In this paragraph, we will tie together the material presented thus far by entering and running a simple program. It is assumed you are familiar with an assembly language instruction set. A full description of the instruction set used in the following example is found in Chapter 6 of the DCTI/-AA User's Guide (EKDCTll·UG). The following program takes a number in register R 1, adds it to a number in register R2, and puts the result in register R3. Octal Code Instruction Comments 010103 060203 000000 MOV RI,R3 ADD R2,R3 HALT Get first term. Add second term. Halt program execution. We will place this program in user RAM, starting at address 2000. KEY IADAJ ~ G G UPPER LOWER DISPLAY DISPLAY COMMENTS I H+lrl 1 1H+I'I 1 I+H+H I H"i-I'I I I+H+H Hdldlrl 1+1+1+1 Most recently exam· ined address shown on lower LEOs. 1 1 3·12 bamme 2000. 0 B 1H+I'I 1 1+1+1+1 1+1+1+1 Current contents of locatlun 2000 are shown on lower LEDs. ~ H+H+I I+H+I,I H+H+I I+H+H 1+/>1+:°1 H+I,:+I 1+1 1°[°1 1 1° i°I' 11' i°1 0 101+1+[01 H,loh+1 IADvl H+H+I [J 0 [] 0 ~ [J ~ 0 IADvl leLRI 2 0 Enter first instruction You don"t lleNJ 10 enter leadulg zeroes 0 Current contents of 2002 are shown on lower LEDs 1+1+1+1 H+H+I 101+101+1 I+H+H H+H+I 1+1+1+1 1+1+1+1 I+H+H 1°1+/01+1 1+1+1+1 1+1+1+1 1+1+1+1 1+/01+101 Current contents of 2004 are shown on lower LEOs. 3-13 Ex.am'fle next address Enter second Instruction. E~amlne next address. Enler third instruction. HALT IS entered by clearmg the locatIon. Now place some numbers in R I and R2 that the program can work with. Also make sure R3 is cleared. 11I, I' I ! 1 1 1 I' I' I I 1 Current contents of R 1 shown on lower LEDs Current contents. of R 1 remain on lower LEDs. I I I, I'I I I I I I' 121 I1 Current contents of R2 shown or\ lov;er LEOs. ~r~:~:,~o~:e~o':;: IADYI 1 I I, 131 1 1 B I I I, 11i 1 H H I ++ 3 e,,,, R3 Now go back and check what you have just entered. o I I+Id1,I I I+I+I+1 Ge"n,o add,." mode 11+/+11 1+1+1+1 IH+I'II 1+1+1+1 I H+I'II H+I+H IH+I'II 1+1+1+1 8 1+1+1+1 11+1+1 1 B o ~ ~ '"m;", 2000 0 3 3-14 !ADV! IADvl IREGi 0 [] 0 1+1+1+1 1+1+1+1 101+101+1 I+H+H I I 1,1+1 1 I I II ! 1I II I' I' 11I 1+1+1+1 I I I' 121 I 1 1+1+1+1 I 1I' 111I 1+/01+101 3 Examine 2002. Examme 2004. Get mto register mode. Examme registers Everything O.K Now run the program. Set the PC to the starting address of the program (2000) and press the GO key to begin program execution. Since you are currently in register mode, press the AOV key until you get to the PC. Current contents of PC shown on lower o 111+111 111+111 101+101+1 G 111+111 101+1+101 G 111+111 1+1+10/01 G 111+111 1+1+1+1 E] 1 I IpHI I LEOs. ,,,,,2000 Hoj> H+I ",,", pcog"m 'he The program is now halted. The current PC (2006) is displayed On the lower row of LEOs. 3-15 Check R3 to find out if the program executed properly. Since you are in register mode, press the BAC key until you get to R3: and the result is correct. 3,8 WORKING WITH A LONGER PROGRAM Consider a program that calculates the sum of all the numbers from 0 to n, where you specify n. That is, the program determines: n x=o You place the value of n in RO, and the program deposits the sum it calculates in memory location 2044. Use the keypad to enter the following summation program starting at location 2000. Octal Location Code Instruction Comments 2000 2002 2004 2006 2010 2012 2014 2016 2020 2022 2024 2026 2030 2032 2034 2036 2040 2042 2044 005001 020001 003413 005037 002044 010037 002044 005300 060037 002044 102404 020001 003372 000000 005000 005037 002044 000000 xxxxxx CLR RI CMP RO,RI BLE 2034 C LR «> # 2044 Set R I = O. RO contains n. Illegal input (n oS 0)'> No, start operation by clearing 2044. MOV RO,(iJ #2044 Place first value of n in 2044. DEC RO ADD RO,(a,#2044 n ~ n-I Add next value (n--I) to 2044. BVS 2036 CMP RO,RI BGT 2016 HALT CLR RO Cl.R «>#2044 Overflow'> No overflow. Continue operation if n > O. Operation complete if n = O. Illegal input. Clear RO, 2044. Overflow. Clear 2044. HALT Illegal input or overflow occurred. 1nitial contents of 2044 irrelevant. 3-16 To test the operation of the program, deposit a value of 10 (octal) into RO. The program should sum 10+ 7 + 6 + 5 + 4 + 3 + 2 + I (octal) in memory location 2044 to produce 44 (octal). )';ote that this is equivalent to having a value of 8 (decimal) in RO and letting the program sum 8 + 7 + 6 + 5 + 4 + 3 + 2 + I (decimal) to produce 36 (decimal). Set RO = JO SP = 7400 PC = 2000 Press the GO key. The result should be: 111+111 1+1+1+1 The program halted at location 2032. Now examine location 2044. The result should be: 101+101+1 1+\01+1-1 3.8.1 Using the Single-Step Function The single-step function is a powerful program analysis tool. It allows you to execute your program one mstruction at a time. At the end of each instruction. you may examine various registers and memory locations to determine how the program has affected them. To perform the single-step function, press the SST key. Result: the instruction currently pointed to by the PC is executed. Let us now single step through the preceding summation program. First set up your initial conditions: Set RO = 10 SP = 7400 PC = 2000 3-17 Then key in the following. KEY 155TI ISSTI ISSTI ISSTI ISST! UPPER LOWER OISPLAY DISPlAY I I I+i 1I 1+1+1+1 111+1 1I H+H+I 1i 1+1 11 101+101+1 111+1 i I 1+1+1+1 I I 1+1 1I H+H+I I H+I'I 1 I Hdi+1 I l+i+I+1 COMMENTS 2000 execllted 2002 executed. 2004 executed 2006 executed. 2012 executed. Most recently exam· iADAi 0 G 0 8 !EXA! ISSTI IREGI GJ ined address shown on lower lE Os. Has RO been moved to 2044 J I H+I'I 1 H+H+I I H+I'I 1 1+1+1+1 I Hdl+1 I H+I+H 1+1+1+1 1+101+101 111+1 I 1 1+1+1+1 I 11'1-101 I 111I I I I I 1I' H11 101+1+[71 3-18 Yes. 2016 executed. Old RO get decremented? Yes. 111+111 11+1+11 101+[0]+1 111+111 111+111 111+111 1+111 2020 executed. 1+1+1+1 Has RD been added to 2044) Yes 1+1+1+1 I+!+I+I 1+1+1+1 1+1+1+1 I I 1I I 11 111+i II 2024 executed 2026 executed Program branched correctly 2016 executed Oid RO get decremented? 2020 executed Did RO get added to 2044' 101+101+1 /0/+101+1 You can continue executing the program one instruction at a time by repetitively pressing the SST key. 3..8.2 Using Breakpoints Tbe use of breakpoints is another means of analyzing and debugging your programs. Breakpoints cause '0tlr program to halt whenever they arc encountered. When the program is halted, you can then examine "~nous registers and memory locations to determine how the program has affected them. I' there were no debugging aids, you would have to insert breakpoint (BPT) instructions in your program .!-cd write a breakpoint trap handling routine if you desired breakpoints. The DeTlt-EM, however, does "JHain debugging aids and provides a convenient means of inserting up to four breakpoints via the t:. ",d. Do not attempt to set breakpoints by inserting BPT instructions in your program. If you do this, _ '.' ill get an error message when you try to execute the program (see Appendix C). 3-t9 To insert breakpoints, press the BPT key. The upper row of LEOs displays: and the lower row of LEOs displays the current address of breakpoint 1. If breakpoint I is not currently set, the lower row of LEOs displays: 1+101+/01 You can then press the appropriate sequence of keys 0 through 7 to enter the address of breakpoint 1. You can set up to four breakpoints in this way. Use the ADV and BAC keys to examine breakpoints 1 through 4 and press the appropriate sequence of keys 0 through 7 to enter an address for each breakpoint. If you press BAC while you are examining breakpoint 1, you are examining something called the watch point address. The use of the watch point is explained in Paragraph 3.8.3. Breakpoints are recognized only if you use the GO key or the "Go With LEOs" special function (Paragraph 3.12.2) to execute your program from the keypad. Breakpoints are disabled when you single step through a program. When you execute a program with breakpoints in it (by pressing the GO key, for example), your program halts at the address of your first breakpoint without executing the instruction at that address. The instruction at the breakpoint address is executed when you reSUme program execution (e.g., by pressing the GO or SST keys). Using Breakpoints - Example We want to set two breakpoints in the summation program shown in Paragraph 3.g. Set the first breakpoint at address 2020 to make sure RO has been decremented properly. Then set the second breakpoint at address 2024 to check the results of the cumulative addition. UPPER KEY \SPTj [] G 0 DISPLAY LOWER DISPLAY Ibi'lpH'I'1 1°1°1+:+1 1+1+I,i,1 1+I+i+1 1bl 'I +1 ,i,l 1+I+i+1 Ibi'I"I+I'1 1+1+1+1 3-20 COMMENTS Assume no breakpomts have been previously set Enter 2020 G IADVI 0 0 1":'1-1+1,1 101+101+1 1_1'1+1+1 1+101+101 1-1,1+1,1 1 H+H+I 2 0 1+1+1+1 H+H+I 1-1,1-1+1 1 1+1+1+1 GJ l+i+I+1 1+1+1+1 Set breakpoint 2. Enter 2024 2 Set your initial conditions as before (RO = 10, SP = 7400, PC = 2000) and execute the program. EJ JREG/ G B 111+1 I 1 1+1+1+1 11i'i+11 11i ~ I II 111'101 11 H+H+I 111+1 II H+H+I FirSt breakpoint encountered. Old RO get decremented> Yes Resume execu\!on Examine address 2044 to see if the first addition was performed correctly. Most rCCef'ltJy eXilJn- G 11+1+11 1H+1,11 1+1+1+1 G GJ 1H+I'II 1+1+1+1 1H+I,II 1+1+1+1 ined address sllown on lower LEOs 3-2 J h,mme2044. G !EXAI B 1l+i"I'1 1 I+H+H /01+1+1-1 1+1+1,1 1 I 11+: 1I 1+>iOI+1 7 IREGI 11 1,1+1 1 1 : 1 I 1 1 I ~ 11i' H1 I l+i+i+1 IGOI I I 1+: i I /01+1+1-1 Adfhtion perlormed correctly Resume e)(eClitlOn Resu"le execu1'on 3.8.3 Using the Watchpoinl In Paragraph 3.3 we identified the watchpoint (WP) and showed how it could be examined. In this section, you will learn how to use the WP for program analysis and debugging. The watch point is a convenient means of monitoring and altering a memory location. Once you set the watch point address to the address of a memory location, you can examine and alter that location just as you would a register. To set a watch point address, press the BPT key, then the BAC key. The upper row of LEOs displays: and the lower row of LEOs displays the current WP address. If the WP is not set, the lower row of LEOs displays: 1+1+1+1 You may now enter the new WP address by pressing the desired sequence of keys 0 through 7. You can clear the WP by setting its address to zero. 3-22 Using the Watchpoint - Example I In our summation program in Paragraph 3.8, we used location 2044 to deposit our accumulated result. Since we would like to examine (and possibly alter) this location frequently, we set our watchpoint address at 2044. UPPER KEY IBPTI ISACI [J DISPLAY LOWER DISPLAY 1+lpl+!,1 H+/o!+1 I+I,H+I H+H+I Ipl+I+I,1 1°:+1°1+1 0 1+1+1_1'1 8 H+H-I'I H+I+H H+I+i,1 10i+h+1 0 COMMENTS Currem value of BPI displayed 011 lower LEOS. Enter watchpoint address of 2044. 101+1+101 ",ow We can examine and alter the contents of location 2044 just as we would a register. If you run the summation program in Paragraph 3.8 and want to inspect the result, do the following. 1111111 1+1+1+1 1+1+1+1 1+1+1+1 1+1+1+1 Current conlents of 2044 shown on lower LE Ds. Gl"t mto register mode Examine WP. Current contents of 2004 shown on lower LEOs. Clear It You have just cleared the contents of location 2044. The watchpoint can be used in conjunction with the single-step function to continuously monitor the .,mtents of a memory location. When this is done, the contents of the watch point appear on the upper row "f LEDs, and the current PC appears on the lower row of LEDs. 3-23 Using the Watchpoint - Example 2 You are still working with the summation program in Paragraph 3.8. You have established a watch point at location 2044, as shown in the previous example, and want to continuously monitor the contents of this loca tion as you single step through the program. Set your initial conditions as before (RO = 10, SP = 7400, PC = 2000) and key in the following. KEY UPPER LOWER DISPLAY DISPLAY COMMENTS ISSTI I+H+H 101+101+1 ISSTI 101+101+1 H+H+I 2002 executed. !sSTI I+H+H 101+101+1 2004 executed ISSTI 1°I°I°1°! °I01 H+H+I 2006 eJ(ecu!cd ISSTI 101+:+101 H+H+I ISSTI 1+101+101 1+1+1+1 1+1+['i ' l 1°1°1 1°1 11 \SST[ 2 2 4 2000 executed: 2044 contents shown Oil upper LEOs. 2012 executed. 2044 has changed. 2016 executed 2020 execllted 2044 has changed, And so on. When you finish executing the program (e.g., after you have executed instruction 2032 in the example above), the upper row of LEOs displays: 111+111 and the lower row of LEDs displays the current Pc. 3.9 USING THE HALT SWITCH Pressing the HALT switch causes you to unconditionally halt the operation of your program and return control to the OCTIl-EM keypad. When you press the HALT switch, the upper row of LEDs displays: 111+111 and the lower row of LEOs displays the current Pc. 3-24 You can use the HALT switch, for example, to escape from an infinite loop your program is executing or to inhibit hardware problems which are interrupting the proper operation of the DCTII-EM. After pressing HALT, you are in register mode and can readily examine the contents of the DCTII-EM registers as described in Paragraph 3.3. 3.10 THE INT SWITCH Pressing the INT switch causes you to generate a power-fail (PF) nonmaskable interrupt. Pressing this switch will have no effect on the operation of the DCTII-EM unless you specifically write a program that recognizes input from it. The program in the following example shows you how to use this switch to experiment with interrupts. Also refer to Chapter 6 for more information on interrupts. Using the INT Switch - Example This program simply loops on itself at location 1510 until you press the [NT switch. Then the current PC and PS are pushed onto the hardware stack and the DCTII-EM goes to locations 24 and 26 for its new PC and PS, respectively. Location 24 is called the power-fail vector and usually points to a power-fail service routine. The first line of your program, however, changes location 24 to point to your own "power-fail service routine." This routine, which you specify to start at location 1514, is not a power-fail service routine at all, but a routine that sets RO to the number of times (in octal) that the interrupt switch has been pressed. Enter the following. Location Octal Code 1500 1502 012737 001514 1504 1506 1510 1512 1514 1516 000024 005000 000777 000000 005200 000002 Instruction Comments MOY #1514.0,#24 Set power-fail vector to "service routine. " Initialize RO. Await interrupt. CLR RO BR 1510 HALT INC RO RTI Start of "service routine." Restore old PC and PS. Start the program at 1500 and press the [NT switch a number of times. The upper and lower row of LEDs ..ill be blank while you are pressing the INT switch. Each time you press INT, you execute the "service routine'" which increments RO. When the routine is done, it returns to 1510 to await another [NT switch press. Press the HALT switch to suspend operation and examine RO. 3.11 THE USER LED The user LED is a general-purpose indicator lamp that your program can use to indicate the status of some condition. You can turn on the user LED by writing 00001 1 to port C of the 8255A parallel port chip (see Paragraph 6.5.1). Port C of the 8255A chip has an address of 177444. Writing 000010 to port C of the 8255A chip turns off the user LED once it has been turned on by your program. 3-25 User LED - Example The following is a short program that turns the user LED on and off. Use the keypad to enter this program starting at location 1000. Location Octal Code 1000 1002 1004 1006 1010 1012 1014 1016 1020 1022 1024 1026 1030 1032 012737 000011 177444 012700 100000 077001 012737 000010 177444 012700 100000 077001 000137 001000 Instruction Comments MOY #ll,<i5#177444 W rite I I to port C. MOY # I OOOOO,RO Put a large number in RO. SOB RO,1012 MOY #10,<&# 177 444 Loop for a while. Write 10 to port C. MOY #IOOOOO,RO Put a large number in RO. SOB RO,1026 JMP <Ϩ Loop for a while. Loop infinitely. 3.12 PERFORMING KEYPAD SPECIAL FUNCTIONS There are five types of special functions you can perform through the usc of the DCTII·EM keypad. Function Number Function Name o Cancel breakpoints Go with LEOs Start console Set baud rates Release protection I 2 3 4 To perform one of these special functions. you must first place the DCT1I·EM in function mode. To do this, press the FNC key. The LEOs display: 11+1+11 , , 1I I , , and you can now select a function by pressing any of the keys 0 through 4 or CLR, which is equivalent to O. 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 watch point address. When function 0 is activated. the upper row of LEOs displays: ~nd the lower row of LEOs displays the current value of the Pc. The OCT II-EM is left in register mode. f...,tion 0 - Example You are debugging a program you just entered and want to clear all the breakpoints and watchpoints hSOCiated with an old program. UPPER KEY LOWER DISPLAY DISPLAY I 1,1,1+1 1 11111 G 11+1+1 1 I I I HI I Im[ I 11+:1l [BPTI Ibl,IeI+I,1 H+H+I ISAC] Ipl+:A:dl,1 l+io,+H [ADVI 19PT] 1+1«,1,1 l+o+H IADVI 1+1eI+1 1 l+ioH+1 IFNCI COMMENTS Get Into function mode Select functIon O. Current PC SllOWll on lower LEOs. or 2 Verify breakpoint 1 clCClrcd Venfy watchpolnt address cleared Breakpomt 1 agam Vcrofy urCiJkpOlf1: 2 cleared 1.12.2 Function 1 - Go With LEOs ... thin the OCT I I-EM arc a number of routines your program can call to display values on the LEOs (see P'u3graph 5.3.1). For these routines to operate correctly, you must explicitly turn on the LEOs before you all a routine. One way to turn on the LEOs is to include a MaY #7,@#177444 instruction in your ;I'".:>gram (see Paragraph 5.3.l.1). Another way is to execute your program by activating function I rather :un by pressing the GO key. Activating function I turns on the LEOs and starts your program. 3-27 3.12.3 Function 2 - Start Console If you connect a console terminal to your DCTII-EM, you will use function 2 frequently. Activating function 2 starts a program called the console monitor. The console monitor resides in the on-board PROMs and allows you to enter, execute, and debug programs through the use of a console terminal rather than the keypad. The console monitor also allows you to perform other operations and is described in more detail in Chapter 4. Before activating function 2, connect a console terminal to the DCTII-EM and select an appropriate baud rate by activating function 3 (see Paragraph 3.12.4). When function 2 is activated, the upper and lower LEOs are blank and the message: TEM CONSOLE MONITOR VI.O TEM> appears on the console terminal. 3.12.4 Function 3 - Set Baud Rates The DCTII-EM has two serial ports: a console terminal port and an auxiliary serial port. Activating function 3 allows you to select baud rates for these ports. When the DCTII-EM is powered up, it automatically sets both baud rates to 9600. When you first activate function 3, the upper row of LEOs displays: and the lower row of LEOs displays: II+H+I This tells us that the console terminal port is currently set at 9600 baud. Note that the baud rate is displayed as a decimal number. Pressing the ADV and BAC keys steps you backward and forward among the various baud rate values available for the console terminal port. The available baud rates for the console terminal port are: 300, 600, 1200, 2400, 4800, 9600, and 19200. You can now set the baud rate of the auxiliary serial port by pressing the EXA key. The first time you do this, the upper row of LEOs displays: and the lower row of LEOs displays: II+H+I 3-28 This tells US that the auxiliary serial port is currently set at 9600 baud. Repetitively pressing any of the keys CLR, 0 through 9, ADV, or BAC causes you to alternate between two available baud rates. The two ayailable baud rates for the auxiliary serial port are: the current baud ratc of the console terminal port and one-fourth the current baud rate of the console terminal port. Pressing EXA again puts you into register mode. Fmction 3 - Example You want to use function 3 to experiment with setting baud rates for the console terminal serial port and the auxiliary serial port. You have not altered these baud rates since powering up. KEY UPPER DISPLAY LOWER DISPLAY COMMENTS 11+1+11 I I 1I 1[ I Get into function mode. I I,lui ""! I Select function 3 Baud rate for console terminal pOri = 9600 11+1+\01 11+1+101 Il o l21'l o !ol I+H+I,I II+H+I II+H+I II+I+H I joj'I+H H Ipl+ltl I H+I+I Band rate for auxiliary port = terminal port. 300 = one fourth of 1200 Back to 1200 Back to 300 Now In register mode 111+111 Current PC sl10wn on lower LEOs. 3-29 Console port = 1200 AUXiliary port = 300. 3.12.5 Function 4 - Release Protection There is an area of RAM that the DeTlI-EM normally prevents you from directly altering from the keypad. This area is called the keypad monitor scratch pad and occupies the memory space from addresses 7400 to 7777. Refer to Paragraphs 5.2 and 5.4.1 for more information about the keypad monitor and this protected area. Additionally, if you have a console terminal connected to your OCT I I -EM, there are two other areas of RAM that are protected. These areas are the console monitor scratch pad and the symbol table. They occupy the memory space from addresses 6500 to 7377. Again, more information is provided in Chapter 5. Activating function 4 releases the protection associated with these memory spaces. Note that "protection" refers to protection from direct alteration via the keypad or console terminal. Programs that you write can and will alter these locations. Therefore, when you write your programs make sure these spaces are not inadvertantly violated. Protection is restored when you press the HALT switch, when a HALT instruction is encountered, or whenever you restart the OCTI I-EM. When you activate function 4, the upper row of LEOs displays: 111+111 and the lower row of LEOs displays the current value of the Pc. Function 4 - Example You want to alter location 7400, a normally protected location. LOWER UPPER DISPLAY KEY DISPLAY jFNCI 11+1+1 1 1 1 1 i 1 1 1 [J 1 1,1"1+1 EXA f ! I i !+I i 1 1 I ~ : H1 I Current PC shown 011 lower LEOs' COMMENTS Get mto function mode. Select function 4. Protection off. Alter the location. 11+1+11 Most recently exalll' ined (lddress shown on lower LEOs. I H+i,11 Alter 7400 1+1+1+1 3-30 G ~ I H+I'! I H+ITH 1 1+1 1+1°1 I :+!+I 7 !exAI H+I+H I+H+iOI 0 I+I+!+I 1+l l+i 1 o 2 Enter 2 Restore protection by pressing the HALT switch. 0 111+1 11 Current PC shown on lowt<r LEDs Protection reslOred 'OW try to alter location 7400. IADAI I H+i'i 1 H+I·i+1 !exA! 10!0]71-[°101 leLAI 1: luI'i : 1 11I ' !' i I ' 1 !exAI 101+ °1+1 1 E 1I 1+1 : 1 0 When you try 10 clear 7400 you get a flashing error rnt:ssage Currenl PC shown on Now In rI~gls!er mode lower LEOs. See Appendix C for more information on error messages. 3-31 3.13 KEYPAD COMMAND SUMMARY OPERATION PRESS ENTER PRESS ALTER MEMORY IADRI LOCATION ADDRESS IEXAI ALTER REGISTER IREGI REGISTER NUMBER IEXAI CANCEL BREAKPOINTS IFNCI G IEXAI EXAMINE MEMORY IADRI LOCATION ADDRESS IEXAI EXAMINE REGISTER IREGI REGISTER NUMBER EXECUTE PROGRAM EJ GO WITH LEOs IFNCI D IEXAI RELEASE PROTECTION IFNCI Q IEXAI SET BAUD RATES IFNCI ~ IEXAI SET BREAKPOINT IBPT SET WATCHPOINT IBPTI SINGLE STEP I SST START CONSOLE IFNCI I ENTER REFERENCE NEW CONTENTS 3.6 NEW CONTENTS 3.4 3.12.1 3.5 3.3 3.7 3.12.2 3.12.5 3.12.4 3.8.2 BREAKPOINT ADDRESS IBACI I WATCHPOINT ADDRESS 3.83 3.8.1 GJ 3-32 IEXAI 3.12.3 CHAPTER 4 CONSOLE OPERA nON 4.1 INTRODUCTION This chapter explains how to operate the DCTll-EM using a console terminal. Using a console terminal simplifies program development because it gives you access to the DCTll-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 DCTll-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 watch points • Load programs from a host computer • Perform a variety of other console functions. You can connect an RS232-C compatible console terminal to your DCTI1-EM as shown in Figure 4-1. STANDARD 25-PIN CONNECTOR AND CABLE t CONSOLE TERMINAL -=------.~~ J4 rTTTTTl ~ 00000 ITIIIIl DOD DO 00000 00000 M" 10~55 DCT11-EM Figure 4-1 Connecting a Console Terminal to the DCTII-EM No other wiring or jumpering is required. Use the DCTII-EM keypad to set the correct baud rate by activating function 3 (see Paragraph 3.12.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 VI.O TEM> and the console monitor is ready to accept your input. The following default conditions are set when the console monitor is started: I. 2. The stack pointer is set to 6500 The PASS2, NOHOST. INSTRU, SYMBOL, and VTOFF operating modes are set. More information about the stack pointer is given in Paragraph 5.2.1. The operating modes are described in detail elsewhere in this chapter and are summarized in Paragraph 4.18, 4.2 TRANSFERRING CONTROl. BETWEEN THE CONSOLE TERMINAL AND THE KEYPAD Either the console or the keypad can control the DCTII-EM. but not both at the same time, From the keypad. your primary means of transferring control to the console is by activating function 2 (see Paragraph 3.12.3). You can regain keypad control by pressing the HALT switch. When you press the HALT switch. DCTII-EM operation is stopped and the LEDs display the current Pc. From the console. you can transfer control back to the keypad by typing in the EXIT command or by executing a HALT instruction. 4.3 GENERAL RULES FOR CONSOLE INPUT Information you input via the console terminal is typically in the form of commands. instructions. or data, In general. your input should conform with the following guidelines. I. Your input line must not exceed 96 characters in length, If you exceed this limit. the console terminal does not accept further input until you type in a CTRLjC or CTRLjY. Then. you must reinput the line. 2. Any number of commands and instructions can be strung together on a line as long as the line docs not exceed 96 characters. 3. Commands or instructions strung together on a line should be separated with a space or a comma. Extra separation characters (space, tab. line feed. form feed) between commands or instructions on a line are ignored. 4. If a command or an instruction in a one-line string causes an error. the commands or instructions following it are ignored. 5. Extra separation characters (space, tab, line feed, form feed) inserted between parts of a command or instruction are ignored. 6. Information preceded by a semicolon on a line is interpreted as a comment and is ignored by the DCT11-EM. 4-2 7. Pressing the DELETE key deletes characters on a line. As characters are deleted, they are echoed (preceded by a slash character) on the console terminal if you are in VTOFF mode. The console monitor defaults to VTOFF mode when it is started or restarted. Type in the VTON command if you are using a video terminal as a console device. VTON mode eliminates the echoing of deleted characters. Typing in VTOFF returns you to VTOFF mode from VTON mode. 8. A line is terminated by pressing the RETURN key. Characters on a line are ignored until you press RETURN. In all the examples in this chapter, a RETURN is used to end your input line unless otherwise noted. A summary of the various forms of acceptable console input is given in Paragraph 4.18. Information about specific commands and instruction formats is given elsewhere in this chapter. 4.4 CONSOLE CONTROL COMMANDS The DCTlI-EM recognizes several control commands that allow you to easily perform a variety of operations from the console terminal. These commands and their typical uses are listed in Table 4-1. Table 4-1 Meaning Control Command Summar), Typical Use CTRL/U CTRL/X Delete line. You made several typing errors in your input line. You want 10 cancel CTRL/R Display linc. You used the DELETE key several times while typing your input line. You want to see a clean version of the line you are editing. CTRI./S Suspend execution. You want to suspend the operation of the console monitor or the execution of a currently running program. CTRL/Q Resume execution. You have previously used the CTRL/S command and want to resume operation. CTRL/C CTRL/Y Abort operation. You wanl to abort the current operation of the DCTII-EM and input a new line. CTRL/O Ignore host message. You are in HOST mode (see Paragraph 4.17.1) and want to ignore information currently being sent by your host computer. CTRL/A Select option. You arc in TALK or LOA D modes (see Paragraphs 4.17.3 and 4.17.4) and want to select one of these four options: exit, resume. send break, send CTR 1./ A. the line and try again. 4.5 EXPRESSIONS Several commands and instructions accept expressions as parameters. This paragraph familiarizes yeu with expressions and provides the rules for their definition. If you wish to ignore the use of expressions for the moment, you can advance to the paragraph that describes the command or function you are interested in. You can return to this paragraph when you need more detail on how to define an expression for a particular command or instruction. 4-3 An expression is simply a user-definable combination of one or more components called terms that represents a 16-bit number. There are three types of terms allowable in a DCTlI-EM expression: • • • Numeric Literal Symbolic Numeric terms are either octal or decimal numbers. Octal numbers can be any sequence of the digits 0 through 7. Decimal numbers can be any sequence of the digits 0 through 9 followed by a decimal point (.). Do not attempt to define decimal fractions. Examples of Numeric Terms 100702 377 39874. A literal term is an ASCII character you use as data. Precede an ASCII character with an apostrophe (') to form a literal term. Examples of Literal Terms '. 'E '4 Symbolic terms are values symbolized by names wbich are defined according to the rules in Paragraph 4.13. Examples of Symbolic Terms RI P$PORC SUM Terms are joined together in an expression by binary operators. (The word binary in this case means that at least two terms are involved.) The DCTlI-EM allows six types of binary operators: + (addition) - (subtraction) • (multiplication) / (division) & (logical AND) ! (logical OR) The unary (one term) operators, + (plus sign) and - (minus sign), can only be used at the beginning of an expression (or parenthesized term). Multiple unary operators are not valid. Expressions are evaluated from left to right with no operator hierarchy rules. Two types of brackets can be used to nest ex pressions up to seven levels deep. Use angle brackets « » as you would arithmetic parentheses and use square brackets (D) if you want the DCTII-EM to substitute the enclosed information with the contents of the memory word it addresses, Note that if the information in square brackets represents an odd address, it is first rounded down. 4-4 A quick way to evaluate the octal value of an expression is to type in the expression followed by a question mark. This command has the form: expression? Expressions - Examples The following are examples of valid OCT II-EM expressions. You can verify the octal values of these expressions by using the question mark command. Expression Octal Value 65209 7077+ 189.+'E -2*<300/25>+ 70 120.*<-8.> 177777&25+3 177271 007501 000046 176100 000030 4.6 EXAMINING REGISTERS There are two ways to examine registers. One way is to type in the appropriate register symbol followed by a question mark. This command has the general format: register symbol? where the register symbol (RO, RI, etc.) is as defined in Paragraph 4.13.1. Another way to examine registers is to type in the SHOWRE command. The SHOWRE command displays the values of all the registers and the PS in ascending order. If a watch point has been set, it is also displayed. Paragraph 4.14.1, which describes program debugging, gives you an illustration of the SHOWRE command. 4.7 ALTERING REGISTERS Registers are altered by using an equal sign to set the register to the desired value. The general format for this is: register symbol=expression where the register symbol (RO, Rl, etc.) is as defined in Paragraph 4.13.1 and the register is set to the value of the expression. (See Paragraph 4.5 for expression formats and conventions.) Altering Registers - Example Alter and examine the values of RO and the SP. TEM> RO=65. TEM> SP=6500 TEM> RO? SP? 000101 006500 TEM> 4.8 EXAMINING AND ALTERING MEMORY LOCATIONS-INTRODUCTORY CONCEPTS There are several ways to examine and alter memory locations. Before discussing the specific techniques, there are some introductory concepts you should be familiar with. 4-5 4.8.1 The Address Pointer The address pointer specifies your current open location, i.e., the address of the location currently available to you for alteration. It is important to keep track of the address pointer because it determines where in memory you deposit information. As you will discover later, most commands which alter and examine memory locations are closely linked to the value of the address pointer. This paragraph gives an overview of how the address pointer can be affected. Since the OCT II-EM recognizes a period (.) as the symbol for the address pointer, you can manipulate the value of the address pointer just as you would any other symbol (see Paragraph 4.13.2). For example, to set the value of the address pointer use an equal sign: .=expression where the value of the address pointer is determined by the expression (see Paragraph 4.5). To determine the current value of the address pointer, use a question mark: .) Another way to set the address pointer is to use the backslash (\) character. The general format for a backslash command is: expression\ where the value of the address pointer is determined by the expression. This command also displays the memory location specified by the expression (see Paragraph 4.9). There are two other commands which affect the address pointer. These commands are the caret (") command and the RETURN (or null line input) command. The effects of these commands depend upon which output format mode the OCT II-EM is in (see Paragraph 4.8.2). A description of their effects is given in Paragraphs 4.9 and 4.10. When you type in a program, the OCT 1 I-EM automatically increments the address pointer for each instruction or data object you input. Note that whenever you power up, the address pointer is initialized to zero. Do not confuse the address pointer with the PC (program counter). They are unrelated. As you type in a program, the address pointer is incremented, but the PC is unaffected. And the execution of a program will affect the PC but not necessarily the address pointer. 4.8.2 Output Formatting Modes When you examine memory locations, the values the OCT I I-EM displays on the console depend upon your current output formatting mode. There are five output formatting modes: INSTRU, WORD, BYTE, SYMBOL, and ABSOLU. The INSTRU (or instruction disassembly) mode causes memory locations to be displayed as disassembled DCTII-AA instructions. INSTRU is one of the modes that the DCTI1-EM is initalized to when you power up. 4-6 The WORD and BYTE modes cause memory locations to be displayed octally. Set the WORD mode (by typing in the WaR D command) if you want the values of memory locations to be displayed as l6-bit ..-ords. Set the BYTE mode (by typing in the BYTE command) if you want the values of memory locations to be displayed as individual bytes. If you are in WORD or BYTE mode. type in the INSTR U command to return to instruction disassembly mode. Notice that the INSTRU, WORD. and BYTE commands are mutually exclusive. To summarize: Mode Memory Locations Are Displayed As INSTRU BYTE WORD Disassembled DCTII-AA instructions 8-bit octal bytes l6-bit octal words Odd addresses (i.e., upper bytes) can only be examined in BYTE mode. If you try to examine an odd address in INSTRU or WORD mode, an error message results. The SYMBOL and ABSOLU modes determine how the symbols you have defined in your program are to be displayed. You will usually use SYMBOL and ABSOLU in conjunction with instruction disassembly (lNSTRU) mode. If your program contains user-defined symbols (see Paragraph 4.13), these symbols will be displayed only if you are in SYMBOL mode. SYMBOL is one of the modes the DCTII-EM is initialized to when you power up. If you want user-defined symbols to be displayed as octal values, type in the ABSOLU command to set the ABSOLU mode. Typing in SYMBOL restores the SYMBOL mode. Note that SYMBOL and ABSOLU are mutually exclusive. To summarize: Mode User-Defined Symbols Are Displayed As SYMBOL ABSOLU Symbols Octal values 4_9 EXAMINING MEMORY LOCATIONS This paragraph summarizes the commands with which you can examine memory locations. The examples in this paragraph are intended to give you a general idea of what to expect when you use these commands in different output formatting modes. One way to examine a memory location is to type in the desired memory location followed by a backs lash. The general format for this command is: expression\ where the memory location you examine is determined by the value of the expression (see Paragraph 4.5). The backslash command also sets the address pointer, so a location examined with a backslash becomes the current open location. 4-7 Examining Memory Locations - Example I Use the backslash command to examine a memory location. Try this in different output formatting modes. You have not altered any memory locations from their initial (power-up) values. TEM> WORD TEM> 2000\ 002000: 000000 TEM> 100\ 000100: 135676 TEM> BYTE TEM> 100\ 000100: 276 TEM> INSTRU TEM> 140000\ 140000: JMP 155334 140004: TEM> Examining Memory Locations - Example 2 You use the backslash command to try to examine location 100 I without first typing in the BYTE command. This causes an error message to be generated. TEM> INSTRU TEM> 1001\ 001001: \\\ ODD ADDRESS TEM> Another way to examine memory locations is to simply press the RETURN key. When you press the RETURN key as a command input, the result depends on both your output formatting mode and the value of the address pointer. If you are in INSTRU mode, RETURN displays the next eight instructions relative to the address pointer. In WORD mode, the contents of the next eight words relative to the address pointer are displayed. In BYTE mode, the contents of the next eight bytes relative to the address pointer are displayed. Note that the RETURN command is ignored when you are loading a program from a host computer (see Paragraph 4.17). 4-8 Examining Memory Locations - Example 3 You want to examine memory locations by pressing the RETURN key. You have not altered these locations since you have powered up. Start with location 1000. TEM> INSTRU TEM> 1000\ 001000: HALT 001002: TEM> 001000: HALT 001002: HALT 001004: HALT 001006: HALT 001010: HALT 001012: HALT 001014: HALT 001016: HALT 001020: TEM> WORD TEM> 001000: 000000 TEM> 001020: 000000 TEM> BYTE TEM> 001020: 000 TEM> 001030: 000 TEM> 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 ." one-line string of bytes or words is numbered from left to right. 'ote that consecutive RETURN keypresses increment the address pointer but nonconsecutive ones do 1000 to 1020 by pressing RETURN twice in a row. In BYTE mode you incremented the address pointer from 1020 to 1030 by pressing RETURN twice in a row. Pressing RETURN only once (as you did in INSTRU mode) had no effect on the address pointer. DOl. For example, in WORD mode you incremented the address pointer from " way to examine a range of memory locations is to use the underscore (_) character. The general format for this command is: expression l_expression2 .. here the beginning of the range is determined by the value of expression I and the end of the range is determined by the value of expression2. See Paragraph 4.5 for expression formats. bpression I should be less than expression2. If it is not, only one location is displayed: the beginning of range location. '. The use of the underscore command has no effect on the address pointer. 4-9 Examining Memory Locations - Example 4 You want to examine groups of memory locations by using the underscore command. Try this command in INSTRU, WORD, and BYTE modes. These memory locations have not been altered since you have powered up. TEM> INSTRU TEM> 2000\ 002000: HALT 002002: TEM> 1004_1012 001004: HALT 001006: HALT 001010: HALT 001012: HALT 001014: TEM> WORD TEM> 1002_1006 001002: 000000 TEM> BYTE TEM> 1005_1020 001005: 000 001015: 000 TEM> INSTRU TEM> 002000: HALT 002002: HALT 002004: HALT 002006: HALT 0020 I 0: HALT 002012: HALT 002014: HALT 002016: HALT 002020: TEM> 000000 000000 000 000 000 000 000 000 000 000 000 000 Notice that the address pointer value of 2000 which was set at the beginning of the example is still 2000 at the end of the example. 4.10 ALTERING MEMORY LOCATIONS You can deposit data into a memory location by setting the address pointer to the address of the location you wish to alter and typing in the information. The address pointer is automatically incremented as you deposit instructions and data to consecutive memory locations (as when you type in a program, for example). If you make an error during data entry, you can use the caret (1') command to decrement the address pointer and retype the input line. In INSTRU and WORD modes, the address pointer is decremented by one word for each caret command, and in BYTE mode it is decremented by one byte for each caret command. 4-10 Altering Memory Locations - Example 1 You type in a short program starting at address 1000. You make an error while typing in the program and use the caret (1\) command to help you correct the error. You then examine the program. The program adds R I to R2 and places the result in R3. The final line restarts the console monitor so that you will get a TEM> prompt after you execute the program. Comments TEM> INSTRU TEM> .=1000 TEM> MOY RI,R3 TEM> ADD R2,R4 TEM> 1\ TEM> ADD R2,R3 TEM> JMP @#140010 TEM> 1000\ 001000: MOY 001002: TEM> 001000: MOY 001002: ADD 001004: JMP 001010: HALT 001012: HALT 001014: HALT 001016: HALT 001020: 001022: TEM> ;you really wanted to type ADD R2,R3 ;decrement address pointer by one word ;type in correct line ;continue typing in program ;now examine your program RI,R3 RI,R3 R2,R3 @#140010 .-\ltering Memory Locations - Example 2 You type in some data starting at location 2000. You type several values on a line, remembering to include separation characters (in this case, spaces) between them. You then examine the data you have typed in. Comments TEM> .=2000 TEM> I 234 TEM> .7 002010 TEM> .=2000 TEM> WORD TEM> ._.+10 002000: 000001 TEM> ;type in four data values ;the address pointer is incremented ;reinitialize the address pointer 000002 000003 ;examine the data 000004 000000 ".11 INSTRUCTION FORMAT This paragraph provides some guidelines for formatting instructions for input to the DCTlI-EM. A complete description of the instruction set is found in the DCT11-AA User's Guide (EK-DCTH-UG). An acceptable instruction consists of the instruction mnemonic followed by the appropriate string of operands (if any). A separation character (space, tab, feed) must be used to separate a mnemonic from its first operand (if any). A comma must appear between two operands in a two-operand instruction. Expressions can be used as operands, if desired. Refer to Paragraph 4.5 for expression formats. 4-11 If you wish, you may enter your instructions in octal format, rather than in assembly language format. Refer to Chapter 6 of the DCTII-AA User's Guide for information on constructing octal equivalents of instructions. 4.12 TYPING II'i A PROGRAM Set the address pointer to 2000 and type in the summation program from Paragraph 3.8 as shown below. TEM> .=2000 TEM> CLR RI TEM> CMP RO,R 1 TEM> BLE 2034 TEM> CLR @#2044 TEM> MOY RO,@#2044 TEM> DEC RO TEM> ADD RO,@#2044 TEM> BYS 2036 TEM> CMP RO,R 1 TEM> BOT 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 INSTRU mode, the following will be displayed. TEM> .=2000 TEM> 002000: CLR 002002: CMP 002004: BLE 002006: CLR 002012: MOY 002016: DEC 002020: ADD 002024: BYS 002026: TEM> 002026: CMP 002030: BOT 002032: HALT 002034: CLR 002036: CLR 002042: HALT 002044: HALT 002046: HALT 002050: TEM> RI RO,RI 002034 @#002044 RO,@#002044 RO RO,@#002044 002036 RO,RI 002016 RO @#002044 The address pointer is automatically incremented each time you type in an instruction. 4-12 ','(l may want to use symbolic names to represent values such as 2044 (the location of the accumulated .. mJ to increase the readability of the program. The next few paragraphs tell you how to define and ..... nipulate symbols. If ~ou want to execute the program and learn how to use the DCTII-EM's console debugging facilities, .t-·ance to Paragraph 4.14. ~13 USING SYMBOLS Tbc OCT II-EM allows you to define symbols in your programs. This paragraph describes the formats mjuired for DCTll-EM symbols and explains the use of the commands which allow you to define and _nipulate symbols. ~13.1 Symbol Names Tbc following characters may be used in symhol names. A through Z o through 9 . (Period) $ (Dollar sign) ." symbol name must not begin with 0 through 9, however . ." symbol name may have any length; however, only the first six characters are stored by the DCTII-EM. Thus, to avoid ambiguities, make the first six characters of your symbol names unique. The following predefined symbol names are reserved. RO RI R2 R3 R4 R5 SP PC PS WP BI B2 B3 B4 Register 0 Register I Register 2 Register 3 Register 4 Register 5 Stack pointer (register 6) Program counter (register 7) Processor status word Watchpoint address Address pointer Breakpoint 1 Breakpoint 2 Breakpoint 3 Breakpoint 4 These predefined symbols must not be used as user-defined symbol names, although they can be used as arguments in expressions, instructions, or commands. OCTlI-EM directives, commands, and OCTll-AA instruction mnemonics (e.g., MOY, ADD, JMP) are also reserved and must not be used as symbol names. 4-13 4.13.2 Commands That Define And Manipulate Symbols There are two ways you can define a symbol. One way is to use the equal sign (~) 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 II-EM to display the symbol and its value as it performs the deletion. Predefined symbols (see Paragraph 4.13.1) cannot be deleted with the DELETE command. Predefined symbols can be redefined, however, by using the equal sign. When you define a symbol, it is stored in an area called the user symbol table. There is sufficient space in the user symbol table to store up to 66 symbols. If you try to define more than 66 symbols, you will cause an error message to be generated. If you want to display your user symbol table, type in the SHOWSY command. The symbols are displayed in the order in which you defined them, starting with the most recently defined symbol. If you want to delete your entire symbol table, type in the CLEAR command. The CLEAR command is typically used at the beginning of a long program or a program you are loading in from a host computer (see Paragraph 4.17). CLEAR gives the program plenty of room in the symbol table for symbols and avoids conflicts between symbol names in the program and any symbol names you may have previously defined. If you want to display the value of an individual symbol, type in the symbol followed by a question mark (?). The general format for this is: symbol? 4-14 Defining and Manipulating Symbols - Example 1 You set the address pointer to 1000 and define the symbols FIRST, SECOND, and THIRD. You experiment with displaying and deleting these symbols. TEM> CLEAR TEM> .=1000 TEM> FIRST: TEM> SECOND=FIRST+IOO TEM> THIRD=SECOND+300 TEM> SHOWSY THIRD = 001400 SECOND= 001100 FIRST = 001000 TEM> DELETE FIRST FIRST = 001000 TEM> SHOWSY THIRD = 001400 SECOND= 001100 TEM> CLEAR TEM> SHOWSY TEM> SECOND is set equal to 1100 because FIRST equals LOOO at the time of definition. If you delete FIRST after you delete SECOND SECOND will be unaffected. 4.14 EXECUTING AND DEBUGGING PROGRAMS Refer to the summation program you typed in (Paragraph 4.12). You will make some minor changes to this program and use the DCTll-EM's debugging facilities to observe its operation. First, replace memory location numbers with symbolic names (see Paragraph 4.13). TEM> ILLIN=2034 TEM> SUM=2044 TEM> OVFLO=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 ~.1400 10 instruction at location 2032 which restarts the console monitor when executed. TEM> .=2032 TEM> JMP @#140010 TEM> 'ow set your initial conditions as follows. TEM> RO=IOO TEM> PC=2000 TEM> SP=6500 TEM> 4-15 Then execute the program by typing in the GO command. TEM> GO TEM> To check the result. examine SUM. TEM> SUM\ SUM : 004040 TEM> This is the correct sum in octal of the numbers from 0 to 100 (octal). 4.14.1 Using The Watchpoint The DCTII-EM recognizes WP as the symbol for the watch point. Set the watchpoint address by using the eq ual sign command. The general format for this is: WP=expression where the watchpoint address is determined by the value of the expression. For example, to monitor the accumulated sum in your program, set your watch point at the location SUM. TEM>WP=SLM TEM> Now reset your initial conditions (set RO= I 00) and execute the program. After you receive the TEM> prompt, use the SHOWRE command to examine your registers. TEM> SHOWRE RO = 000000 RI = 000000 R2 = 000000 R3 = 000000 R4 = 000000 R5 = 000000 SP = 006500 = 002000 PC PS = 000004 SUM : 004040 TEM> Notice your watch point appears as well. Another way to examine the watehpoint is to use the question mark command. WP? displays numerically the watch point address. [WPj? displays numerically the watchpoint contents. TEM> WP? 002044 TEM> [WPj? 004040 TEM> The watch point can be cleared by setting it to zero or by typing in the CANCEL command, which not only clears the watch point but the breakpoints as well. 4-16 •. 14.2 Using the Single-Step Function Single stepping is accomplished by typing in the STEP command. STEP executes the instruction at the current PC and displays: (1) the new values of your registers and watchpoint, and (2) the next instruction to be executed. To experiment with the STEP command, reset the initial conditions for your program (set RO= I00) and type in STEP. You can then continue single stepping by repeatedly pressing the RETURN key. TEM> STEP RO = 000100 RI = 000000 R2 = 000000 R3 = 000000 R4 = 000000 R5 = 000000 SP = 006500 PC = 002002 = 000024 PS SUM : 004040 002002 : CMP RO,RI 002004 : TEM> RO = 000100 RI = 000000 R2 = 000000 R3 = 000000 R4 = 000000 R5 = 000000 SP = 006500 PC = 002004 = 000020 PS SUM : 004040 002004 : BLE ILLIN 002006 : TEM> RO = 000100 RI = 000000 R2 = 000000 R3 = 000000 R4 = 000000 R5 = 000000 SP = 006500 PC = 002006 = 000020 PS SUM : 004040 002006 : CLR @#SUM 002012 : TEM> RO = 000100 RI = 000000 R2 = 000000 R3 = 000000 R4 = 000000 R5 = 000000 4-17 SP = 006500 = 002012 PC PS = 000024 SUM : 000000 002012 : MOV RO,@#SUM LOOP: TEM> RO = 000100 RI = 000000 R2 = 000000 R3 = 000000 R4 = 000000 R5 = 000000 SP = 006500 PC = LOOP PS = 000020 SUM : 000100 LOOP: DEC RO 002020 : TEM> RO = 000077 = 000000 RI R2 = 000000 R3 = 000000 R4 = 000000 R5 = 000000 SP = 006500 = 002020 PC PS = 000020 SUM : 000100 002020 : ADD RO,@#SUM 002024 : TEM> RO = 000077 RI = 000000 R2 = 000000 R3 = 000000 R4 = 000000 R5 = 000000 SP = 006500 = 002024 PC = 000020 PS SUM : 000177 002024 : BVS OVFLO 002026 : TEM> The program is functioning properly; RO is getting decremented and added to SUM. 4-18 4.14.3 Using Breakpoints The use of breakpoints with a console terminal is similar to the use of breakpoints with the keypad (see Paragraph 3.8.2). The OCT I I-EM recognizes BI, B2, B3, and B4 as the symbols for the four breakpoints. Set a breakpoint ~ using the equal sign command. The general format for this is: breakpoint symbol=expression _here the breakpoint is determined by the value of the expression. F<l4" example, to set breakpoints at locations 2020 and 2024 in the summation program (as you did with the lC) pad), type in: TEM> BI=2020 TEM> B2=2024 TEM> 'ow reset your initial conditions (set RO= 100, PC=2000) and execute the program. TEM> GO BREAK POINT ENCOUNTERED 002020: ADD RO,@#SUM 002024: TEM> 'fou get a message which indicates that your first breakpoint (BI) was encountered by the console monitor. T() determine the current state of your program, type in the SHOWRE command. TEM> SHOWRE RO = 000077 Rl = 000000 R2 = 000000 R3 = 000000 R4 = 000000 R5 = 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 POIl\T ENCOUNTERED 002024: BVS OVFLO 002026: TEM> the console message appears (this time because of B2), and you again examine the state of your program. TEM> SHOWRE RO ~ 000077 R I ~ 000000 R2 ~ 000000 R3 ~ 000000 R4 ~ 000000 R5 ~ 000000 SP ~ 006500 PC ~ 002024 PS ~ 000000 SUM: 000177 TEM> You see that the first addition was performed correctly. You can continue to observe the operation of the program by typing in the GO and SHOWRE sequence as just shown. To examine a breakpoint, type in BI?, B2?, B3?, or B4? Breakpoints can be cleared by setting them to zero or by typing in the CANCEL command, which not only clears the breakpoints but the watch point as well. 4.t5 Dellt-EM DIRECfIVES As a convenience for users who are familiar with assemblers (and in particular the PDP-II MACRO-II assembler), the DCTlI-EM recognizes several directives which are similar to those used in the MACROII language. These directives are listed in Table 4-2 with a brief explanation of their operation. For detailed information about how to use these directives in your programs, refer to the PDP-II MACRO-II Language Reference Manual (AA-5075A-TC). 4-20 Tabl.4-2 DCTII-E'VI Direeli,es Directive Form Operation \SCII /string/ Generates a block of data containing the ASCI] equivalent of the character string (enclosed in delimiting characters), one character per byte. The delimiting characters i.:an be slashes or any other visible character. The ASCII code for each character is ~torcd in successive bytes of memory starling at the location indicated by the current address pointer. The address pointer is advanced by the length (in characters) of the enclosed string. BLKB expr Reserves a block of storage space whose length in bytes is determined by ehe specified expression. The current address pointer is advanced by the value of the expression. BLKWexpr Reserves a block of storage space whose length in words is determined by the specified expres::>ion. The current address pointer is advanced by two times the value of the expressIon. BYTE exprl, expr2, , . , Generates successive bytes of data: each byte contains the value of the corresponding specified expression. The lower eight bits of each expression art: stored in successive bytes of memory, starting at the location indicated by the curren I address pointer. The address pointer is advanced by the number of expressions given. The last expression must not be followed by a comma. Ensures that the current address pointer contains an even address by adding I if it is odd. .ORD exprl. cxpr2, . . Generates successive words of data; each word contains the value of the corresponding specified expression. The value of each expression is stored in successive words of memory starting at the location indicated by the current address pointer. The addre::.s pointer is advanced by two times the number of expressions given. The last expre:'>sion must not be followed by a comma. 4.16 MISCELLANEOUS CONSOLE FUNCTIONS The DCTII-EM has a HELP facility which displays all the commands available to you. To invoke this b.ility, type in HELP. lou can display the current operating modes of the OCT II-EM by typing in the SHOWMO command . • ben you first power up, typing in the SHOWMO command displays the default operating modes: PASS2 NOHOST INSTRU SYMBOL VTOFF The operating modes that can be displayed are: PASSI, PASS2. HOST, NOHOST, INSTRU, WORD, J)TE, SYMBOL, ABSOLU, VTON, and VTOFF. See the command summary in Paragraph 4.18 for ~f descriptions of these modes. The command summary also contains references to paragraphs that aplain the modes in detail. The DCTII-EM has a REPEAT function which allows you to repeatedly input a line of commands or -,ructions. The form of this command is: REPEA T expression, input line 4-21 where the input line is executed the number of times specified by the value of the expression. One application of the REPEAT command is to fill memory. For example, the REPEAT 1000,NOP command will fill 1000 (octal) locations with NOP instructions. The REPEAT command also lets you single step without having to press the RETURN key repeatedly (see Paragraph 4.14.2). The REPEAT 7, STEP command, for example, single steps through your program seven times. Repeat Command - Example A third application of the REPEAT command is to move blocks of memory. You must specify the beginning and ending addresses of the range to be moved (the source range) and the beginning address of the destination range. The general format for a command sequence which moves a block of memory is: TEM> .=destination TEM> REPEAT <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 1000 through 1010 to 2030 through 2040, type in the following. TEM> .=2030 TEM> REPEAT <1010-1000>/2+1,[.+1000-2030] 4.17 LOADING THE DeTlt-EM FROM A HOST COMPUTER This paragraph describes how to load information (usually a program) from a host computer into your DCTIl-EM. Two broad areas are covered. First, you are familiarized with the console monitor commands that initiate and control the host loading process. Second, you are shown how to prepare a DCTll-EM loadable program on your host. 4.17.1 Configuring the DCrU-EM for Host Loading Since host loading is accomplished through the use of console monitor commands, you must have your DCT1I-EM connected to a console terminal. Your host computer must have a serial communication line capable of sending data to the DCTll-EM in ASCII text format. Connect the serial line from the host to the DCTll-EM auxiliary serial port connector (13) as shown in Figure 4-2. STANDARD 25-PIN CONNECTOR AND CABLE HOST COMPUTE R CONSOLE TERMINAL j3 rTTTTTl ~ 00000 ITIIID 00000 VT100 00000 00000 DCT11-EM """ 10254 Figure 4-2 Connecting a Host Computer to the DCTII-EM 4-22 No other wiring or jumpering is required. Set the baud rate of your console terminal equal to the baud rate of your host line. Use the DCTll-EM keypad to set the same baud rate for the console serial port by activating function 3 as described in Paragraph 3.12.4. Also make sure you are set up to transmit and receive characters in the following format: asynchronous, ASCII, 8 bits (eighth bit is always space), no parity, one stop bit. You need not set the baud rate of the auxiliary serial port. When you communicate with a host, the DCTlI-EM automatically sets the baud rate of the auxiliary serial port equal to the baud rate of the console serial port. Activate function 2 as described In 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 I TEM> MOY R HOST> This is a message from the host ... TEM> MOY RO.R2 TEM> :You were typing MOY RO.Rl ;You type O.R2 and the previous line is restored. 4.17.3 The TALK Command Typing in the TALK command allows you to communicate directly with the host just as if the DCTIIEVI were not there. It has the same effect as connecting the serial line from the host directly to your .:onsole terminal. 4-23 Typically, you might use the TALK mode to prepare a DCT II-EM loadable file with your host's editing facilities (sec Paragraph 4.17.5). The user LED is illuminated in TALK mode. There are two ways to cancel TALK mode. One way is to press the BREAK key on the console. The DCT II-EM responds: CONSOLE BREAK TEM> and you not only cancel TALK mode but HOST mode as well. The other way is to type in CTRL/A. The DCT II-EM responds: E (EXIT), R (RESU'vIE), B (SE"JD BREAK)," A (SEND I\A)? If you type in the letter E, TALK mode is canceled but HOST mode is not. Note that typing in CTRL/ A ("A) in TALK mode gives you three other options. You can send a break or CTRL/ A character to the host by typing in Bar CTRL/ A, respectively. Typing in an R or any characters other than E, B, or CTRL/ A, causes TALK mode to be resumed. 4,17.4 The LOAD Command Use the LOAD command only after you have prepared a DCTII-EM loadable program on your host as explained in Paragraph 4.17.5. Typing in the LOAD command allows you to communicate directly with the host just as the TALK command does. In LOAD mode, however, the DCTII-EM constantly monitors the characters received from the host and begins loading if it sees the .ST AR T directive. To initiate host loading while in LOAD mode, therefore, simply enter a command (which depends on the particular host you are using) that types out your program on the console terminal. For example, if you were using a VAX/VMS host, you would use TYPE PROG.TXT to type out the file PROG.TXT on your terminal. Since your DCTlI-EM loadable program always has the .START directive as its first line, typing the program causes the DCTII-EM to start loading. NOTE During the loading process, the DCT 11-EM accepts input from both serial ports simultaneously. As a rule, do not press keys on the console terminal during loading since this interferes with your host's input. The only exception to this rule is the use of the CTRLjO command (see below). Once loading begins, it continues until the .END directive is received or until an error in the incoming program is detected. In both cases, when loading stops, you are returned to HOST mode. If loading stops as a result of an error in your program, the portion of the program that follows the error will be displayed on your console terminal as a "message" from the host. If loading is terminated by an error in your program, you can suppress further display of the program by typing in the CTRLjO command. CTRLjO causes the DCTlI-EM to ignore messages from the host until you press the RETURN key. If you want to terminate output from the host, enter CTRLjO followed by the TALK command followed by the appropriate interrupt control sequence your host recognizes (such as CTRL/Y or CTRL/C). 4-24 Note that the user LEO is illuminated in LOAD mode. Also note that pressing BREAK or typing in CTRL/ A has the same effect in LOAD mode as in TALK mode. 4.17.5 Preparing OCfIl-EM Loadable Programs on a Host In general, you will find it convenient to use your host's editing facilities to create programs. This is particularly true if the programs are long or require extensive alteration. In order to prepare a program the DCTlI-EM will accept, keep the following in mind. Make sure the .START directive precedes your program. The DCTII-EM will not be able to load your program unless it first sees the .START directive. Next, realize that when your program is loaded into the DCTII-EM, the OCTII-EM will behave as if each line of your program were being entered by you directly from the console terminal. This means that the rules and conventions of console monitor input apply also to each line of the program you create on your host. The one exception is that the null line command (i.e., pressing RETURN to examine successive memory locations) is disabled during host loading. If your program contains undefined symbols or expressions (for example, a "forward reference"), prepare your program as two identical segments. Precede the first segment with the PASSI command and the second segment with the PASS2 command. The idea behind the PASSI and PASS2 commands is as follows. Normally, the DCTII-EM does not allow you to input undefined symbols. This mode of operation is called the PASS2 mode (PASS2 is one of the power-up default modes of the DCTl I -EM). The use of undefined symbols in your programs, however, is commonly desirable. for example, consider the following program segment. CMP #177700,RI BNE .+14 INC R2 CMP R2,#200 BLO .+4 CLR R2 MOV R2,R3 In this example, you are branching to a defined location (i.e., the location that contains the MOV R2,R3 instruction), but are doing so in a cumbersome way. You need to perform a calculation for each branching instruction. An easier way to write this program segment would be: CMP # I 77700,R I BNE THERE INC R2 CMP R2,#200 BLO THERE CLR R2 THERE: MOV R2,R3 But if the DCTII-EM is in a mode in which it rejects undefined symbols, an error results when you try to input BNE THERE. The DCTII-EM solves this problem by having a mode of operation in which undefined symbols are tolerated called the PASS I mode. 4-25 In the PASS] mode, the DCTll-EM substitutes the value zero for each undefined symbol encountered in expressions except when the undefined symbol is the operand of a branch instruction. In that case, the value of the current address pointer is substituted for the value of the branch operand. If an undefined symbol is later defined through the use of an equal sign (~) or colon (:), the symbol is entered into the symbol table with its proper value. NOTE Undefined expressions involving the address pointer are never tolerated, not even in PASSl. For example if A, B, and C are undefined, the following are unacceptable: .=A .BLKB B .BLKW C Make sure the .END directive terminates your program. A DCTll-EM Loadable Program - Example 1 Use your host's editing facilities to create the summation program presented in Paragraph 3.8. Comments from the original program are shown in lowercase, and comments added for the benefit of the example are shown in uppercase. ,START , = 2000 CLR Rl CMP RO,Rl BLE 2034 CLR @#2044 MOY RO,@#2044 DEC RO ADD RO,@#2044 BYS 2036 CMP RO,Rl BGT 2016 HALT CLR RO CLR @#2044 HALT .END ;THIS LINE MUST APPEAR FIRST. ;ENTER THE PROGRAM STARTING AT LOCATION 2000. ;Set Rl ~ O. ;RO contains n. ;Illegal input (n < 0)° ;No, start operation by clearing 2044. ;Place first value of n in 2044. ;n ~ n~1 ;Add next value (n~ I) to 2044. ;Overflow? ;No. ;Continue operation if n > O. ;Operation complete if n ~ O. ;Yes, illegal input. Clear RO, 2044. ;Yes, overflow. Clear 2044 only. ;Illegal input or overflow occurred. ;STOP HOST LOADING . 4-26 .4. DCTlI-EM Loadable Program - Example 2 In this example, the summation program above is changed slightly such that forward references to the symbols ILLIN and OVFLO are made. Since these symbols are undefined when first referenced, you must create the program in two segments to make it acceptable to the DCTII-EM. .sTART CLEAR PASSI . = 2000 BEGIN: LOOP: ILLlN: OVFLO: CLR RI CMP RO,RI BLE ILLIN CLR @#2044 MOV RO,@#2044 DEC RO ADD RO,@#2044 BVS OVFLO CMP RO,Rl BGT LOOP HALT CLR RO CLR @#2044 HALT PASS2 . = 2000 BEGIN: LOOP: ILLlN: OVFLO; .END CLR RI CMP RO,RI BLE ILLIN CLR @#2044 MOV RO,@#2044 DEC RO ADD RO,@#2044 BVS OVFLO CMP RO,Rl BGT LOOP HALT CLR RO CLR @#2044 HALT ;THIS LINE MUST APPEAR FIRST. ;DELETE ALL PREVIOUSLY DEFINED ;SYMBOLS. ;PERFORM FIRST PASS INPUT OF PROGRAM. ;ALLOW UNDEFINED SYMBOLS AND SET ;THEIR VALUES TO ZERO. ;INPUT THE PROGRAM STARTING AT ;LOCATION 2000. ;Set Rl = 0. ;RO contains n. ;lIIegal input (n <: OJ? ;No, start operation by clearing 2044. ;Place first value of n in 2044. ;n = n-I ;Add next value (n-I) to 2044. ;Overflow? ;No. ;Continue operation if n > 0. ;Operation complete if n = 0. ;Yes, illegal input. Clear RO, 2044. ;Yes, overflow. Clear 2044 only. ;Illegal input or overflow occurred. ;PERFORM SECOND PASS ENTRY OF ;PROGRAM. ;SYMBOLS ARE NO LONGER UNDEFINED AND ;ARE ASSIGNED CORRECT VALUES. ;UNRESOLVED ADDRESSES ARE RESOLVED. ;iNPUT THE PROGRAM AGAIN STARTING AT ;LOCA nON 2000. ;Set RI = 0. ;RO contains n. ;lIlegal input (n <: OJ? ;No, start operation by clearing 2044. ;Place first value of n in 2044. ;n = n-I ;Add next value (n-l) to 2044. ;Overflow? ;No. ;Continue operation if n > 0. ;Operation complete if n = 0. ;Yes, illegal input. Clear RO, 2044. ;Yes, overflow. Clear 2044 only. ;IIlegal input or overflow occurred. ;STOP HOST LOADING . 4-27 4.17.6 An Illustration of the Host Loading Process This paragraph steps you through a session with the DCTII-EM during which you load the summation program you created on your host (see example I, Paragraph 4.17.5). Assuming you are in NOHOST mode, the first step is to get into LOAD mode by typing in: TEM> HOST LOAD Press RETURN until your host responds with its usual prompting character(s). Then direct your host to type or otherwise display on the console terminal the program you wish to load. This command might be in the form: TYPE SUMM where TYPE is the the command your host recognizes to display the program and SUMM is the name you gave the program. When the host starts typing the program, the following appears on your console terminal. (This program does not contain any undefined symbols and requires only one pass.) .START TFM> :THIS LINE MUST APPEAR FIRST. TEM> CLEAR :DELETE ALL PREVIOUSLY DEFINED TEVf> :SYMBOLS. TEM> . ~ 1000 :ENTER THE PROGRAM STARTING AT TEM> ;LOCA TION 2000. TF\1>CLRRI ;Set RI = O. TEM> CMP RO,R I ;RO contains n. TE'v1> BLE 2034 :Illegal input (n < 0),' TEM> CLR 0#2044 :No, start operation by clearing 2044. TEM> MOV RO,~,#2044 ;Place first value of n in 2044. TEM> DEC RO ;n = n-I ;Add next value (n-I) to 2044. TEM> ADD RO,~,#2044 ;Overfiow'J TEM> BVS 2036 TEM> CMP RO,R I ;No. TEM> BGT 2016 ;Continllc operation if n > O. TFM> IIALT ;Operation complete if n = O. TEM> CLR RO ;Yes, illegal input. Clear RO, 2044. TEM> CLR ([I #2044 ;Yes, overflow. Clear 2044 only, :Illegal input or overflow occurred. TEM> HALT TEM> E\D ;STOP HOST LOADING. HOST> <your hosl's prompt appears on the last line> The DCTII-EM successfully loaded your program and you are now back in HOST mode. The console monitor can now respond to your input. If you type in 2000, you can examine the program you just loaded by pressing RETURN repeatedly. 4-28 If your program is successfully being loaded into the DCTlI-EM, each line is preceded by the TEM> prompt. If a program line causes a console error message, loading stops but typing continues (without the TEM> prompt). 4.18 CONSOLE COMMAND SUMMARY General Form Operation expr Deposit the expression in RAM unless the expression is part of another command. Advance the address pointer accordingly. instr Assemble and deposit the instruction at the location indicated by the address pointer. Advance the address pointer accordingly. Display the contents of the locations from expr 1 through expr2. If expr 1 is greater than expr2. only exprl contents displayed. expr? Display numerically the value of the cxpression. expr\ Set the address pointer to the value of the expression. Display the contents of the location specified by the expression. null line Display, relative to the address pointer, the next eight instructions if in INSTRU mode. the next eight words if in WORD mode, or the next eight bytes if in BYTE mode. If single stepping, single step again. sym bol~expr Define the symbol to be equal to the expression. symbol: Define the symbol to be equal to the current value of the address pointer. Decrement the address pointer by one byte if you are in BYTE mode or by one word if you are in WORD or INSTRU mode. Form Paragraph Reference ABSOLU 4.8.2 Sets the ABSOLU mode. Causes user-defined symbols in programs to be displayed as numeric values. .ASCII jstringj 4.15 Generates a block of data containing the ASCII equivalent of the character string (enclosed in delimiting characters), one character per byte. .BLKB expr 4.15 Reserves a block of storagc space whose length in bytes is determined by the specified expression. .BLKWexpr 4.15 Reserves a block of storage space whose length in words is determined by the specified expression. Operation 4-29 .BYTE expr I, expr2, ... 4.15 Generates successive bytes of data; each byte contains the value of the corresponding specified expression. BYTE 4.8.2 Sets the BYTE mode for memory examination and alteration operations. Causes memory to be displayed as three digit bytes. CANCEL 4.14.1 4.14.3 Clears all four breakpoints and the watch point. CLEAR 4.13.2 Clears the user symbol table. DELETE symbol 4.13.2 Deletes user-defined symbol from the user symbol table. .END 4.17.4 Used at the end of programs that are to be loaded into the DCTII-EM from a host. Causes the DCTII-EM to terminate host loading if in LOAD mode . . EVEN 4.15 Ensures that the current address pointer contains an even address by adding I if it is odd. EXIT 4.2 Transfers console control to the keypad. GO 4.14 Executes the user program at the current PC value. HELP 4.16 Displays a table of commands. HOST 4.17.1 Sets the HOST mode. Allows the DCTII-EM to receive messages from a host. INSTRU 4.8.2 Sets the INSTRU mode. Data is displayed as DCTII-AA assembly language instructions. Is set by default when the DCTII-EM is powered up. LOAD 4.17.1 Sets the LOAD mode. Establishes host communication. Allows the DCTII-EM to begin loading if it encounters the .START command. NOHOST 4.17.1 Clears the HOST mode. Is set by default when the DCTII-EM is powered up. PASSI 4.17.5 Sets the PASS I mode. Allows the use of undefined symbols. PASS2 4.17.5 Sets the PASS2 mode. Requires all symbols to be defined. Is set by default when the DCTlI-EM is powered up. 4-30 REPEAT expr,cmd 4.16 Repeatedly performs the specified command(s) by the number of times specified by the expression. SHOWMO 4.16 Displays the current operating modes of the DCTII-EM. SHOWRE 4.6 Displays the contents of user registers and the watch point if the watchpoint is set. SHOWSY 4.13.2 Displays the contents of the user symbol table. START 4.17.5 Used at the beginning of programs that are to be loaded into the DCTlI-EM from a host. Causes the DCTII-EM to start host loading if in LOAD mode. STEP 4.14.2 Executes one instruction of a user program at the current value of the Pc. Displays the contents of user registers and the watch point if the watch point is set. Displays the next instruction to be executed. SYMBOL 4.8.2 Sets the SYMBOL mode. Causes user-defined symbols in programs to be displayed as symbols rather than as numeric values. Is set by default when the DCTII-EM is powered up. TALK 4.17.1 Sets the TALK mode. Establishes host communication. Allows you to communicate directly with a host as if the DCT II-EM were not there. Typically used for program development on a host. \TOFF 4.3 Sets the VTOFF mode. Causes deleted characters to be echoed (preceded by a slash) on the console terminal when you press the DELETE key. Is set by default when the DCT I I-EM is powered up. \TON 4.3 Sets the VTON mode. Characters you delete by pressing the DELETE key are not echoed in this mode. Typically used if you have a video terminal for a console. WORD exprl, expr2, ... 4.15 Generates successive words of data; each word contains the value of the corresponding specified expression. 4-31 4.19 CONTROL COMMAND SUMMARY Command Meaning Typical Use CTRL/U CTRL/X Delete line. You made several typing errors in your input line. You want to cancel the line and try again. CTRL/R Display line. You used the DELETE key several times while typing your input line. You want to see a clean version of the line you are editing. CTRL/S Suspend execution. You want to suspend the operation of the console monitor or the execution of a currently running program. CTRL/Q Resume execution. You have previously used the CTRL/S command and want to resume operation. CTRL/C Abort operation. You want to abort the current CTRL/Y operation of the DCTlI-EM and input a new line. CTRL/O Ignore host message. You are in HOST mode (sec Paragraph 4.17.1) and want to ignore information currently being sent by your host computer. CTRL/A Select option. You are in TALK or LOAD modes (see Paragraphs 4.17.3 and 4.17.4) and want to select one of these four options: exit, resume, send break, send CTRL/ A. 4-32 CHAPTERS SOFTWARE 5.1 INTRODUCTION This chapter provides some information about the DCTII-EM monitor and introduces you to monitor subroutines you can use in your programs. The chapter also describes how address space is allocated in the OCT I I-EM and shows you which areas are available and unavailable for use. This material is summary in nature. More detailed information can be found in the OCT II-EM monitor listing (see Appendix A) and in the DCTII-EM schematics (see Appendix B). 5.2 THE MONITOR The monitor is a PROM resident program that controls the operation of the DCTII-EM. Its main purpose is to provide an environment in which you can develop and run programs. The portion of the monitor that allows you to operate the OCT I I-EM with the keypad is called the keypad monitor and the portion that lets you usc a console terminal is called the console monitor. When you learned how to operate the OCT I I-EM with the keypad and console in Chapters 3 and 4, you were really learning how to get the monitor to do things for you. When you execute a program, the monitor relinquishes control of the DCTII-EM to your program. Control is returned to the monitor (i.e., the monitor is restarted) by any of the following ways: I. 2. 3. 4. 5. 6. 7. 8. Pressing the HALT switch Executing a HALT instruction Encountering a breakpoint or executing a BPT instruction Attempting to execute an illegal instruction Performing a single step Sending a BREAK from a console terminal Executing a JMP @#14001 0 instruction Sending a CTRL/C or CTRL/Y command from a console terminal The first two ways (1 and 2) always return control to the keypad monitor. The remaining ways (3 through 8) return control to the keypad monitor if you are using the keypad or the console monitor if you are using a console terminal. When control is returned to the kcypad monitor, the PC is displayed on the LEOs and you are in register mode. (If a flashing error message appears on the LEDs, press the HALT switch or any key to display the PC.) When control is returned to the console monitor, a TEM> prompt is displayed on your console terminal. Refer to Appendix A for details about how the HALT and BPT instructions interact with the monitor. Also refer to Appendix A for information on the effects of setting the T-bit. 5-1 When you return control to the monitor, the DCTll-EM registers contain the values they had at the time your program slopped with the following exceptions. I. If you execute a JMP @#140010 instruction, the PC is restored to the value it had when your program started. This allows easy restarting of the program. 2. If you type CTRL/C or CTRL/Y from a console terminal, all the DCTI1-EM registers are restored to the values they had when your program started. 3. If you encounter a breakpoint, the stack pointer is set to the value it had just before the break point occurred. 5.2.1 The Stack Pointer The monitor initializes your stack pointer to 7400 when you power up. The monitor also checks to make sure your stack pointer is in the range 4 through 7400, inclusive (for the keypad monitor), or 4 through 6500, inclusive (for the console monitor), before it allows your program to execute. It is up to you, however, to make sure the stack pointer has a reasonable value before you attempt to run a program. For example, it is a good idea to make sure your stack pointer and the information you push onto the stack do not overlap your program. To decrease the chance of this happening, set the stack pointer well above the area in which your program resides. 5.3 MONITOR SUBROUTINES Several portions of the DCTll-EM monitor arc accessible to your programs as subroutines. If you want to use one of these subroutines in your program, simply include a JSR instruction in the form: JSR PC,@#subroutine where subroutine refers to the address of the desired subroutine. Subroutine mnemonics arc defined within the monitor only, so make sure your program defines these mnemonics before it uses them as symbols. 5.3.) KeYI'ad/LED Subroutines Address Mnemonic Descril'tion 140014 DGDISP Display Hex Digit Takes the value contained in the lower four bits of RO and displays it as a hexadecimal number on the LED digit indexed by R I. Values of R 1 correspond to LED digits as follows. Uses RO and RI . . :3 '1 07 05 03 0' ., 10 06 04 0' 00 5-2 Address Mnemonic Description 140020 UPDlSP Display Octal Number on Upper LEOs Takes the value in R2 and displays it as a six-digit octal number on the upper row of LEOs. Uses RO and R I. 140024 LODISP Display Octal Number on Lower LEOs Takes the value in R2 and displays it as a six-digit octal number on the lower row of LEOs. Uses RO and R I. 140030 DECDSP Display Decimal Number Takes the value in R 1 and displays it as a five-digit decimal number on the row of LEOs indexed by R2. R2 = 12 for the lower row, R2 = 13 for the upper row. Uses RO, R I, R2, and R3. 140034 UPBLNK Clear Upper Row Blanks out the upper row of LEOs. Uses RO and R I. 140040 LOBLNK Clear Lower Row Blanks out the lower row of LEOs. Uses RO and R 1. 140044 GETKEY Get Key Number Turns on LEDs and waits for a keypress. When a keypress occurs, takes the number of the key and stores it in R I. Keys are numbered as follows. BGGDG BGDGD 8GDG[J GBGDG 140050 BCDKEY Convert Key ;\lumber to BCD Takes the key number in R 1 and converts it to a BCD value for the keys 0 through 9. Returns 12 for the CLR key and 13 for the EXA key. Returns -I (i.e., 177777) for any other key. Stores the result in R I. 5-3 Address Mnemonic Description 140054 GETNUM Input Number From Keypad Displays the value in R2 as a six-digit octal number on the lower row of LEDs. Enables the user to modify the value of R2 using keys 0 through 7 and CLR. Stores modified value in R2 when the EXA key is pressed. Uses RO, R I, and R2. 5,3.1.1 Using the LEDs and Keypad - This paragraph contains some information you may find useful when writing programs that use the LED, and keypad. This is intended as introductory material only. For further detail, refer to the monitor listing in Appendix A and the DCTlI-EM schematics in Appendix B. You can create your own characters to display on the LED digits. First, form bytes that represent the segment patterns of the characters you wish to display as shown in Figure 5-1. '/ /' dp. ,I g o Ie dp , 9 d , MfI-10348 d Figure 5·1 LED Segment Assignments For example, 0 II 10100 (or 164 octal) corresponds to the letter h and aI 00 IIII (or I 17 octal) corresponds to the numeral 3. Then, move the bytes containing the segment patterns to locations 7712 through 7725. Thcsc locations (collectively called SEGBUFj are used by the LED interrupt service routine in the monitor to display segment patterns on the LEDs. Each location (byte) corresponds to an LED digit as shown in Figure 5-2. UPPER ROW OF 77'25 7723 7721 7717 7715 7713 Lf:llS LOWER ROW 7724 7722 7120 7716 7714 7717 OF LEOS Figure 5-2 SEGBUF Assignments For example, if you moved 164 (octal) to location 7721, 117 (octal) to location 7717, and a 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 R5 SOB R5,. 5-4 The LED interrupt (INTA) is disabled (i.e., the LEOS arc turned off) by writing 0000 I 0 to port C of the 8255A chip. This also disables the user LED. To turn on the user LED (which, incidentally, also disables the LED digits), write 000011 to port C of the 8255A chip. Examples of displaying values on the LEOs are provided in Paragraph 5.3.1.2. You can also create your own interrupt service routines to respond to keypresses. When a key is pressed, program control is transfered to the routine pointed to by 7676. If 7676 is zero, keypresses are ignored. The number of the key pressed is available to your routine through RI. See the description of the GETKEY subroutine in Paragraph 5.3.1 for key numbers. In order for a keypress to be sensed, the LEOs must be enabled. This can be done by writing 000007 to location 177444 as explained above or by executing your program from the keypad with the "Go With LEOs" special function (see Paragraph 3.12.2). At the end of your keypress service routine, include the sequence: MOY (SP)+,R2 MOY (SP)+,RI MOY (SP)+,RO RTI to restore the state of your interrupted program. As an example, here is a program which loops on itself and increments R3 each time a key is pressed. To check the operation of the program, start it at location 1000 and press keys. Press HALT and examine R3. Address Data 1000 1002 1004 1006 1010 1012 1014 1500 1502 1504 1506 1510 012737 000007 177444 012737 001500 007676 000774 005203 012602 012601 012600 000002 Symbolic Representation Comments MOY #7,@#177444 :enable keypad MOY #1500,@#7676 ;attach interrupt rouline BR 1006 INC R3 MOY (SP)+,R2 MOY (SP)+,R I MOY (SP)+,RO RTI ;Ioop infinitely :interrupt service routine 5.3.1.2 Using Keypad/LED Subroutines - Example Programs - The following examples show you how to use keypad/LED subroutines. Example 1 - Countdown Program This program decrements a number at a rate inversely proportional to the number's size. The program bcgins by displaying the word "EntEr" on the upper row of LEOs. You enter a number (which is displayed on the lower row of LEOs) and press the EXA key. The number is displayed as it is decremented. The program initializes itself at the end to allow you to enter another number. There are undefined symbols in this program, so if you enter the symbolic version via the console terminal, make sure you incorporate the PASSI and PASS2 commands as described in Paragraph 4.17.5. 5·5 Address Data 1000 1002 1004 1006 1010 1012 1014 012701 007713 012700 000006 116021 001063 005201 1016 077004 1020 1022 1024 1026 1030 1032 1034 1036 1040 1042 1044 1046 1050 004737 140054 005702 001774 012701 000003 004767 000012 077103 005302 004737 140024 000765 TEST: Symbolic Representation Comments SEGBUF = 7712 LODISP = 140024 GETNUM = 140054 ;LED segment buffer ;octal number on lower LEDs ;input number from keypad . = 1000 ;position program at location ;1000 MOY #SEGBUF+I,RI ;point to rightmost ;digit of upper row of LEOs ;set digit count = six digits MOY #6,RO TEST!: MOYB ENTER-I (RO),(R 1)+ TEST4: TST R2 BEQ TEST2 MOY #3,RI TEST3: JSR PC,DELA Y ;transfer character to ;digit in upper row of LEDs ;advance pointer to next ;digit in upper row of LEDs ;Ioop to transfer all six ;characters ;input an octal number from ;the keypad ;reject zero as an input ;if zero, get a new number ;call delay routine three ;times ;wait a while SOB RI,TEST3 DEC R2 JSR PC,@#LODISP ;decrement entered number ;display new value BR TEST4 ;see if we have zero yet INC RI SOB RO,TEST! TEST2: JSR PC,@#GETNUM ;DELA Y loops a number of times inversely proportional to the size ;of R2. Thus there is a smaller delay when R2 is large. 1052 1054 1056 1060 012700 177777 160200 103376 1062 000207 DELAY, MOY #-I,RO ;set dividend DELAY I: SUB R2,RO BCC DELAY I ;divide by successive ;subtraction; keep ;subtracting until ;underflow occurs RTS PC ; ENTER is a list of bytes corresponding to the segment patterns ; "EntEr". 1064 1066 1070 052171 074570 000120 ENTER: .BYTE 171,124,170,171,120,0 5-6 Example 2 - Clock Program This program displays a minutes and seconds clock on the lower row of LEOs. The values for minutes and seconds are obtained from a timer maintained by the monitor. You can use the INT switch to set minutes. Note that the upper row of LEOs and the left-most digit of the lower row display the current contents of the LED segment buffer for those digits. All symbols referenced in this program are defined. The symbolic version of the program will run if entered as follows. As an exercise, try to modify the program so that the upper row of LEOs and the leftmost digit of the lower row of LEOs are blank when the program is running. Address Data Symbolic Representation Comments PFVEC = 24 = 7730 TIME SEGBUF = 7712 MINUTS = 776 140030 OECOSP P$PORC = 177444 SETIME = 1200 ;INT switch vector ;upper six bits count seconds ;LEO segment buffer ;Iocation to hold minutes count ;display decimal number ;LEO/keypad I/O port on 8255A ;subroutine to set minutes 1000 1000 1002 1004 1006 1010 1012 1014 1016 1020 1022 1024 1026 1030 1032 1034 1036 1040 1042 1044 1046 1050 1052 1054 1056 1060 1062 1064 1066 1070 1072 1074 012706 006500 106427 000000 012737 001200 000024 005037 007730 005067 177750 112737 000007 177444 032737 001000 007730 001774 032737 001000 007730 001374 013701 007730 000301 006201 006201 042701 177700 001010 005267 ;position program at lac. 1000 MOV #6500,SP ;initialize stack pointer MTPS #0 ;sct low priority MOV #SETIME,@#PFVEC ;connect minute set ;routine to INT switch CLR @#T1ME CLR MINUTS ;clear seconds and second ;fractions ;clear minutes MOVB #7,@#P$PORC ;turn on LEOS LOOP: BIT # I OOO,@#TIME ;wait for seconds to ;change LOOP!: BEQ LOOP BIT #1000,@#TIME CLOCK: BNE LOOPI SHOWIT: MOV @#TIME,RI SWAB ASR ASR BIC RI RI RI #1 77700,RI BNE INC .+22 MINUTS 5-7 ;show time ;get seconds ;mask out fractions of ;seconds ;not a new minute (BN E eLK I) ;else count minutes Address Data 1076 1100 1102 1104 1106 1110 1112 1114 1116 1120 1122 1124 1126 1130 1132 1134 1136 1140 1142 1144 1146 1150 1152 1154 1156 1160 177676 026727 177672 000074 103402 005067 177662 016702 177656 012700 000003 006302 010246 006302 006302 062602 077006 060201 012702 000010 004767 136656 112737 000100 007716 000725 CLKI: LOOP2: Symbolic Representation Comments CMP ;overflow? MINUTS,#60. BLO .+6 CLR MINUTS ;no (BLO CLKI) MOV MINUTS,R2 ;get minutes MOY #3,RO ;shift minutes over three ;digits ;multiply R2 by 10 to shift ;one decimal digit to the left ASL R2 MOY R2,-(SP) ASL R2 ASL R2 ADD (SP)+,R2 SOB RI),LOOP2 ADD R2,RI MOY #10,R2 ;Ioop three times to make X 1000 ;add minutes to seconds ;index lower display JSR PC,@#DECDSP ;display time MOVB #100,@#SEGBUF+4 ;display dash between ;minutes and seconds BR LOOP = 1200 005037 007730 012706 006500 106427 000000 000717 1200 1202 1204 1206 1210 1212 1214 SETIME: CLR @#TIME ;reset seconds to increment ;minutes MOY #6500,SP ;reinitialize stack MTPS #0 ;reinitialize priority BR SHOWn ;display new time As an exercise, try to modify the program so that the upper row of LEDs and the left-most digit of the lower row of LEDs are blank when the program is running. 5.3.2 Console Subroutines Address Mnemonic Description 140060 GETLIN Get Input Line Types an angle bracket and space (> ) as prompting characters and awaits input from the console terminal. Echoes characters as they are typed in. Stores these characters (up to 96 pcr line) in a character buffer. Uses RO, R3. 5-8 Address Mnemonic Description 140070 GETCH Get Character Retrieves the character indexed by R3 from the character buffer. R3 must have a value from 0 to 137 octal (95 decimal). Stores the character in the lower byte of RO and increments R3. Lowercase characters are converted to uppercase. Sets the N condition code bit if the character is a separator (space, tab, feed). Sets the C condition code bit if the character has been converted from lowercase to uppercase. Uses RO, R3. 140100 GETCHC Get Character Preserve Case 1 Retrieves a character with its case intact from the character buffer. Uses R3 as an index to the character. R3 must have a value from 0 to 137 octal (95 decimal). Stores the character in the lower byte of RO and increments R3. Uses RO, R3. 140104 GETNXT Get Character, Ignore Separators Retrieves the next character in the character buffer which is not a separator (space, tab, feed). Uses R3 as a starting point index. R3 must have a value from 0 to 137 octal (95 decimal). Stores the character in the lower byte of RO and increments R3 in accordance with the number of separators encountered. Lowercase characters are converted to uppercase. Sets the C condition code bit if a character has been converted from lowercase to uppercase. Uses RO, R3. 140120 CRLF Type Carriage Return, Line Feed Types a carriage return and line feed on the console. 140124 CHROUT Type One or Two ASCII Characters Takes the value in the lower byte of RO and types it as an ASCII character on the console. If the upper byte of RO has a nonzero value, it is also typed as an ASCII character on the console. Uses RO. 140134 CHR02 Send Byte to Auxiliary Port Takes the value in the lower byte of RO and sends it to the auxiliary serial port. Uses RO. 140140 ASCOUT Type One ASCII Character or String Takes the value in the lower byte of RO and types it on the console either as an ASCII character or as an ASCII string of characters. ASCII strings that can be typed include <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 I. 5-9 Address Mnemonic Description 140160 TYPOCT Type Octal Number Types the value in R I on the console as a six-digit octal number if in the INSTRU or WORD output formatting modes. Types the lower byte of R I on the console as a three-digit octal number if in BYTE mode. Uses RO, Rl. 140164 TYPDEC Type Decimal Number Types the value in R I on the console as a signed five-digit decimal number followed by a period. Uses RO, R I. 5.3.2.1 Console Character Manipulation - The console subroutines just described provide most of the functions YOll will require to manipulate characters via the console. If you require other fUllctions, refer to the monitor listing in Appendix A. Keep the following in mind when using the GETCH, GETCHC, and GETNXT subroutines. When you use these subroutines, characters you input via the console terminal are stored in a 96-character buffer maintained by the monitor called BUFFER. All three subroutines use R3 as a pointer to determine which character within BUFFER is retrieved. Since BUFFER is 96 characters in length, R3 can have a value from 0 through 137 (octal), inclusive. For your convenience, the subroutines automatically increment R3 to point to the next character to be retrieved. 5.3.2.2 Using Console Subroutines - Sample Program , ; NIM for the TEM , ; In this version of NIM, there are 21 sticks. The game requires 2 ;players (the user and the TEM). The players take turns picking up ; I, 2, or 3 sticks. The object of the game is to leave I stick for ;the other player to pick up in the last turn. The algorithm used ;by the TEM ensures that it will win if it goes second, or if it goes ;first and the other player leaves it an opportunity to win. : Operation of the game is explained by prompts. All responses by the ;user must be terminated with a carriage return. However, several ;responses may be typed together on a line, separated by commas, and ;will be taken as needed by upcoming prompts for input. ; There are undefined symbols in this program, so if you enter the ;sym bolic version via the console terminal, make sure you incorporate ;the PASSI and PASS2 commands as described in Paragraph 4.17.5. 5-10 ;•••••••••• SYMBOL DEFINITIONS ••••••••••• CLEAR ;empty symbol table MONITR = 140010 ;reentry point for monitor G ETLIN = 140060 ;get a line from the console GETNXT = 140104 ;get next significant character from BUFFER CRLF = 140120 ;send <CR>,<LF> to console CHROUT = 140124 ;send a character to console PRINT A = 140144 ;print an ASCII string TYPDEC = 140 )64 ;type a decimal number on the console CR LF SPACE STICKS = IS 12 = 40 = 21. = ;<CR> ;<LF> ;space ;initial number of sticks , ; •••••••••••• START OF PROGRAM •••••••••••• , = 1000 NIM: MOY #GREET,RI JSR PC,@#PRINTA ;print greeting message on console ;show no sticks taken yet ;(number of sticks left = STICKS - R5) NEWGAM:CLR R5 NEW): CLR R3 MOY #MEORU,RI JSR PC,@#PRINTA JSR PC,@#GETLIN JSR PC,@#GETNXT CMPB RO,#'M BEQTEMGO CMPB RO,#,Y BEQ USERGO CMPB RO,#'Q BNE NEWI JMP @#MONITR ;ask who plays first ;wait for response from console ;get first meaningful character ;m(e) means TEM goes first ;y(ou) means user goes first ;q(uit) means return to monitor ;If user has not entered a valid response, ;prompt for response again, 5-11 USERGO: MOY #LEFTI,RI JSR PC,@#PRINTA MOY #STlCKS,RI SUB R5,RI MOY Rl,R2 JSR PC,@#TYPDEC MOY #LEFT2,R 1 JSR PC,@#PRINTA JSR PC,@#CRLF USERl: MOY #400*SPACE+'/,RO JSR PC,@#CHROUT SOB R2,USERI USER2: NEXT: ;prinl header for number of sticks left ;calculate number of sticks left ;save a copy of result ;type decimal value on the console ;finish message ;start a ncw line ;put in RO the character pair "/" ;type a "stick" on the screen ;Ioop to type the appropriate number ;of slicks ;get next character ;is it a comma? ;yes, get next move from line. JSR PC,@#GETNXT CMPB RO,#', BEQ NEXT MOY #HOWMNY,R 1 JSR PC.@#PRINTA JSR PC,@#GETLIN JSR PC,@#GETNXT ;ask how many slicks the user wants ;get a line ;get first/next meaningful character ;on line CMPB RO,#'l BlO USER2 ;illegal response, throwaway line and ;try again CMPB RO,#,3 BHl USER2 SUB #,O,RO ADD RO,R5 CMP R5,#STlCKS-1 BlO TEMGO BHIUSER4 MOY #IlOSE,R 1 JSR PC,@#PRINTA JMP NEWGAM USER4: TEMGO: ;illegal response ;convert digit in RO into a number ;add to sticks already taken away ;is only 1 stick left? ;no, it's TEM's turn ;user took too many sticks ;announce the loss ;ask a bOUl another game MOY #GOOFED,R I 1SR PC,@#PRINTA 1MP NEWGAM ;tell the idiot that he goofed up ;and ask about another game MOY #MYMOYE,R 1 JSR PC,@#PRINTA ;type beginning of TEM's move on ;console ;get number of sticks taken so far ;implemcnl algoritm to select mOve: ;if R5 MOD 4 ~ 0, take 2 sticks ; R5 MOD 4 ~ I, take 3 sticks ; R5 MOD 4 ~ 2, take 2 sticks MOY R5,RI NEG Rl BIC #l77774,Rl BNE TEMI MOY #2,RI 5-12 TEMl: ADD RI,R5 JSR PC,@#TYPDEC MOY #MYMOYl,RI JSR PC,@#PRINTA CMP R5,#STICKS-l BLO USERGO MOY #IWIN,Rl JSR PC,@#PRINTA JMP NEWGAM ; R5 MOD 4 = 3, take I stick ;show how many sticks TEM is taking ;finish message ;is there only 1 stick left? ;no. it's the user's turn ;announce the victory ;and ask about a new game GREET: .BYTE CR,LF .ASCII /NIM for the TEM/ .BYTE CR,LF,O MEORU: .BYTE CR,LF .ASCII /Who goes first" Me (M) or you (Yp (Q to quit)/ .BYTE 0 LEFT I : .BYTE CR,LF .ASCII /There are / .BYTE 0 LEFT2: .ASCII / sticks lef!./ .BYTE 0 HOWMNY:.BYTE CR,LF .ASCII /How many sticks will you take? (1,2, or 3)/ .BYTE 0 MYMOYE: .BYTE CR,LF .ASCII /1 take / .BYTE 0 MYMOYI: .ASCII / stick(s)./ .BYTE 0 ILOSE: .BYTE CR,LF,LF .ASCII /You win!!! I demand a rematch!! .BYTE 0 IWIN: .BYTE CR,LF,LF .ASCII /1 win .. ! Want to try again?/ .BYTE 0 GOOFED: .BYTE CR,LF,LF .ASCII /You goofed up' Can you get it right this time? / .BYTE 0 5.4 DeTIt-EM ADDRESS SPACE OCT I I-EM address space is organized as shown in Figure 5-3. Functionally, the address space consists of: standard RAM space, expansion RAM space. monitor space, I/O space, space available for external hardware, and reserved space. 5-13 177777 AVAILABLE FOR EXTERNAL HARDWARE 177600 177577 1;0 SPACE 177400 177377 AVAILABLE FOR EXTERNAL HARDWARE AVAILABLE FOR EXTERNAL HARDWARE 167377 160000 157777 MONITOR 120000 117777 100000 77777 AVAILABLE FOR EXTERNAL HARDWARE USER RAM (OPTIONAL! 20000 17777 10000 ~~~~LLLLLL~~LLLLLLLLLLLL~ 7777 7400 7377 7320 7317 KEYPAD MONITOR SCRATCHPAQ CONSOLE MONITOR SCRATCHPAD 6500 6477 SYMBOL TABLE USER RAM 144 143 MR lDJr,O Figure 5-3 DCTII-EM Memory Map 5-14 5.4.1 Standard RAM Space Addresses 000000 through 007777 are allocated to the RAM that comes standard with the OCTII -EM, This RAM space is utilized as follows, Addresses Use 000000-000143 Interrupt and Other Vectors, Contains vectors that point to service routines for various interrupt. trace, and trap conditions, See Chapter 6 for specific vector addresses, 000144-006477 User RAM Space, Space available for user programs, 006500-007317 Symbol Table (Console Monitor Only), Can contain up to 66 user defined symbols, 007320-007377 Console Monitor Scratchpad, Area for use by the console monitor. 007400-007777 Keypad Monitor Scratch pad, Area for use by the keypad monitor and console monitor, If you are using only the keypad, thc symbol table and console monitor scratch pad areas arc available to you as user RAM, The monitor ordinarily protects certain areas of RAM from direct alteration, If you are using the keypad only. the keypad monitor scratch pad is the only area of protected RAM, If you are using a console terminal, however, the symbol table, console monitor scratchpad, and keypad monitor scratch pad are all protected, You can remove protection by activating special function 4 from the keypad (see Paragraph lI2,5), -";ote that "protection" refers only to protection from direct aiteration, such as examining a location from the keypad or console and then trying to change the location, An executing program can violate any RAM location, To avoid unpredictable results, therefore, make certain your programs do not inadvertantly write data into areas not available as user RAM, 5.4.2 Expansion RAM Space If you insert two 2 K X 8 RAMs into the expansion sockets (sec Paragraph 5,3), another portion of user RAM space at locations 020000 through 027777 becomes available to you, 5.4.3 Monitor Space The monitor space is the space occupied by the keypad and console monitors which reside in two 8 K X 8 PROMs at locations 120000 through 157777, 5.4.4 I/O Space Locations 177400 through 177577 are designated as space for the OCTII-EM's I/O chips, The 8255A parallel port, the 8251 A auxiliary serial line. and the DC319 OLART console serial line all use this space, The I/O space consists of locations that can be written only and locations that can be written or read, Figure 5-4 provides a detailed breakdown of how the I/O space is used, 5-15 177577 177566 177564 177562 177560 DLART TRANSMITTER DATA BUFFER DLART TRANSMITTER COMMAND/STATUS REG DLART RECEIVER DATA BUFFER 177552 177550 8251 STATUS REGISTER 8251 RECEIVER DATA BUFFER 177544 177542 8255 PORT C IINPUT FROM UPPER 4 BITS) 8255 PORT B 18-BIT INPUT] DLART RECEIVER COMMAND/STATUS REG READ/WRITE I/O SPACE 177500 177477 177452 177450 177446 177444 177442 177440 8251 CONTROL REGISTER 8251 TRANSMIT DATA BUFFER 8255 COMMAND REGISTER 8255 PORT C 10UTPUT TO LOWER 4 BITS) 8255 PORT B (8-BIT OUTPUT] 8255 PORT A (8-BIT OUTPUT) WRITE ONLY I/O SPACE 177400 MA 103~1 Figure 5-4 Map of I/O Space 5.4.5 Space Available For External Hardware The foJlowing space is available to you for any expansion hardware you may wish to design: 040000-077777 160000-167377 167600-177377 177600-177777 An example of a piece of external hardware that could use this space is a RAM board which responds to addresses 040000 through 057777. Further information on hardware expansion is provided in Chapter 6. 5.4.6 Reserved Space The shaded space in Figure 5-3 is reserved and unavailable for use. The addresses affected are: 010000-017777 030000-037777 100000-117777 167400-167577 5-16 CHAPTER 6 HARDWARE 6.1 INTRODUCTION The DCTII-EM hardware is organized as shown in Figure 6-1. In general, the hardware consists of: • • • • • • • • • • • • • • • The DCT II-AA microprocessor RAM Monitor EPROM Peripheral chips and drivers An internal data bus buffer User buffers Microprocessor control signal decoding logic Address latching and range decoding logic Peripheral chip address decoding logic Interrupt logic Timing logic Miscellaneous control logic Keypad/LEOs and supporting logic The HALT and INT push-button switches Connectors The paragraphs that follow provide information on each of these. Refer to the DCT II-EM schematics in Appendix B for further details. Paragraph 6.17 contains a design for an expansion memory board you can build. 6-1 INT2 ECAS)--' CONTROL SIGNALS TCLK-" \~ICROPROrESS()R RDY-- ~ INn INTF INTA INT7 CONTROL LIN~S MICROPROCESSOR VI kVJL HALT E:DMG PF --. ~ IN16 EAI<~ STATE DRIVER V INTB OMR ~ DAl<1500> ==:> USER CONTROL BUS TRI· STATE DRIVER iUSER BUFFERI h ECAS ~ h ARD' 7, ARD03, ARDO) BUFFER ,I I L ___________________________________ ~~;~N HBOIR _ _ --y lBOIR -------to ~ L- I:lKX8 PROM : LOWER BYTE, t== h 0\ I s~ 1::\/vRH-,AROOO N 6116P-2 !UPPER BYTEI 6116P2 2K X 8 EVVRL -.-+- BYTE! ,.....,....- ~ o EVALUATOR ~ OPTIONAL 2K X 8 ""' c:J HALT LPF ROY KCW c ~ 82S5A PORT "'""'" , HUH LCLK -----. BC!.R ______ OC319 L. DLART CONSOLE SERIAL LINE ~ ;'~ INT2 INTF RAM BYTE! L<A:G>, lOP 52 SOCKET OPTIONAL 2K X 8 E k~ RAM L- PC3--. 8251 A AUXILIARY SERIAL D8<07:00> iLOWER BYTE'I • V CHIP DECODER LOGIC E: CONTROL~ L..1..-..INT6 1NT7 r-r-- SIGNALS v LINE TCLK2~,-----tI PERIPHERAL I-- AUXILA.RY CONNECTOR IJ3< I 6 R ...,...... ---v 3 ; --,..... MISCEllANEOUS CONTROL LOGIC riMING lOGIC DlSO, DLSI Figure 6-1 DCTlI-EM System Block Diagram E5EL ROY INTA ERo CONSOLE PU ~ ECA52 SALI,,~L8DIR ElA DRIVERS BRCLK DLA.RT PP1 , CON mOL DLART- EDBIN~ ~ o ::;;C:"" ~-I 08<15'00> SAL<02'01>~ 51 SOCKET I UPPER 'lV 'fV EDBIN--------e ESEL-----+lL.._ _ _----' EVVLB-----' L AD< 15'00>' ' \ AD<15.00> 08<0700> RAM I LOWER k::= k::= ~ tJJ 08<15.08> RAM A. A USER OATA BUS BUFFER DALEN -----tI,L-_ _ _-" ,~ [RD CONNECTOR IJ1' t: 'CLK T~LK ) H DCLK 6.2 DCTI I-AA MICROPROCESSOR The DCTII-AA microprocessor is the heart of the system. A detailed discussion of the operation and architecture of the DCTII-AA is beyond the scope of this book. Refer to the DCTlI-AA User's Guide (EK-DCTII-UG) for this information. At power-up or when a RESET instruction is executed, the DCTII-AA mode register bits are set to the following states and cannot be changed. Mode Register Bits State Mode <15:13> 000 Start address ~ 140000 Restart address ~ 140004 12 II User o 10 9 8 16-bit bus 4 K/16 K memory o o Dynamic memory Normal read/write Standard microcycle o COUT ~ processor clock This mode configuration has the following implications: • Bit < II > ~ I - This allows you to usc either 8-bit or 16-bit data paths in your expansion circuitry designs. If 8 bits, simply use the lower 8 bits of the 16-bit bus. • Bits < I0:09> ~ 10 - This allows you to use inexpensive 16 K dynamic RAMs for off-board memory expansion (see Paragraph 6.17). • Bit <8> ~ 0 - This allows you to design expansion hardware with devices that respond to either normal or delayed read/write controls. If you use devices that respond to delayed read/write controls, include delay circuitry in your design. NOTE Do not use a RESET instruction in your program unless your program reconfigures (i.e., reinitializes) your peripheral chips. RESET causes the DenlAA to assert - BCLR which resets the peripheral chips. 6.3 RAM There are two 2 K X 8 CMOS static RAM chips in the basic DCTlI-EM which provide 4 K bytes of memory space. These RAMs respond to addresses 000000 through 007777. Even numbered or low bytes reside in one RAM, and odd numbered or high bytes reside in the other. There are two expansion sockets on the board which can accommodate two additional 2 K X 8 static RAMs. The RAMs in these sockets respond to addresses 020000 through 027777. One RAM stores low bytes and the other stores high bytes. 6-3 Although the OCT II-AA generates refresh cycles as a result of being set to dynamic memory mode, this is for the benefit of off-board expansion with dynamic RAMs. The on-board static RAMs ignore the refresh cycles. 6.4 MONITOR EPROM The OCT II·EM monitor is contained in two 8 K X 8 EPROM chips. The EPROMs respond to addresses 120000 through 157777. Note that accesses to memory locations above 100000 cause a single cycle slip. This is not only for the benefit of the monitor EPROMs, but also for the peripheral chips and any slow expansion hardware which may be attached. Cycle slips are disabled if the jumper is installed (see Paragraph 2.5), If you install the jumper, make sure you also decrease the microprocessor's 7.5 MHz clock frequency to a value between 3 MHz and 6 MHz by changing the crystal. 6.5 PERIPHERAL CHIPS AND DRIVERS The peripheral chips are the 8255A parallel port, the DC319·AA DLART console serial line, and the 8251 A auxiliary serial line. The DLART and the 8251A have EIA drivers associated with them so that they can communicate with RS232·C devices. The locations reserved for use by the peripheral chips are listed in Table 6·1. Table 6-1 Resened I/O Locations for Peripheral Chips Location Number Location Type 177566 177564 177562 177560 177552 177550 177544 177542 177452 177450 177446 177444 177442 177440 Read/write Read/write Read/write Read/write Read/write Read/write Read/write Read/write Write only Write only Write only Write only Write only Write only Use DLAR T transmitter data buffer DLART transmitter command/status register DLART receiver data buffer DLART receiver command/status register 8251A 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 LEOs and enabling the keypad. These lower four bits are configured as output only. For detailed information on programming the 8255A, refer to the Intel Component Data Catalog (availa· ble from Intel Corp., 3065 Bowers Ave., Santa Clara, CA 95051). The order number is 210298·001. 6·4 6.5.2 DLART Console Serial Line The DLART (DC319-AA) is an asynchronous receiver/transmitter which the DCTII-EM uses to communicate with a console terminal. The DLART can generate receiver, transmitter, and break detection interrupt requests. See Paragraph 6.11 for more information on interrupts. The 800 Hz clock output of the DLART is used to generate the INTA interrupt request which causes the LEOs and keypad to be activated. Again, see Paragraph 6.11. Detailed information on programming the DLART is contained in the DLART Data Sheet (ED-23181). 6.5.3 Auxiliary Serial Line (8251A) The 8251 A auxiliary serial line chip is a universal synchronous/asynchronous receiver/transmitter (USART) which the DCTII-EM uses for general purpose asynchronous serial communications. Typically. the auxiliary serial line is used for communicating with a host computer. The auxiliary serial line features modem control. The Data Carrier Detect and the SYNDET functions of the 8251A, however, are not used in the DCTII-EM. For detailed information on programming the 8251A, refer to the Intel Component Data Catalog (available from Intel Corp., 3065 Bowers Ave., Santa Clara, CA 95051). The order number is 210298-001. 6.6 INTERNAL DATA BUS BUFFER The internal data bus buffer is not accessible to you directly but is the buffer through which most of the data in the DCTII-EM passes. It buffers DAL<15:00>, the microprocessor's primary data bus. 6.7 USER BUFFERS The DCTII-EM has three user buffers. One buffer provides access to DAL<15:00>, the main internal data bus. Another buffer provides access to AI<7:0>, the microprocessor's address interrupt lines. The third buffer provides access to various DCTII-EM control signals. These buffers arc directly accessible through the 60-pin connector. See Paragraph 6.16 for the names of the specific buffered signals available. 6.8 PROCESSOR CYCLE DECODING There is some decoding logic that takes microprocessor control signals and combines them to direct the operation of various chips within the DCTII-EM. Some of these decoded signals are available to you through one of the user buffers. See Paragraph 6.16 for the names of these buffered control signals. 6.9 ADDRESS LATCHING AND RANGE DECODING Memory addresses are latched from DAL< 15:00> when the microprocessor asserts ERAS L. As shown in Figure 6-1, the upper three bits of the latched address are converted (decoded) to signals which enable pairs of on-board ROMs or RAMs. 6-5 Decoded address range signals are also available to your expansion hardware via the 60-pin connector. These signals are ARD02 L, ARD03 L, and ARDI7 L. Figure 6-2 illustrates the address ranges to which these signals correspond. 177777 , - - - - - - - - - - , 110 SPACE AND SPACE AVAILABLE TO EXTERNAL HARDWARE } ARD 17 } ARDIX 160000 1-----------1 157777 MONITOR EPROM 120000 b770=777770=77777777'71 117777 NO CHIP ENABLE SIGNAL AVAILABLE } }AROO3 }AROO2 }AROOl }AROOO '-'Fe 1DJ53 Figure 6-2 Address Range Decoding 6.10 PERIPHERAL CHIP ADDRESS DECODING The peripheral chip decoding logic is similar in function to the address range decoding logic (see Paragraph 6.9). The difference is that this logic generates peripheral chip enable signals instead of memory chip enable signals. Peripheral chips are enabled according to the addressing scheme shown in Paragraph 6.5. The peripheral chip decoding signals are internal to the DCTll-EM and are unavailable for expansion hardware. 6.11 INTERRUPTS AND TRAPS Interrupt vectors are located as shown in Table 6-2. Interrupts are encoded and sent to the DCTII-AA for handling. The DCTII-AA also handles DMA requests and external vector requests via the interrupt logic. Some of the interrupt vectors above point to a "null" service routine. That is, they simply point to an RTI instruction. These include the power-fail, DLART transmitter, external, and 8251 A transmitter interrupts. If you do not write your own service routines and change the interrupt vectors accordingly, these interrupts will have no effect. 6-6 Table 6-2 Interrupt Vector Locations Interrupt Vector Priority Address 000024 000060 000064 000100 000104 000120 4 4 6 6 5 000124 5 000140 7 Type of Interrupt HALT switch and HALT instruction Nonmaskable power fail interrupt (caused by pressing JNT switch) DLART ,oceiver (I"IT3) DLART transmitter (INT2) External interrupt ((NTB) Keypad/LED scanning (I ~TA) 8251 A receiver (1"11'7) 8251A transmille, (INT6) OLART receive, b,oak (lNTF) Other vectors include the following. Vector Address Description 000010 000014 Illegal instruction trap Breakpoint and trace service 6.12 TIMING Fundamental timing signals are generated by: I. 2. A 7.5 MHz crystal oscillator which drives the OCT II-AA microprocessor A 614.4 KHz clock which drives the DLART. The 7.5 MHz signal is also divided down to 1.875 MHz to drivc the 8251 A auxiliary serial line. These signals are unavailable for external use. 6.13 MISCELLANEOUS CONTROL LOGIC There are pieces of logic spread throughout the OCT II-EM that generate miscellaneous control signals. The only signal that the miscellaneous control logic makes available to you is the signal ROY L, which, when asserted, causes a single cycle slip. Note that the installation of the jumper disables the on-board generation of ROY L. 6_14 KEYPAD/LEDS The keypad/LEOs combination communicates with the rest of the DCTII-EM through the 8255A parallel port peripheral chip (sec Paragraph 6.5.1). Note that the lower four bits of port C arc decoded and are used to drivc the LED anodes and keypad simultaneously. These lines are asserted sequentially in response to the INT A interrupt request. 6.15 HALT AND INT SWITCHES The opera ton of the HALT and INT switches is explained in Paragraphs 3.9 and 3.10, respectively. To summarize, pressing the HALT switch asserts the HALT signal which restarts the keypad monitor and unconditionally stops whatever operation was in progress. Pressing the INT switch asserts the PF signal which causes a power-fail interrupt. Power-fail interrupts have no effect unless you write a service routine (vectored by location 24) to handle the interrupts. Both HALT and PF are available to you via the 60-pin expansion connector. 6-7 6.16 CONNECTORS There are four male connectors on the DCTll-EM as follows. Connector Jl Number of Pins J2 60 4 13 J4 25 25 Function Connector for expansion hardware Power supply connector A uxiliary serial line Console serial line J I, 13, and J4 are all standard size connectors. 12 is the connector you assembled when you installed the DCTll-EM. The pin assignments of these connectors are listed in Table 6-3. Table 6-3 DCTIl-EM Connector Pin Assignments 60-Pin Connector for Expansion Hardware (JI) (see Figure 6-3) Pin Number Signal Name Description I 2 ADOO H ADOI H AD02 H AD03 H AD04 H AD05 H AD06 H AD07 H ADM H AD09 H ADIO H ADII H ADI2 H ADI3 H ADI4 H ADI5 H AIO H All H AI2 H AI3 H AI4 H AI5 H AI6 H AI7 H GND RESET L AD<15:00> is the buffered version of DAL<15:00>, the bidirectional multiplexed data/address lines of the DCTlI-AA. 3 4 5 6 7 8 9 10 II 12 13 14 15 16 17 J8 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 PBO H PBI H PB2 H PB) H PB4 H PB5 H PB6 H PB7 H HALT L Al<7:0> is the buffered version of the DCTII-AA's Al<7:0> address interrupt lines. Output only. During DMA transactions, these lines are set to the high impedance state. Buffered control signal. Output only. Corresponds to the DCTII-AA's -BCLR signal. PB<7:0> arc the bidirectjon~1 port B lines of the 8255A parallel port chip. Asserted when HALT switch is pressed. Open collector. 6-8 Table 6-3 Dent-EM Connector Pin Assignments (Cont) 60-Pin Connector for Expa.nsion Hardware (J 1) (see Figure 6-3) Pin Number Signal Name Description 36 PF L Asserted when INT switch is pressed. Open collector. 37 DMR L External DMA request line. Input only. 38 tNTB L External interrupt request line. Input only. 39 VEC L External vector request line. Input only. 40 PI H Buffered control signal. Corresponds to the DCT11-AA's PI signal. Output only. 41 42 GND ARD02 H Decoding signal ror the address range 040000~057777. Output only. 43 ARD03 H Decoding signal for the address range 060000-077777. Output only. 44 ARDI7 L Decoding signal ror the address range 160000~177777. Output only. 45 lACK L Buffered control signal. Interrupt acknowledge. Output only. 46 DMG L Buffered control signal. DMA acknowledge. Output only. 47 SELl H Buffered control signal. Corresponds to DCTII-AA's SELl signal. Output only. 48 49 SELO H WLB L Buffered control signal. Corresponds to DCTII-AA's SElO signal. Output only. Buffered control signal. Correspcnds to DCT1 I-AA·s R/-WlB signal. Set to high impedance state during DMA. Input or output. 50 WHB L Buffered control signal. Corresponds to DCTII-AA's R/-WHB signal. Set to high impedance state during DMA. Input or output. 51 52 GND RAS L 53 54 GND CAS L Buffered control signal. Corresponds to DCTII-AA's -CAS signal. Output only. 55 56 GND DBIN L Buffered control signal. Read enable line. Output only. 57 58 GND COUT H 59 60 GND RDY L Buffered control signal. Corresponds to DCT! l-AA's -RAS signal. Output only. Buffered control signal. Correspcnds to DCTII-AA's COUT signal. Output only. Causes single cycle slip when asserted. Open collector. 6-9 T.ble 6-3 DCfll-EM Connector Pin Assignments (Cont) Power Supply Connector (J2) Pin Number I 2 3 4 Signal Name +12VDC +5VDC GND -12VDC Description Power signal Power signal Power signal Auxiliary Serial Line Connector (J3) Pin Number I 2 3 4 5 6 7 8 9 Signal Name FGND 21 22 23 24 25 Frame ground pcso Serial da ta Oll t PCSI PRTS Serial data in Request to send Clear 10 send Data set ready Signal ground Not used Not used Not used Not used Not used PCTS PDSR GND 10 II 12 13 14 15 16 17 I~ 19 20 Description Not used Nol used Not used Not used PDTR Not used Not used Not used Data terminal ready Not used Not used Not used Not used Not used 6-10 Table 6-3 DCnt-EM Connector Pin Assignments (Cont) Console Serial Line Connector (J4) Pin Number Signal Name Description 1 4 FGND DLSO DLSI RTS 5 6 7 GND Ffame ground Serial data out Serial data in Request to send (always ON) Not used Not used Signal ground Not used Not used Not used Not used Not used Not used Not used Not used Nat used Not used Not used Not used Data terminal ready (always OJ\) Not used Not used Not used Not used Not used 2 3 ~ 9 \0 11 12 13 14 15 16 17 18 19 DTR 20 21 22 23 24 25 59 0 z a 57 55 53 51 0 0 0 G 0 0 0 0 z z z z 49 47 ~ g: r I :;; 45 43 > " § ,n > 41 0 z 0 r 39 ~ n r 37 0 < > r 35 33 3' 29 27 25 I v ~ v ~ v ~ ~ • 0 I I I I ~ r • z 0 23 21 19 17 > n a n S zr ~ m r r , 0 a I 60 58 ~ 56 > 54 > • 52 ~ I ~ r 50 ~ Ii I 48 a < a > > ~ r 46 > > § r I 44 42 , z ~ I r ~ ~ r • ~• v ~ ~ I I I ~ I I I ~ 6 I I ~ ~ ~ > > w ~ I > I I I r 40 38 Figure 6-3 36 34 32 30 28 26 ,. 9 ~ N I ~ ~ 13 •• •" • • 9•• 9> • 8•> 8•> ~• §• •8a I r 15 24 I C I I I I I • • > 8> •§ 8• §• 8> ~ ~ ~ w I I ~ ~ I I " 20 " " " " " 60-Pin Connector Pin Assignments I ~ I I I 8 6 4 I 2/ PC BOARD .., 'Ol',~ ~ 6.17 HARDWARE EXPANSION - EXAMPLE If you plan to develop and run large programs, one of the first expansion hardware circuits you may want to build is a memory module. Figure 6-4 shows a design for a 16 KB module. The module responds to addresses 040000 through 077777. The address range decoding signals, ARD02 Hand ARD03 H, are used to enable the module. Note that the signal names on connector J 1 of the memory module are in the opposite order as those shown on connector JI of the DCTII-EM. This scheme eliminates the need to twist the interconnecting cable. 6-11 16K x 1 2118 AI7 H AI6 H AI5 H AI4 H 13 10 11 12 AI3 H A6 74LS244 DOUT 14 A5 14 A4 14 1i17 E1 AI1 H WHBL---':""OE18~ RAS 15 .F AD 15 H 15 AO RAS L 74 LSOO 2-..J i'dJ 14 H 11 13 Al AI2 H 1 Yl 1 A2 1 Y2 CAS 18 16 14 1 Y3 1 A3 A3 A2 lAl 12 AD 15 H AD 14 H AI) 13 H 1 A4 1 Y4 2Al 2Yl AD 11 H 2A7 2Y2 AD 10 H 2A3 2Y3 AD 9 H 2A4 2Y4 AD 8 H AD 12 H E3 :N DBIN L E4 16K x 1 2118 AI7 H AI6 H AI5 H AI4 H AD101"~ 0\ I tv E16 2 I II 13 10 11 12 74LS244 14 lAl 1 Yl A5 lA2 1 Y2 A4 1 A3 1 Y3 A3 1 A4 lY4 A6 AI3 H A2 AI2 H Al AI1 H AD DOUT E2 I ARD 2 L I AD 2 H 2A4 2Y4 AD 0 H I lG 2G DBINL~ 14 WLB L AD 4 H AD 1 H I ARD 3 I 12 2Y2 E6 14 AD 5 H 2Y3 2Yl 14 DIN I AD 6 H 2A2 17 W LAS L------{)I _ _ ""'\ __ j 14 AD 7 H 2A3 15 CAS 16 ~,. 13 RAS 18 AD 3 H AD 15 H AD 14 H AD 13 H AD 12 H AD 11 H 45 46 47 48 49 50 51 52 AD 10 H AD 9 H AD 8 H AD I H AD 6 H 53 54 AD 5 H AD 4 H AD 3 H 55 56 57 AD 2 H 58 AD 1 H AD 0 H AI7 H AI 6 H AI 5 H 14 AI 4 H AI 3 H AI 2 H All H PI H ARD 2 L ARD 3 L WLB L WHB L HAS L CAS L NOTE. CONNECT A 047 fJ-F CAPACITOR BETWEEN +5 V AND GROUND FOR EACH IC DBIN L E20 8 -+5V E22 Figure 6-4 16 KB Memory Module h r:=t; I~~ Jl APPENDIX A MONITOR LISTING T-11 Evaluation Module Monitor MACRO V05.00 Table of contents 11- 4 2 3 2 15- 2 17- 2 2 2 2- 35- 20- 27323435363739- 44~5- 48~9- 5157- 5859- Sunda~ 13-l'tar-83 04:10 Defini lions Scratch?ad locations in hi::lh RAM Console Serial Line Support Routines General I/O Support Routines Host Line SUPF-ort Routines 110 Initiali:aliclri .!rid LED Driver LED DisPla:l Support Routines Error Condit.ion and StarliJP Entr':l Code 2 2 Eotrs Points 2 2 Key COlllland Routirles 2 Console Monitor 2 2 2 2 2 2 2 2 2 Parsing Routines Directive and \'erb Handlin;! PDuhrli?s S1Jlbol and label HandliM ROIJtinE':Arithaetic Routines Instruction Encode/Decude ROIJtine::. Conversion and T':Ipeout. Routines Power-up Diagnostics Special Dah Structures Spare locations, Check.'3uII" and ROI'l I.D, Ke':lpad l1onit.ol' Special Ke'::Spad Monitor F!Joct.ioll'3 A-I T-11 Evaluation ModulE! Monitor MACRO V05,QO SlJnd.;':l !3-/1u-S3 04:10 PasE' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1-11 E','AL~A::OII NODULE HOmeR Version 1.0 COPYRIGHT eCI 1?32 BY OIGlTAL fOOlP~£NT CORrORArJa,v, MAYNARD, ~A5S. ; THIS SOfTIlAAE IS fURNISliED UIIDER A LICENSE AND HAY BE USE!' AliD ':CPlEf' ; OlU IN ACCOR!lAHCE WITH THE TERMS Of SUCH LICEIISE AND WITH TH, ; IHCLUSI~ OF THE AIIOVE COPYRI5HT NOTICE. THIS SOfTWARE OR AllY OTHER ; COI'IES THEREOF IIA! NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO AllY ; OTl£R P!:R~, NO TITLE TO ANP OWIIERSHIP OF THE SOfTWARE IS HERHY ; TRANSfERRED, ; TIE IIF_TION IN THIS SOFTWARE IS SU8Jm TO CHAlIGE WITHOUT NOTICE ; IIHD SI«lIJl.D HOT 8£ CONSTRUED AS A COHmHENT BY DIGITAL EDUIPHEIH ; CORPalATION, ; DIGITAl ASSUKES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS ; SOFTWARE ON EOUIPHENT WHICH IS NOT SUPPLIED BY DIGITAl, 24 A-2 T·11 Evaluation Hodule Konitor MACRO VOS. 00 Surod .. 13-lIar-83 041\0 F'ag:e 2 I 2 3 4 5 I> 7 8 9 10 11 12 \3 .TITLE T-II E,a1uation ~odul. "onltor .IDENT 100.0011 .S8TTL D.finitions 0%0 oIl 012 0%3 014 oIS oIl> 017 ;RE'sisters ==0204 00060 00064 00120 00124 ==100 ==104 ==140 ;power fail vector, called b~ INT button ,DlART receiver interrupt vector ;OlART trans5litter interrupt ·...eoctor ;8251 receiver interrupt vector ;8251 translitter irlterruF-t vector ;unCOllitted interrupt v~ctor ;lEn displa~ interrupt vector ;OlART brea~_ interrupt vector P$PORA "'PORI PIPORD PIPDRC PIPIlRD PICREG ==177440 ==177542 ==177442 ==177444 ==177544 ==177441> ;8255 port A (write onl~) ;port B (read onl~) available to user ;F-ort B (write orll~) available to user ;port C (write orlly) controls bits 3-~ ;port C (read onl~) reads bits 7-4 ;8255 Calland register (write on1':)) 177550 177450 177552 177452 AIRBUF AIXBUF AISREG AICR£G ==177550 ==177450 ==177552 ==177452 ;8251 receiver data buffer (reao onl~) ;8251 translitter d<!:ta blJffer twrite Ofil!:1l ;8251 status resister (reao onl~) ;8251 cOlland register (write Oflly) 177560 177562 177564 177561> CIRCSR ==177560 CIR8UF ==177562 CIXCSR ==1775M ClXooF ~=177566 iDlART receiver co~.and/status resiste~ iDlART receiver data butfer iDlART trarrslitter cOlund/status resister iDlART translitter data buffer RO 000000 000001 000002 000003 000004 000005 000006 000007 Rl R2 R3 R4 RS SP PC 000024 00001>0 000064 000120 000124 000100 000104 OOOHO PFVEC COHIN CDNOtJT AUXIN AUXOUT USER IV LEDIV COH8R1( 177140 177542 177442 177444 177544 177446 H IS 11> 17 18 19 20 21 22 23 24 2S 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 A-3 1-11 EYaluation "adult ~onitDr MACRO V05.00 Sund•• 13-Ho,-83 04:10 PaSi! 3 Definitions I 2 3 4 000000 5 6 006500 7 a 007320 9 10 006500 .SBTTl 5cratchpad locatlons in hish RAM .ASECT SCRPDl == TBlTOP -- IUR == SCRPDlt620 ;bottol of default console lonitor scratcl'. idefault s~lbol table--66. s~lbol capacit~ ao,. of sVlbol table, 2 words of nale scratch 6500 HBlTOP-(66.W 6500 ;7000 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 11 32 33 34 35 3. 37 ;console lanitor fiaS bvte pairs~-lUst start at even address 007324 007325 000001 000004 000010 000020 lINfl6 == lASLIN -F.SST! F.lUl F.SAVX F.COM TBlTOPH llNFl6t1 =001 =004 =010 =020 related to parsins of whole lines ;sayed flass trol previous line ;line contained STEP CDaland ;1ioe is (functional1~) elPts iwe have siyed eX?f for double para. coalands ;we are in a COilent, iSnore characters 007326 007327 000001 000002 000004 000010 CURCOH -lASCOH ;;::; F.HHEH F.VIIlU F.UNDF F.USRD lASLIN+1 CURCOHtI =001 =002 =004 =010 ;current Calland flass ;sayed flB.!!S trol previous cOllland ;was an instruction In910nic ian undefined sVlbol or directive ;expression doesn't contain undllfined s~lbols iwas a user defined sVlbol or label 007330 007331 000002 004000 000100 TItPHOD -PERHOD -f •AIlS F.VT F.INST lASCOHII THPHOD!! =002 =(400.010> =100 F.BYTH =200 icurrent output lode flass ;perlanent output lode fla~s ;ibsolute values, not s~lboIic Qutput ;yt .ode on or off 'instruction output ;if neither ASCII nor instruction, then nUleric ib!:lte .ode 000200 007332 EXPflG -- PERHODtI icurrent expression flass 007333 lEVEl ;: EXPFlGtI ;parenthesis level in expression lS 39 ;fla~s A-4 T-II Evaluation Hodul. Honitor HACRO V05.00 Sunda. 13-Har-83 04:10 Pa;. 4 Scratch,ad location, in hi;h RAH 1 2 3 4 'Dther variables: 007334 ADVAIIR ;; LEVEL+! idue to the varied uses of this location, a 5 ;coIPlete list is in order: iDOCR: When dlJll",in!l locations in response to a <CR>, the next address 6 7 atter that which has been dUIPed is saved in case the next B 9 cOUiind line reQuests another dUll"', 10 11 12 il.BYTE. I.WORD. GETIHS. ,ubroutin., of GETINS: Thlsf routines use ADVADR as a rurlflin9 COf!::l of the clJrrent address. The current address! as stored in UlADDI\, lust not be changed as successivE' values are deposited into RAM b:l a si~le instruction or directive, because this would alter th~ yalUf ot the dot (.) s~bol (current location refer'eoC'e). HWJSYftI:uses A[lVADR to sa . . e R2, which points to the naif to bi:' defined, while the value to be eouated is parsed. The vallJ~ saved irl 1':2 is an index to the nalW on the left of the eOIJals sisn. if the nail is one of the predefined s~.bols or a user s~lbol that 13 14 15 16 17 18 19 20 21 22 23 ; hiS ilread~ bePn defined. HYPREG:USfS ADWtDR as a pointer to ii'll;' list of retisters to be t:lped. ;EFND: uses ADVADR to save the upper search ranSe li~it before pijrsinS the value and task paraleters. 24 25 26 27 28 The Iy'alue of ADVADR need onl'::l be kept intact between two successive I?IIIPt!::l COllland lines. 007336 SAVOP -- ADVAl*t2 ;saved expr value for double paraleter cOllands 007340 007341 COUNTI -COUHT2 -- SAVEXP+2 COUHT1fI icounter for upper level routines ;counter for lower level routines 007342 007343 HODE !FERAT CooNT2+! HODEl! ;addressing lode scratch--Iusi be even address ;save OPerator here irl ey.pressions 007344 CHTLC OPERATt! iCNTLC<O> set to 1 when console t!:!!pes "'c arTd iF.APPL is set, leanin~ that the jcurrentl~ running prosral has a nc handler 007345 DElIH CHTle!1 ;the ,ASCII directive stores the deliliter here 41 42 43 007346 !lOTTO!! -- DELIm inow at 7346, botio. at console lonitor stack ;(,00501£1 lonitor has 38 word slack iHOTE: intenupts need UF' to 11 slad. locations H 007400 007462 SCRPAD -STACK BOnOHt32 SCRPADW inow at 7400, boltoli of Ke'ol?ad lonitor scratch ;2S word staCK for ke'olpad (torli tor 007462 007464 007466 007470 007630 007631 007632 007672 007673 000200 000100 TBlBOT HF8251 REPEAT BUFFER BP FP HOSTBF HFP HSTFlG STACK STACK ! 2 STAt! + 4 REPEAH2 :::: BUFFERt140 BP+1 FPtl -HOSTIlft40 -HFPI1 F.lOAD ;200 F.LDST ;100 tP'ointer to bot tOt ot s'oIlbol table space Hi use i6251 lode f1a;, ;console lonitor cOllland line repeat counter ;96 character console line input buffH ibuffer back pointer, lust be even address ;butter torward pointer, lust follow Br ;32 character host input buffer ;buf'fer forward pointer 29 30 31 32 33 34 35 36 37 38 39 40 45 46 47 48 49 50 51 52 53 54 55 56 57 --;; -- A-5 ihost f1a~5 H :: takiM input fro. host i1 :: lookiml for .START to besirl loading 1-11 Evaluation Module "onitor ItACRO 005.00 Sund •• 13-H.,-83 04:10 Pa1e 4-1 Srratrhpad locations in high RAH 5B 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 BO B1 B2 83 84 85 86 87 BB B9 90 000001 r.ms -001 i1 ;: : igr.orin9 lIessaSe fro. host ib'::lie buc~.etl --- 007674 007676 007700 007702 007704 007706 000001 000002 000004 000010 000020 000040 000100 000200 000400 001000 002000 004000 010000 020000 040000 100000 PWRFVS KEYPIV KEYPVS USERVS DEINCE FLAGS1 HSTFLGtl PWRFVSl2 KHPIVI2 KEYPVSI2 USERVSI2 -DESNCH, -F.DATA -000001 F.CHAN -000002 F.ADM -000004 F.REG -000010 F•BIlKS -000020 F.FUNC -000040 F.USER -000100 F.SST -000200 F•BIlKA -000400 F. BRKG -001000 r.KEYP -002000 F.I/OST -004000 F.APPL -010000 F. TBAS ;020000 FoPl/OT -040000 F.PAS1 -100000 isave user's power fail vector here ;ke'::lpress service vector ;save use~Js ke~~ress vector here isave user's interrupt. vector here jKe~pad debounce resister ,flaS bits, defined as follows i1 ; data entr'::l lode 11 ;: : nUDe-ric ~.e~ pressed a:ft.er opeflin5 locatiorl 11 ; address entr~ !lode it = resistH selecliorl Mdt' ;1 ; breaKPoint selection Mde ; 1 ; special function sel",d:c'~1 lIIode ; 1 ; executirlS user code i1 ; sinsle stepping it :; breakpoints active' irlstalled) it ;: : clJrrentl,:, steppiM over a breakF"oirlt ;1 ;: : running console lanitor 11 ;: : accE!ftiA§ console tO~iands fro~ Doth ports ;t ;: runnins F'rOSr.31 ~ith "C handler i1 ;: : print address break point is at ;1 = lonitor scratch protection disabled ;1 = console larlitor f'ASSl lTIode actiYe 007710 000002 000010 000020 000040 000200 CONFlG -- ;coflsole line flags, lust be even addrf's; icorltrol S pressed, executiorl slJsFenderJ ;prosrallable baud rate stored herl? 007711 AUXFLG 007712 F.STOP F.CPBO F.CPSI F.CPB2 F.A6IX FLAGS1I2 -002 -010 =020 -040 -200 ;aux port lode word bit<O>, selects lbX or b4X CONFLGIl iCDP'=' of what has been writtfm to A$CREG SmUF AUXFLGIl 007726 SPCLBF TlHE -- SEG8UFIl4 SPCLBF+2 00m2 007734 00m6 007740 007742 IRO IR1 IR2 IR3 --IR4 1R5 ISP -IPC -IPS IWATCH -IADDR BRKFIL ;6 word se91ent data buffer for LED dis~la~s B11SO o':lte for IJPH!r di~pla';s:' l,}w tor lower ;1 word butter for special 2 character dlspla~ ;upper 6 bits COlJot bO seconds, lower 10 (OIJfl1. ;eishthundredths of seconds ;save user context here :;:; 91 92 jJ 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 oomo 007744 007746 007750 007752 007754 007756 007760 TlMEt2 IROl2 iill2 IR21l IR312 $R4+2 IR512 tSP+2 IPCll IPStl IWATCH" IADORt2 A-6 iwatchpoint address ;clJrrent ~ddress ifile of tour brea;.point addr-esstcontents pairs T-11 Evaluation Module Honitor "~CRO \105.00 Sunda, ll-"'r-Sl 04:10 Page :) Scrltchpad locations in hi~h RAH 2 3 4 5 6 7 B 9 10 11 12 13133000 14 133002 15 133004 16 133010 17 133012 18 133016 19 133020 20 133024 21 133030 22 23 m032 24 133036 25 133040 26 m044 27 133046 28 133052 29 133054 30 m062 31 133064 32 133070 33 mon 34 133100 35 36 133102 37 133106 38 133110 39 133116 40 133122 41 42 133124 43 133130 44 133132 45 133140 46 47 133142 48 133146 49 133152 50 133156 51 133160 52 133164 53 54 ml70 S5 133172 56 133174 57 .SBTTl Cor.sole Se-rial Lirle SUN'ort Routines • 133000 133000 H+ UHEIN answers console input interrupts and buffers the inco.ins char.cters. The characters '1, "C, "'0, "0, "9, and "Y and trapped in this routine. j-- 010046 010146 113700 100375 013700 100005 012700 004767 000457 042700 001454 120027 001454 120027 001461 132737 001407 LIHEIN: :/tOV ItOV 177560 u: 177562 ItOVB BI'l ItOV BI'l 000007 000510 177600 5f: 2': 000003 "OV JSR SR SIC BEn C"PB sm 000031 C"PB BEG Bm BEG C"PS SHE BICB BR 000002 007710 120027 000021 001345 142737 000002 007710 000433 120027 000023 31: 001006 152737 000002 007710 106427 000200 000730 C~B SHE BISB "TPS DR 120027 000017 4t: 001004 152737 000001 007673 000413 CMPB 8$: HOV8 SIC CHPB BHIS MOVB INCB 113701 042701 120127 103320 110061 105237 012601 012600 000002 007631 177400 000140 007470 007631 9$: aHE BISB 8R MDV MDV RT! ROdSP) Rlo-ISP) ItcIRCSR.RO 11 IICIRlUf .RO 21 1007.RO PC.ClIROl ;preserve sOle resisters tor scratch iread console receiver slalus resister fin polled lOde, wait tor a character ,read console receiver ;00 error bits set ;ar. error. Qutf'ut <BEll> HSl\Ofeo Chiricter r contimle ~ ;clear all but 7 bits 1177600.RO ;ignore ASCII nulls 91 tis it "C? RO.1003 61 i':fes ;is it "Y? RO.1031 ;~es 71 If.STOP,@ICOHfL6;ar. w' .aitin. for "0' ina 31 ;Is it ... O? RO,1021 ina, wait for one If IF.STOP.@ICOHFl6;cl •• r "S fla. ;ignore character, continue 91 iis it "S1 ina tF.STOP,gtCOHflGist!t "S flag to susper.d execlJtioo ,accept other interrupts while suspended 1200 fwait for "Q 11 RO.1023 41 iis it "O? RO,IOll ino 81 IF .nTIo!IHSTfLG;turn on host lin, b,t. buck.t 91 @IFP,Rl 1177400,RI Rhll40 SI RO,SUffERIRIl @IFP ISPlt,RI ISPlt.RO ;set buffer input pointer ;prevent sign extend iis bufter full? (96 characters) ;~es, send <I!Ell":" rno, store character iadvance pointer ;restore re~isters rand continue A-7 T-l1 Evaluation Module Monitor MACRO V05, 00 lunda. 13-Mar-B3 04110 P, .. 5-1 Console Serial Line Su~p-ort Routines 5B 133176 59 133204 60 133200 61 1332H 62 63 133216 M 133222 65 133226 66 133234 032737 030000 007706 611 001~04 PIT FEO 152737 000001 007344 000765 FII~ 012700 004767 042737 000167 NOV JSR BIC .lHP IR 054536 7t: 000302 000300 007706 004330 tF.APPlfF. TBAS,@tFlAGSl ;slo? on ~C? 71 :yes, nQt rlJnfllfl!i F-roSralli with "c handler tl,@tCN1LC inol Just set flM for apF'licatiorf frogr~'. j and retlJrn 91 t4001131+ 136,RO '''C imd ~Y leninate execution PC,CHROUT itY~'e P'Y 1 IF,USERtF,SST,@tFlAGSI ;clear user fro~rai flass IHONIT ; relove breakpoints. enter 1l0ffitIJf I-II E"luation Hodule Monitor NACRO V05.00 Sunda, 13-Nar-83 04110 P"e 6 Console Serial LIne S~pPort Routines 2 3 4 itt GETLlH prolPts for a lIne frol the corlsole, and return-5 with the li,fe 1n BUFFER and R3 cleared. Upon entr'J1 SP should inde:-: the buffer F-osition just beYond the last character PffVioYsi!l token froll the buffer (if l::Jpeanead characters ore desi red). To throw awa~ the t~?eaheod characters, st!t BF' zrl;J F'P to zero. 5 6 7 B The characters t!:l?ed on the console (ond an!l earlier bpt!ahead chora:cters) are echoed to the corlsole following the HOIiPt. ';. I. Note that the ECHO routiner which was specialized for use with lioDitor cOliullimd irlF'ut, echoes control cllaracters as '''·<character> until a SE"lIIiCDlor; is fOIJnd Off the line. Control characters to the riSht of a sellicolorl {i,e. within a 'colil",erlt ' ) Jre £lrhoed invisibly so that the user ran echo control seOIJencE"S to tht:, (onsol>~ 9 10 11 12 13 14 15 16 17 lB 19 20 21 22 23 24 25 26 27 2B 29 30 133240 31 133244 32 33 133250 34 133254 35 133260 36 133264 37 133270 38 llJ272 39 133276 40 133304 41 133306 42 133312 43 133314 l@rlinal. Uses: BP Index to BUFFER location just beyond last fetched character (which is the location that contains the fi rs.t charocler iL the new Ii ne ) Returns: DP Cleared R3 Cleared BUfFER locations indexed bs entry value of Br throu~h the end 01 the buffet re~lace contents of locations at the be~inning of the buffer Adjusted to index the new next available location in the butte I FP j-- 105037 007324 00471>7 000200 GETLINllCLRB JSR 004767 000250 u: 012700 020076 OM767 000244 123703 007631 2t: 001775 004767 000644 126327 007467 000015 001367 105037 007324 005003 000207 JSR It6\I JSR em BEQ JSR CMPB BNE CLR! CLR RTS @!lllnG PC,PURGE ; reset line parsing flags for flew line ;purse botto. of butter! clear rtJnniM pointer PC,CRlF ;start a new line 1400*040t076,RO it ... > <SPACE> PC,CHROUI @tFP,R3 isee if a character has been t~pe~ 2t ;f'tCtJ wait for one PC,[CHO ;echo character to console lis last character a <CR>'01 ,no, wait for on~ ;reset line fla~s frol ECHO ;set rfJrmin9 ?ointer to be~irlniM of line 'return to caller BUFFER-1(R3ht01S 2t @tlINFlG R3 PC A-8 1-11 Evaluation "o~JI. "ani tor "ACRO vos.ao Sunda, 13-Har-83 04:10 ra., , Console Serial line Support Routines 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 133316 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 3S 133370 162700 000040 36 133374 000261 37 133376 000401 38 133400 000211 39 133402 000250 40 133404 000207 41 itt GETCH rebielJes C'hara('t~f's fro. t~e input buffer usiM RJ as a(l index. The character is placed in the lower 7 bits of ROt Lower c~se chQi'aC'ters afe folded to upper case. The N flag is set if the characler is a separator (space, horizontal tab, verticill tab, line feed, or foftl teed) arid the C flag is set it the character has been folded, U?Ofl entr~, R3 lust inde~: a b':lte within the console input buffer (F:3 < 140 octal or 'n. decil31l. Usest R3 Index to I'le>:t character in console i,lfllt byffe-r (PUFFER) Returns: RO Contains character fetched fro. BUFFER in lO!ole~ 7 biL, R3 upper bits cleared Set to PfPvjQijS value t 1 S£ae cODenls above N,C j-- GEICH:: KIWB INC C"PB 8LO CHP8 BEG CHPB 8HI 2~: 81.HERIR3hRO R3 RO,tOll ;~S, set a character--bit 7 should be clear ;15 it less than <TAB)? 3~ ;~es, r~t RO,t040 Hs it a space? a separator 2~ j~es, RO,I014 ilS it (FF> or lower? 4~ a separator ;r!()1 check for lower case SEN iflas a separator ClC ~$: RIS PC CMPB BlO RO,1141 31 RO,II72 CMPi 3$: S~: BHI 3~ SUB SEC 1040,RO 8R ClC ClN S~ RTS PC ;15 it lower case 'a"? ina, don't fold ii5 It lower case I Z'? ;'''lOr don't folf.! ;fold to up~er case iflaS folded character itlag a norial character A-9 T-ll Evaluation Hodul. Monitor MACRO V05.00 Sunday 13-Har-83 04110 Pa •• 8 Consol~ Serial Line Support Roulines 2 3 4 5 6 7 .ENA9l lS9 iff GETlCH recovers the lost recentl~ set ten character. Uses: R3 Index to location in BUFFER Just be~ond character to be returned B 9 10 Returns: 11 12 13 14 15 133406 16 133410 17 18 19 133412 20 133416 21 133420 22 133424 23 24 25 26 27 28 29 30 31 133426 32 133432 33 133434 34 35 36 37 38 39 40 41 42 43 R3 RO Elmal to previolJs value H,C (S•• h.ad.r of GETCH rout in.) COntains fetched character in lower 7 bitsr upper bits cleared j.- 005303 000742 004767 177700 103002 062700 000040 000207 GETlCH: :DEC BR R3 G£TCH ;6ETCHC is like GETCH except it doesn't fold lower case. PC , GEICH Bet: a 2': t040,RO ADD a: RTS PC GETCHC: :JSR itt GETNXT is like BElCH except it doesn't return separators. (See usa~e intor.alion of SETCH) j-- 004767 177664 100775 000207 PC,GETCH GETHXr:: JSR BKI GETNXT RTS PC .DSABl lS9 iff GET8P places the back pointer in R3 and prevents sisn extension. This is useful to refelch characters fro. a line (providing BP still indexes the be~innin9 of the line), Uses: Index to be transferred to R3 R3 Contains value in BP Returns! 44 45 46 47 48 133436 113703 007630 49 133442 042703 177400 SO 133446 000207 51 BP ;-- GETBP:: ttOVB BIC RTS @IBP,R3 t177400,R3 PC A-JO !-11 Evaluation ""dule Monitor MACRO V05.00 Sunda. 13-Mar-83 04:10 PaSe 9 Console Stria1 Line Support Routines 1 2 ;H PURGE shifts the input butfer to eliainatf spare b~low BPf the back pointer. Console in~ut interrupts are blocked while the shift is occurring, R3, the running pointer, is cleared. 3 • 5 6 7 Uses! Index of first localion to be kept in console in~ut buffer flocatiorls below BUFFERHBP] are overwritten) Index of ti r5t urtused locatiorl in BUFFER BP 8 9 FP 10 11 Returns: 12 BP !3 R3 Ff 14 ;-15 16 17 133450 1067.6 PURGE:: MFPS 18 133452 106427 0003.0 "T1'5 19 133456 004767 177754 JSR 20 133462 005000 CLR 21 133464 120337 007631 2.: ClIPS 22 133470 103006 BHIS 23 133472 116360 007470 007470 ItOVS 24 133500 005200 INC 25 133502 005203 INC 26 133504 000767 BR 27 28 133506 110037 007631 u: HOV~ 29 133512 105037 007630 CLRB 30 133516 005003 CLR 31 133520 106426 KTPS 32 133522 000207 RTS 33 Cleared Cleared Indexes new flrst unused location in BUFFER isne priorih -(SP) .340 pt.GETBf RO ;disable interrlWts telPorarih R3,@tfP iset back pointer iaab a pointer to the botlo. of the buffer ihas en\ire buffer been transferred? 11 ;~es BUFFER{R3),BUFfER(~O) Itrinsfer a character RO RJ 21 RO.~tFP ifix forward pointer, Iback pointer, tand runniM pointer ;r@~tore priorits ~'BP R3 (SPlt PC 3. 35 Ht CRLF sends a carriOl!le return and liOt' feed to the console (and printerl. 36 37 38 39 40 41 42 133524 012700 005015 43 Returns! RO Contains sarbase (400 t 15 + 12) j-- CRtF:: KOV t'OO'OI2+015.RO .<CR>. <LF> A-II I-II Evoluotion Hoaul. Honitor HACRO V05.00 Soodo, 13-Hor-83 04:10 POi. 10 Console Serial line Support Routines 2 3 4 5 6 7 8 9 10 11 12 13 133530 H 133534 15 133536 16 17 133540 18 133544 19 133546 20 133552 21 133554 22 133562 23 133564 24 133570 25 133572 26mm 27 133600 28 133606 29 133612 30 133620 31 133622 32 133624 33 iH CHROUT outputs the lower b~tt of RO to the console, and to the iJU>: port it toe printer port bit is set. If the upper b~te of RO is non-zero, it is also sent to th@ ~Drt(5). CHRDl outputs onl~ the lower b~te ot RO, and CHR02 CMI be used to Oyu-ut a character to the am:. part onI':I. Uses: Lower b':lte contains first ASCII character to be output RO Upper bYte contains zerlJ or secontj character to be output j-- 004767 000004 105700 001431 105737 177564 100375 110037 177566 000423 1327J7 001774 105737 000240 106746 106427 112737 110037 113737 106426 000300 000207 .EHA8l LS8 CHROUI: :JSR PC , CllROI RO ISIB JEO CHR01!: 1518 BPL HOVB BR 000004 177552 CHR02:: Bm BEQ 177552 ISTi 11 1004,@IA$SR£6 CIIR02 ~IA.SREG iis DSR active? 1$ ichfc~ console translitter stalus ;~laceholder for above line ;save priotit!:;l 1340 jblock interrupts while we 1047,@IMCREG ienable aux port trans~itter ;output a character !lOve RO, !IA.XBUF @tAUXFLG,@IAS-CREG ;restore pre-yiolJs aux port cOlllland word HOVB (SP)I ;restore p!·iorit~ HIPS SWAB RO PC RIS .DSABL LSD HFPS "IPS HOVB u: .1\0 register ;wait until trans,itter read~ bit is set ;lhen output a character ina, done its aux port traos.itter e8pt~? ;00, wait until it is @IC$XCSR CHROI RO, !IC$XBUF NOP 000340 000047 177452 177450 007711 177452 ioutput lower half of RO ;i5 there a second character? -(Sf) A-12 T-ll E'il.i\ion Module Monitor MACRO V05.00 Suod., 13-H,r-S3 04:10 r,ge 11 C~ole Serial lin~ SU?~ort Routines I 2 3 4 5 6 1 .S8TTL General 1/0 SUPPort Routin~s itt ASCOUT outputs the character in RO to the porUs) if it is not a control chararhr. If so, t.he special seauences ' . . A' thrOIJ!lh ,,,_. ifE! sent with exceptions <SP), <ESC>, aM <[lEL>. 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 RO Lower 7 bits conlair! character to be printed RO Contains !larbage j-- 042700 177600 120021 000177 001413 120027 000040 101331 001416 120027 000033 001422 000300 24 133660 062700 040136 25 m6M 000721 26 27 133666 012700 042074 28 133672 004767 177632 29 133676 012700 046105 30 133702 ooom 31 32 133704 012700 051474 33 133710 004767 177614 34 133714 012700 037120 35 133720 000703 36 37 133722 012700 042474 38 133726 004767 177576 39 133732 012700 041523 40 133736 004767 177566 41 133742 012700 000076 42 133740 000670 43 Ra.I!77 ;.ake RO a 7-bit character ;is it delete? BfD II ;!:ffSr t!:Wf <DEl> CllPB 8HI RO.'040 CIIROOT 5l RO.I03l H 5 it control1 ;00' t'JP't' it nor.al1~ ASCOUr: mc ClIP! 8£0 cm u: CHROU! ItOV JSR MOV 1400*104+074.RO ;\,.e (D PC.CHROUT 1400*114tl05.RO ;\,.e EL MOV JSR HOV DR 3S: HOV JSR u: j~ke spaces visible ;i5 it escape? ;'Jes., t':4pe <ESC> ino, t'Jpe . . (letter) BEO SWAB ADD 8R DR Sf: t177600.RO *OV JSR MOV DR 3l RO t400tl00t136,RO ;.ake it second character after ...... iand hpE! it .. 1400*123t074.RO ;\"e <s PC.CHROtiT 1400*076tl20.RO ,t'::lpe P> CHROUT 1400*I05+074.RO ;\,.e <E fC.CHROU! t400*10lt123,RO ;t~~e SC f'C.CHROU! it~F'e' ~. I076.RO CHROU! A-13 1-11 (valuation Hodul. Hoo,tor HAtRO VOS.OO Sunda, IJ-Har-Bl 04:10 Page 12 General 1/0 Support Routine~ 2 it+ J PRINTA ?rints an MelI strHIS pointed to b!> R1. 4 5 blarl~. b~te. 6 Uses: The string lIust end '.n th <3 Rl Paints to strins of o~tes to be printed Rl f'oiflts to bste just be':lond first b~te in s.trins containing zero 7 Returns: B 9 10 j-- 11 12 13 133750 14 133754 15 133756 16 1J3760 17 18 004767 177564 112100 001374 000207 •(NA9l JSR P1UH1A: :lIOVi iHE R1S .OSABL u: LS9 PC.CIIROI (Rll+.RO If PC lSi A-14 a character frol string ;print it ;~et T-ll Evaluation Kedul. "onitor KAtRO V05.00 Sunda. 13-"ar-83 0~:10 Page 13 General 110 Support Routines 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 H+ 2J .ENABl JilA PRINt:: "OV BHE RTS .DSABL 24 133762 00~767 000016 25 133766 012201 26 133770 001374 27 133772 000207 28 29 30 133m 012201 31 133776 004767 000002 32 134002 012201 33 3~ moo~ 00~767 000004 35 13~010 oom7 000000 36 37 13~OH 005000 38 13~016 005200 39 13~020 162701 003100 40 13~2~ 103374 41 13~026 005300 42 134030 062701 003100 43 13403~ 004767 000062 44 134040 005700 45 1340~2 001413 46 13~0~4 020027 000033 47 13~50 103413 48 114052 001415 49 134054 020027 000035 50 134060 001415 51 134062 062700 000022 52 13~066 000167 177436 53 54 134072 012700 OOOO~O 55 134076 000773 56 57 lWOO 062700 000100 PRINT outputs ~ radix-SO strins pointed to b~ R2. The string lust end wi til a blank word. PRINTl outputs a sinsle radix-SO triplet in Rl. PRINT2 outputs a pair of ra~i~-~O triplets pointed to by R2. No teninalor is needttd. PRINTJ outPuts the lost significant radix-50 character in Rl and lultiplies il bo; 40. (PRIHT3 is ,all.~ 3 til" b. PRINT!.! Uses: 12 Points to RAD50 string to b. printed (PRINT) Rl Contain~ RAD50 triplet to be printed (PRI~Tl) Points to RADSO Fair of words to be Pt'into?G (PRIIH2i Contains ~AD50 character to be ?rinted (f'RINT3) ReturM! R2 Points to next word after blank word in RAD50 slrin3 iPRI~T) Points to word atter the pair of yards printed (PRINT2) Rl Contains z.r. (PRINT, PRINT1, PRINT2) Conuins (previous valut of Rl> ttOI! 1600 .• 40. (PRINT3) j-- a: LSB PC,PRINT! (R2)t.Rl jt~Pe th@ triplet i ... t • triplet 1$ inot the end 'lilt PC LS8 "OIl (R2)t.Rl PC,PRINT! (R2)j,Rl ;!klt a triplet a~pe it ;!iet another PRIHTt:lJSR PRIHl4: JSR PC,PRINT3 PC,PRHIl3 ;t~e the first PRIMm :CLR 1$: INC SUB BCe DEC RO 10 150*50,Rl jljlyide by successive subtractiorl PRIHT211"OV JSR ADD 6$: JSR TST BEQ C"F' BlO BEG C"P BEO ADD J"P 2$: HDV 3$: 1$ RO 150*SO,Rl PC,RIX40 RO 21 RO,1033 3$ 41 RO,1035 51 1022,RO CHROUT to subtract 1600. ;worked, no borrow ifix RO iand R1 ilultip," RI •• 40 ;tr~ ;0 .eans space ;032 leans Z iA throu~h Z ;033 leans $ ;035 is undefinedl but type * ;0 throu~h 9 and "," 1040,RO 61 ,t':ipe SP.J(:E! BR ADD 1100,RO jA throlJ!ih Z A-15 character ;and the second HI [yolu.han HoduJe lIoni!or HACRO VOS.OO Sund" 1)-Har-B] 04:10 P.;. 13-1 General 1/0 Support Routi~es 58 134104 000770 59 60 134106 012700 000044 61 13m2 000765 62 63 13m4 012700 000052 64 134120 000762 65 66 134122 006301 67 134124 006301 68 134126 006301 69 134130 010146 70 134132 006301 71 134134 006301 72 134136 062601 73 134140 000207 74 4t: BR 61 HOV 10H,RO 61 it'Jr-e J HOV t052,RQ ,l'::lr-e BR 61 8R 5.: Ann Rl Rl Rl Rl,-ISP) Rl Rl ISP)t,Rl RTS PC RIX40:: ASl ASL ASL HOV ASL AS!. A-16 * ;.ultipl~ Rl b'::l S ,save a x ;32 x ;~1U5 S Xaakes 40 X T-11 Evaluation Module MonItor MACRO V05.00 Sundo. 13-Hor-B3 04:10 Po;, 14 General 110 Support Routines 2 3 4 5 6 7 B 9 10 11 12 13 14 15 16 17 lB 19 134m 20 134146 21 134152 22 134154 23 134160 24 \34162 25 134160 26 134172 27 \34174 2B 134200 29 !l4202 30 134206 31 134210 32 134214 33 !l4216 34 134224 35 134232 36 134234 37 134240 3B 134242 39 134246 40 41 134250 42 134252 43 134256 44 134262 45 134264 46 47 134266 4B 134270 49 50 13.4272 51 134276 52 134302 53 134306 54 134312 55 56 134314 57 134320 iff ECHO reads the line blJtter as characters are t!:!ped in arid echoes thel to the corlsole (and printer, if s~lected). Control characters are echoed as ~(letter) exce~t within COllents. LINFlG is used to record co..ent status. If ECHO enCOlJnters "R, "u, ~Xr or <DELETE}, it resPonds or lodifies the line buffer accordingl~, ECHO begins echoing characters at the runnim! pointer (R3) and continues until R3 = FP or a -eCR> is found. Uses: Index to first character in ~UFrER to be echoed Io(lI.'x to er.d of data in buffer R3 rp Returns: Index to location in IIUFFER losicall':! just be~ond last echoed b.t, (This leans RJ returns zera if ~U or "X wa~ the lost character in the buffer! etc.) R3 j-- 116300 120027 001447 120027 001002 012700 120m 001450 120027 001432 120027 001453 120027 001003 152737 132737 001006 004/;\7 100404 004767 000403 007470 ECHO:: ItO'IB 000022 CHP~ 000030 000025 000025 3.: 000015 000177 000073 000020 007324 000020 007324 5': 177152 BUFFERlR3hRO RO.tOn 11 RO.1030 31 1025.RO ;:Hot character hs it ~R? ;~St r.t!:lpe line iis it ~X? ;110 ;Iap . . X to ~U ;is It "U? j~e~, carlcel line jis it <CR>? ;~es! stap echoins characters BED CHPB BHE HOV C"PB BED CHPB BED CHPB BED C"PB BNE BISB Bm SNE JSR BHI JSR DR f'C.GElCHe 6. PC. ASCOUT B' ;type non~~rintable characters Yisibl~ RO,t02S 2. RO.1015 171 RO.I177 41 RO.t07J 5. ;is it (DELETE>' ;~s, delete last chara('~r jis it a s@lic-olon ina tF,COHM,@tlINFlGi!:lesr show we afe in a ('olient tF.Cmtl'l,~tLlNFlG;are we in a cOllent'? ;~eSj echo char~cters literall!:! 7' 177360 14$ : 005203 004767 177252 120337 007631 103727 000207 7$: 6$: INC JSR CHPB BlO RTS R3 PC.CHROUT R3.@lfP ECHO PC ;advance runnins pointer it'::IPl! non-printable characters as the~ are ; have we echoed e>'efythiM? ino, do so~e ~ore ;~s, continue 171: INC RTS R3 PC ;step past <CR> rand return a: JSR JSR JSR HTPS PC.l01 PCd51 PC.GETBP tOOO 8R a, ;SOlf COIlon code ;reaove "R frOB line 'sO back to the besinniM ,take characters again f arid echo line JSR JSR PC. 101 PC.GETBP ;SOlf COlton code 005203 000207 004767 004767 004767 106427 000761 000172 000210 177130 000000 004767 000150 004767 177m at: 2$: A-17 ,gO back to the bottol of the buffer T-ll EVilualion Module Honilor HACRO V05.00 Sunda, 13-Mar-83 04:10 Pa •• lH General 110 Support Routines 58 134324 59 m330 60 134334 61 62 134336 63 134342 64Um6 65 134352 66 134354 67 13\356 68 134364 69 134366 70 13m2 71 134370 72 13H02 73 134406 74 m412 IS 134416 76 134420 77 134424 78 134430 79 134434 80 134440 81 134444 82 134450 83 134452 84 134456 85 134462 86 134466 87 BB 134470 89 134474 90 134500 91 134504 92 134510 93 94134m 95 134514 96 134522 97 134524 9B 134530 99 134532 100 134536 HOVe MTPS RTS R3,@tFP 1000 PC ;lndicate butfer eapts aa~,e characters a!iain j~ait for ne~ characters HTPS JSR CHPS Bn 1200 PC,151 R3,@UP 91 R3 tF •VT, THPIIlD BEQ 200. HOV JSR HOV JSR HOV JSR BR HOV JSR HOVB JSR Hova CHPB BNE CLRB JSR HTPS BR tlO,RO PC,CHROU! 140,RO PC,CHROU! 110,RO PC,CHROUT 2101 1134,RO PC,CHROU! BUFFER(R3loRO PC,ASCOUT BUFFER(R3loRO RO,t073 131 mJIIFLG PC,151 tOOo BI ;don't take chuacters while buffer is fi;.;ed ireaove <DELETE> frol line, decrellient FP ;is there an!:lthiM to delete? ino, continue ;back UP to character to be deleted ;see if video lode ;branch if not isend bad.space 10$! HTPS JSR JSR CLRB RTS 1200 PC,ASCQUT PC,CRLr itLINFLG PC 110300 15.: 11.060 007471 007470 16$: 005200 120037 007631 103771 105337 007631 000207 Hova HOVB INC jset 2 scratch copy of runnins pointer R3,RO BUFFERtl(RO),BUFFER(RO) ;r..ov~ I ,h.ract.r fro. ,uffer RO RO,@lFP Hs that ever~thiM? ;nOt do lore 16$ ,fi}: Ff' UFf' PC 110337 007631 106·427 000000 000207 106m 004767 120337 001443 005303 032767 001415 012700 004767 012700 004767 012700 004767 000410 012700 004767 116300 004767 116300 120027 001002 105037 004767 106427 000673 106427 004767 004767 105037 000207 000200 000H4 007630 4$: BED DEC 004000 052744 100$: 000010 177132 000040 177122 000010 177112 000134 177100 007470 177166 007470 000073 007324 000030 000000 000200 177126 177020 007324 200.: 2101: 13$: 9.: cm BLO I!£CD RTS A-IS ;send space ;send backspace ;S~,lP prir.ter '\ itspe "\" . jget deleted charaeter itspe it ;check if we deleted a "i" i~es, so we arE-n't irl a COlllDent an':cIlllore ; relove deleted charad~r fro .. buffer;ta~.e character-s agairl jecho rest of line idor,'t take characters for a while iecho the special character ;start a new line iinitialize fla9s T-l1 Eyaluation Kodule Monitor HACRO VOS. 00 Sunda. 13-Ha,-93 04:10 Page 15 110 Support RoutInes Ger~ral .S8TTL Host line SUPPort Routines 2 3 4 itT HOSTIN answers aux. f'ort receiver interrupts and butters the inco.ins characters in HOSTBF (up to 32 characters). "p, "C. "'5, arid "'Y are ignored cOlinS frol this port. When the buffer becolles half-flJll (16 characters}, a "'s is sent to the ho~t, S 6 7 9 ;~- 9 10 11 m540 010046 12 134542 010146 13 134544 113700 177550 H 134550 132737 000060 15 m556 001050 16 134560 042700 177600 17 134564 001464 19 134566 120027 000003 19 134572 001453 20 134574 120027 000031 21 134600 001450 22 134602 120027 000023 23 13460. 001445 24 134610 113701 0071>72 25 134614 042701 177400 26 134620 120127 000940 27 134624 103036 28 134626 H0061 007632 29134632 105m 007672 30 13463. 120127 000020 31 134642 103435 32 134644 132737 000002 33 134652 001031 34 134654 IOM66 000006 35 134660 ·012700 000023 36 134664 004767 176664 37 134670 152737 000002 38 134676 000417 39 40 134700 113701 007711 41 134704 052701 000020 42 134710 HOm 177452 43 13UI4 113737 007711 44 134722 012700 000007 45 134726 106466 000006 46 134732 004767 176602 47 134736 012601 49 134740 012600 49 134742 000002 50 HDSTlH: :HDV IiOV HOVI 177552 BITB BHE BIC BED CltPB BEO CHPI BEO CHPB BED HOVB BIC CHPB BHIS HOVa INCB cm BlO IIlB BNE HTPS HDV JSR BISB BR 007673 007673 3$: 177452 2$; u: HOVa DIS HOVa HOVa HDV HTPS JSR HOV HOV RO,-ISP) RJ,-ISP) @tAIRBUF,RO t060,@tAISREG 31 tl77600,RO It RO,tOO3 21 RO,t031 21 RO,I023 21 UHFP,RI 1177400,RI RI,I40 2f RO,HOSTBF IRI) @IHFP Rl,120 II ;F-reserve soae resistf'rs for scratch the character, reset interruFt ;friliM or overrun error? ;~es, beep coosole, and ignore character ;clear all but 7 bits ;isnore ASCII nulls ; isnore "C ;~et ;ane! "Y ;and "5 so that host line traps the sale chars ias console line, e.en though ignored ;get the host buffer input pointer ;prevent sign extend iis bufter full? ;~es, beep the co~solel ignore erl"or ;no, store character ,advance the pointer ii, buffe, half full' ;00, retlJtrl tF.STOr,@tHSTFlG;have we alread~ sent ...s to O(l:.t? ;~s., return II ;restore priorit~ in case another chat coaes in 6ISP) ;send ~s tu host t023,RO PC,CHR02 tF.STOP,~tHSTFLGi5how we have done so II ,get saved COP~ of ASCREG @IAUXFl6,RI ;add the error reset bit t20,Rl ireset errors Rt.UAfCREG irestore to norlal @IAUXFlG,@IAfCRE6 ,beep t~,e console on err-or lOOI,RO irestore priorit~ in cas.e ulother char COlles in 6ISP) PC,CHROI (SP)t,RI ; restore reSistei':' ISP)hRO RTI A-19 T-l1 Evaluation Module Monitor HAtRO VOS.OO Sonda. 13-H.t-a3 04:10 Host Line Support Routines 16 H+ 2 3 4 HGETCH !:lets a character frol the host input buffer and shifts the buffer down one character . If the buft~r is reduced frol 16 or lore characters to jU5t four, a ~a is sent to the host • Do not call this routine if no characters are available in HOSTBF (i.e. HFP = 0), •• 6 7 a 9 10 Uses! 11 Returns! HFP Index to next available location in HOSTBF F.STOP Status (las =1 if a ~S has been sent to the host Lower b~te contains the first character in HOSTEr, upper byte contains si~n exlensiorl of bit 7 Decteaented to index new next available location in HOSTFF HFP F.STOP Cleared if ~O was sent RO Cor,hins !Urba!le RI 12 13 H 15 16 17 IS 19 134744 20 134746 21 134752 22 134754 23 134760 24 134762 25 134170 2. 27 134772 28 134774 29 135000 30 m004 31 135006 32 135014 33 m016 34 35 135020 36 135024 37 135026 38 135034 39 135036 40 135044 41 135046 42 135052 43 llSOS4 44 135056 45 135060 46 m062 47 135066 4a 49 135074 P.~e i-005001 113746 007632 005201 120137 007672 103004 116161 007632 007631 HGETCH: :ClR /IOVB 11: INC cm OOO77Q 10674. 3'; 106427 000340 -4$! 120137 007672 103005 116161 007632 007631 005201 000770 RI @tHOST9F,-(SP) ;save the first character in buffer Rl Rh@IHFP iare we too close for cOifart? ;yes, disable interrupts before doiM this orle HOSTBF(Rl),HOST8F-l(Rl) jshift down one character 1$ jdo entire buffer UP to one less than HFP BHIS HOVB BR 3$ HFPS -(SP) ;save Priority ;disable interrupts to prevent sc:reW'JPS t340 Rl,@IHFP ;are we really done? ,YeS, all characters transferred 5. HDSTBF (Rll ,HDSTBH (Rl) ishift down one character ms CKPB BHIS HOV! INC 9R RI U 5S: 105m 007672 005000 123727 007672 000004 101006 132737 000002 OOn7l 001402 012700 000021 2$! 106426 112601 005700 001405 004767 176466 142737 000002 007673 om BICB ihave we reduced to just four characters~ ;1\0 tF.STDP,~IHSTFLG;.nd ••5 -S sent' ;00 2. ;put ~Q in RO t021,RO (SP)t ;restore priorit~ (SPlt.Rl ;recover character ;did we decide to send ~a? RO ina 6' PC , CHR02 ;~s, send ~a to host tF.STDP.itHSTFLGisho• • e have don' so 000207 RTS PC 6$: CLR CKP! BHI BIT) BED HDV HTPS HWI TST BED JSR !IHFP RO @lHFP,14 2. A-20 ;adjust buffer i~ut pointer I-II E"aluation "oduJ. "onito, ~RO VOS.OO Sund., 13-"a,-83 04:10 Pa" 17 Most line Suf.F1lrl Routines 2 3 4 5 6 7 8 .SBTTL 110 lni halization ind LED Driver it! IOIMIT asserts the RESET L line on the board, thereb~ clearing the corlti!:luration of the peripheral chips. a 16X clock, so that its baud rate will be eQual to that I)f the console port. The RS-232 control output sisf)als are left deassertE'd, anI;! the aux. F"orl receiver and lranslitler are left disablea. SETtlXl is lilE' SETAX2, e}~cert 9 10 11 12 that the clock divisor of the aux, port is set to 16 if RO :; 0 upon entrsl or 64 if RO ; 1. A 64X clod, leans that the am:. port balJd 'I'ilte will be one fourth 01 the consol~ ~rt b~ud rat~t 13 14 15 16 135076 000005 17 135100 112737 000212 177446 18 135106 112737 000010 177444 19 135114 105037 177560 20 135120 105037 177564 21 135124 005000 22 135126 112737 000200 177452 23 24 135134 112737 000100 177452 25 135142 152737 000002 007464 26 135150 063700 007464 27 135154 110037 177452 28 135160 112737 000020 177452 29 135166 000207 30 31 32 j-- IOINIT: :RESET cm t212.HPICREG tOIMtplPORC mfRCSR "CIXCSR SHAW CLR SHAn: "ova t200.~'AICRE6 "OV~ 1I00.@tAICREG IUlVB "OW ClRB RO 12.~IHFa251 IISi AOD IUlVB "ova RTS @1"F825hRO RO.@lAICREG t020.@lAICREG PC ;disable interrtups jcon1i~ure 8255 with port II: a<:: input idisable LED displas ;disibl~ DLART re<:eiller jdisable DLART translitter hndicate lbX clock for aux port isend a harlless lode word to aak~ sure next ;word is interprete-d a·; a centrol woro 50 that ahis control word puts us bad. to lode load ila~,e sure baude ratl!S will aatch iadd in lod~ b':lte incase user has chaMed arl!::lthins ;MIoI initialize lodes ireset error flass, disable 8251 iff SETAUX reconfisures thf aux. port to o~erate with a 16X clock if bit 7 of COHFLG O. 0' with' 64X c1,,~ 'f bll 7 of CONFlG "(. Th, au;;. po,l receiver and transliller are left disabled, but the RS-232 control slsnals r'Guest-to-send ind data-terlinal-read':! are asserted. tI COP\:I of the co.'Olna b~te sent to thf au:{. port is saved in AUXFL6 for futur@ tE'ferenc@I sinc@ A$CREG is a write-onl~ location. 33 34 35 36 37 38 39 40 41 135170 42 135172 43 135176 44 135200 45 135202 46 135206 47 135214 48 135222 49 It then initializes the peripheral chips to an idle state. SETAX2 confisures the aux. port to operate with 0 ;-- 005000 105737 007710 100001 SHAUl: : ClR lSI! RO BPl @tcONFLG H 005200 INC I«) 004767 177720 11: 112737 000042 177452 112737 000042 007711 000207 JSR PC,SETAXl ~VB t042,@tASCRE6 t042,@tAUXFLG "OVB RIS PC A-21 iis 64X clock currentl~ selected? ;001 lbX clock ;set .lUX port baud rater disable ;C'olland 8251 to assert RTS, DTR, and disable Isave a cop':! since A.CREG is write onl~ T-ll Evaluation Modul. Monitor MACRO V05.00 Sunda, 13-"0,-63 0~:10 110 Initialization and LED Driver ;H 2 3 IOVECT initiali~es the Interrupt vectors at locations 60, 64, 70, 741 .,., 130, and 134 to point to an RTI instruction with priorit~ 7. It then attache~ 4 5 6 7 8 9 10 II 135224 12 135224 13 135230 H135m 15 135240 16 13524~ 17 135246 18 135252 19 135256 20 135262 21 135266 22 135272 23 135276 24 135302 25 135310 26 27 13S31~ 28 1J5322 29 135330 30135336 31 135342 32 ras. 18 inlerru,.,t service routines for console b.reak, invalid instruction, breakpoint, and LED displa~ refresh, The power fail vector is also attached to ar1 IHI inslructiol'H with priorit':l 6. The LED dis!>}a!:! hardware and DDth ~erial ports are disablPd. ;-IOVECT:: 012700 012701 O12nO 012720 Om05 012720 012720 012700 012720 012720 012720 012720 012737 005037 000060 000014 135676 0003~0 137114 000340 000010 137334 000340 137174 000340 135344 000104 007676 "0' 1 MOV it: ftOV !tOV 509 HOV KOV KOV MOV KOV ItOV KOV t060,RO tl2. ,Rl ttNLUI.lROlt UIO.lROlt Rldi tBREAK,(ROlt t3~O.lROH tOl0,RO I!TRAP, (ROlt t340.lRO It 19RKPT, (ROH t340.lROH hnitialize 110 vectors and disable irrterruFts ;15 coded priorit!:l vectors (2 not usedJ ;set address elnent to null SetVlce rOIJiinE iset priorit~ level to 7 ;connect console break roy tine ;priotits 7 fot console break icor.ned invalid instructiOfl tral> ;connect breakpoint tra~ HOV tDISPlA,@tLEDIV ;conn&et LED displa~ routine ClR UKEYf'IV idisconnect ke':!Press service vector rnow disable inti'rY'upi hardware fol' ports ItOVB IOI0,ptPIPORC idisapl. LtD ,lisP!" 112737 000010 177444 BICB tlOO,@tCfRCSR ~disable corlsole receiver 142737 000100 177560 SICIf tl00,@tC1XCSR :disable console translitter 142737 000100 177564 CLRF @tASCREG idisable olJxiliars recei ver and t r3rl'~lI\i t ter 105037 177452 000207 RTS PC A-22 [-11 Eyaluation Hodul. Honilor MACRO ~5.00 Sunday 13-Har-83 04:10 1/0 Initialization and LED Driver P.~. 19 1 .ENABl LSB 2 3 ;u DISPlA is the LED refresh interru~t service routine. It .ultiplex~s the contents ot SEGBUf to the LEVs through parallel port At and checks if a 4 5 6 ke~pad ke~ has been pressed. It a ke~ has been pressed and the value in location KEYPIV is not zero, then control will be transferred to the routine at [KEYPIVl for interrupt driven kespad input. The ke~press routine at [KEYPIVl lust restore R2, Rl, and RO fraa the stack (in that order) before eXK'Utirui an RH. NotE! that if the corltents of SPCLSF afE' nonzero, a fl3Shir.~ di!ipla~ of I xx will appear irl the LEOs instead of the corltents of SEGBUF, Error' 7 8 9 10 11 12 13 DISP'lA illso C'OlIf'Its Ule nulber of tiles it hilS been called (which is deterlined ~ the hardware to bt BOO Utes per second, when disph~ refresh is er,3bledl in th@ location TI~. the lower 10 bits of TInE count 0 through 799., and the upper six bits tount 0 through 59. seconds. 14 15 16 17 18 19 135344 20 135350 21 135352 22 135354 23 135356 24 135362 25 1353.4 26 135370 27 135372 28 135400 29 135406 30 135412 31 135414 32 135420 33 135422 34 35 135426 36 135432 37 135436 38 135HO 39 135444 40 135450 41 135452 42 135454 43 135462 44 135464 45 135470 46 135474 47 135476 48 135502 49 135506 50 135510 51 135512 52135514 53 135516 54 135524 55 135526 56 135532 57 135534 ;-- 005237 010046 01014. 010246 013700 005100 032700 001016 042737 062737 013700 005100 032700 001002 005037 013700 042700 006300 016001 005737 001422 005001 032737 001015 016001 132700 001410 013702 132700 001001 000302 105002 060201 112737 000301 110137 000301 112737 007730 DISPlA:: INC ttOv Koo HOV IIOU 007730 COK 001440 BIT BNE BIC "TIHE RO.-(SP) RI.-(SP) R2.-(SP) @ITIIE.RO RO 1001440.RO IIOU COK RO 170000 BII 1170000.RO BN[ 007730 ClR 11 mIllE 007730 177770 II: HDV BIC ASL HDV 007712 007726 TS1 BED ClR BIT 001000 007730 BNE 135756 000004 /IOV BlTB 007726 000002 Koo BED BITB @tTIHE.RO tI77770.RO RO stGBIJF(RO)'RI @tSPClBf 31 RI tOOl000.@tTIIE 31 ERRSEG(RO)'RI t004.RO 31 @ISPClBF.R2 1002.RO 41 R2 R2 41: BNE S1IAB CLRB ADD R2,Rl 000010 177444 31: HOVB 177440 HOVB 000007 177444 SWAB HOVB 1010.PlPIPORC RI Rt.@tPIPORA RI t007.@IPIPORC SWAB ;preserve resisters ;prePilre to check for overflow of BOOths ino overflow 11 I00177MITIHE ;oYertlow, so clear BOOths l002000.@1TI1tE ian~ add 1 second icheck if overflow past 60 seconds ilTIHE.RO 001777 007730 002000 007730 007730 ADD ;kee~ iI count of BOOths of seconds in TIME A-23 ;no overflow of seconds so clear the whole thin! ;~es, istrip RO to lake it a luI tip lex address ;aake it a word index ;get se~lent data for this digit pair ;is there a s,ecial ~rtor displa~? ;no itrue for approx. 1/3 of each second iflashinS error ~essa~1 no less i~et Sedlent data for ' Error' iis this diSit 2 ar 31 ino, so no overla~ on u~~r displa~ ;get oyer16~ chilracters iis this digit 31 idi!ht 3 character- is in Uf'F'er b~te ;swoP for digit 2 ;save only upper display character ic-oabine upper and lower displ~~ characters Hurn Drf displa~f enable upper displa'3 latch jget upper displa~ dat~ in lower byte ioutput upper displa'3 data iback to lower displa~ data ;displa~ still off, but upper latch closed T-11 Evaluation 110001. "ooito, "ACRO V05, 00 Sunda, 13-Ma,-B3 04:10 Pa~. 19-1 lID Initialization and LED Driver 5B 1~542 110137 177440 59135546 010001 60135550 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 135616 001424 74 135620 005037 007704 7S 135624 000421 76 77 135626 004767 000046 78 135632 005701 79 135634 100415 BO 135636 010237 007704 Bl 1~42 000412 82 B3 135644 052737 100000 007704 84 135652 005737 007676 as 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 135m 006202 106 135736 010200 107 135740 042700 177761 lOB 135744 000207 109 110 135746 077116 111 135750 012701 177777 112 135754 000770 113 114 "OV9 IIOV ASR "OIIB Rt.!tPIPORA RO,Rl Rl Rl,!tPlPORC NOP ;output lower displaY data ;Iultiplex di~it address (byte ind~x) Hurn on display ;now do keypad input .•• ;~.eypad ret'Jrn 1in!?s in bi ts 4 to 7 ;clean UP keypad data ;colbine index and return data ;set a scratch COpy of debouflct' st;,te resister ;not debouncins a ke':!, take 2 riel,,: onE- ADD IIOV BEQ XOR BED BIT BNE BIT 8ED CLR BR !IPIPORD,R2 1177417,R2 RO,R2 !lDE9HCE,Rl 51 R2,Rl 61 1000016,Rl 21 tOOO360,Rl 21 mEBHCE 21 SS: JSR TST 8"1 IIOV BR PC,71 Rl 21 R2,UDEBNCE 2. 6.: BIS TST BED JSR J"P 'tKEYPIV 2. PC,7. mYPIV ;da we hav~ an activ~ v~ctor? ;no, discard k.e~fess ;!iet a useful key nu~ber in Rl ipass it to attach~d SE!rvice routine "OV "OV "OV .NUll! : : RTI (SP)I,R2 (SP)t,Rl (SPlhRO ;s~rvic~ 7.: R2,RO RO tOO7777,RO t4,Rl RO 9. 101 Rl R2 R2,Rl t177740,Rl R2 R2,RO tI77761,RO PC ilske a scratch COPY ilove k.~!::l data to upp~r byte ikeep onl!::l return line data ;shift out 4 bits la:: ishift out a bit, look for a one ididn't find it ;Iore than on~ true bit--invalid data iRl is now 3, 2, 1, or 0 ileast two bits are 0 icolbine Dultiplei: address and positional count iclean UP key code i restore R2 "OV9 m 2.: at: 11S: 9S: lOS: IIOV SWAB BIC "OV ASL 8CC BHE DEC ASL ADD 81C ASR "OV BIC RTS itohl latch, take it as iI keYPress ;co.pare lultip}ex address field ;not the sale, so ignore it ica.pare return line field ;sil~e ke~ held, so ignore it ;no lonser salE' ke~ pressed, so reset stale ;convert positional bit to ~u~ber iis this a valid ~.E.'!::l depression? ;~o, so isnore it ;yeSI lake it and wait for contirl2tion t100000,~.DE!'INC£jIak.e sure we set onl!::l one keypress per SOB "OV RbBI t177777,Rl DR 111 ,DSA8l LSB A-24 key routine at @KEYPIV should also restore ;the rUisters in this lanner ; restore RO ik.ee? searchiM iindicate invalid data ;restore and exit 1-11 E,alualion Module !onilor MACRO V05.00 Sooda, 13-Kar-83 04:10 Pase 19-2 1/0 Initialization and LED Driv~r 115 135756 000120 00013~ 000120 [RRSEG: .WORD 116 135764 000120 000171 000000 .WORD 120,134,120 120,171,000 ; r, 0, r jr, E, <;ipace 1-11 [,alualion Module Monitor MACRO VOS.OO Sunda, 13-Mar-B3 0~:10 PaSe 20 1/0 Initialization and LED Driver .S8Tll LED Dis~la~ Support Routines 2 3 ~ iff DSPIIIG ta;,es a hex nUlber in the lower 4 bits of RO and disf'lass the corresporldiM seglent f'attern on the LED digit. inde);:ed o'J Rt. Rl:; 0 to index the right.cst lower LED digit, = 1 to inde)( the righttost !JI"f't>r LED disit, ... 1 = 13 to indi!~{ the 1efhost iJF?N LEI! digit. Re+,IJrrl's R1 5 6 7 B 9 10 11 12 13 14 15 16 17 IB 19 20 135772 21 135776 22 136002 23 13600~ 24 136012 25 1360H 26 27 136016 136021 2B 136022 136025 29 136026 136031 30 136032 136035 31 32 inc:reaented b'!J 2 to index the next di1it to the left en the sallie disp}!:'::! row, Uses: RO Rl Hex value to be displa~Pd Index to LED digit on which to disf'las it RO RI Prrvious value with bits 15. throygh 4 cleared Previous value f 2 Returns: j-- 042700 177760 DSPDIG::m CltP 020127 000013 BHI 101004 "OVa 116061 136016 007712 TST 005721 000207 It: RTS Rl,to0001J ;laxil'tM value for digit index 1$ ;out-ot-r~ge, so isnore call HEXSEG(RO)'SEGBUF(Rll ;displ .. digit (Ri)+ ;index next digit of saae displa~ level PC 006 133 HEXSEG: : •BYTE 07),006,133,117 ;0, h 2, 3 146 007 155 175 .8YTE 146,155,175,007 ;4, 5, 6, 7 177 157 167 •BYTE 177,157,167,174 ;8, 9, Ar b 136 171 •BYTE 0711136,171,161 ;C, d, E, F 077 117 174 071 1&1 .EVEN A-25 T-II EYaluation Hodule Honitor HACRO VOS.OO Sund .. 13-Har-BJ 04110 Pase 21 LED Displa~ Support Routines I 2 3 4 5 6 7 itt DSPUNH and DSPLHH tal!.e full words in R2 and write octal nuabers to the upper and lower LED di5pla~s, respectivel~. Uses: 20 136054 21 136060 22 13<1062 23 1J6066 24 13<1072 25 1J6074 26 136076 27 136100 28 136102 29 1J0104 30 136106 31 136110 32 33 34 Octal value to be displa~ed RO RI Contains Sarba!!:e Returns: B 9 10 11 12 13 136036 14 1J6042 15 16 136044 17 IB 136050 19 136052 R2 Contains !larbage ;-- DSPlIHH: :ttOV BR II.RI DSPNUH iindex upper displa~ 000402 012701 000000 DSPL""::~ 10.RI iindex lower displa~ 010246 010346 012703 000006 010200 042700 177770 004767 177700 000241 006002 006202 006202 077312 012603 012602 000207 DSPNUltI HDV HDV HDV 1$: HOV BIC R2.-(SPl R3.-!SPl 16.R3 R2.RO 1177770.RO PC.DSPDIG iPreserve R2 ;set a scratch re~i5ter icount 6 di.!lits 012701 000001 JSR CLC ROR ASR ASR SDB HDV MDV RTS R2 R2 R2 R3.1$ (SPlj.R3 (SPlt.R2 PC A-26 i.ave octal disit to RO ;Iike sure it's octal idispli':l digit ilove to ne}:t octal disit ida five diSits 1 Evaluation Kodule Monitor ItACRO VO~.OO Sunda, 13-Ka,-B3 04:10 Pase 22 Diy.la!l Support Routines J I 2 3 4 5 6 7 8 9 10 II 12 13 H 136112 15 136116 16 136120 17 136122 18 136m 19 136126 20 136130 21 136134 136142 23 136H4 24 136146 25 136150 26 136152 27 28 136154 136157 29 136162 136165 30 136170 136173 31 136176 136201 32 136204 136207 33 136212 n 136m 34 136220 136223 35 136226 136231 36 136234 136237 37 136242 38 136145 39 136250 40 136253 41 136256 42 136261 43 136264 44 136267 45 136272 46 136275 47 136300 48 136303 itt DSPHAH is a routine to di5Pla~ nates of resisters, etc, on u~per displa~. R2 points to the aessase to be dis~la~ed. The lessage sl'loul,j be a striM of b b!:ltes corre5~ondins to the sesaerlt Patterns for each LEtl disit, starting with the rightaost digit. Uses: R2 Pointer to string at sestent f'atterrlS RI RO Contains sarbase Contains garbase Returns: ;.012701 000001 DSPNA!: :!1l1J 010246 HOV ASl 006302 HIl1J 010200 ASl 006302 ADO 060002 HOV 012700 000006 HOVa 116261 136154 007712 1$: TST 00~721 INC 00~202 SOB 077006 HOV 012602 RTS 000207 000 120 000 120 000 120 000 120 000 120 000 120 000 155 000 1.3 000 163 120 170 000 136 000 120 006 163 133 163 117 163 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 136 124 120 167 075 000 170 110 170 120 170 120 077 NAHTBl: : •BYTE 000 006 .BYTE 000 •BYTE 133 000 117 •BYTE 000 146 • BYTE 000 155 •BYTE 000 163 •BYTE 000 071 •BYTE 000 155 •BYTE 000 •BYTE 167 163 •BYTE 136 •BYTE .BYTE 000 171 .BYTE .BYTE 000 124 •BYTE •BYTE 174 .BYTE 124 174 .BYTE 124 .mE 174 .BYTE It.RI R2.-ISP) R2 R2.RO R2 iindex upper displa~ ;preserve lessag, index itultipl!:l it b~ 6 RO.R2 16.RO ;character count NAHTBlIR2).SEGBUfIRl) i.ave sesaent data to LED bufter iindex ne~t LED digit IRllt ;ind~y. next character R2 ROolS ida six characters (SPlhR2 irestore R2 PC 0,0,077,120,0,0 ;. rO 0,0,006,120,0,0 i' rl 0,0,133,120,0,0 ;. r2 0,0,117,120,0,0 p' r3 0,0,1401120,0,0 j' r4 0,0,155,120,0,0 j' rS 0,01163,155,0,0 j' Sf' 0,0,071.163,0,0 j' PC 0,0,155,163,0,0 j' PS 120.136,167 1700124.163 000,120013 • 136,167.000 000.075.171 120.000,000 0060170.124 163.110.1'4 133.170.124 163,120,174 1171170,124 1630120·174 A-27 j 'PntMr' j' Addr • ;. rEG' ; 'b-rPnU' ; 'brPnt2' ; 'brPnt3' T-l1 Evaluation ~odule Monitor HllCRO 1J05. 00 Su"d •• 13-~a'-B3 04:10 Pa!Je 22-1 LED Displa':l' SuPport Routines 49 136306 SO 136311 51 1363H 52 136m S3 136322 54 136325 55 136330 56 136m 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 .BYTE •BYTE •BYTE •BYTE •BYTE ,EVEN H6.170.124 1630120.174 000,130,124 034.161.000 060.134.155 124.134.071 170.120.134 163,2001167 A-28 ;'brF'nt4' i' Func ' j'ConSol· ; 'A,Po1't' T-II Ev.luation Modul. Monitor ftACRO V05.00 Sunda, 13-Har-S] 0~:10 P,•• 23 LED nispla~ Support Routines Hf BLNKlO and BlHkHI are routines to erase the sesaent data ir. the lower and upper LED butters, respectiyel~. Returns sarbase in RO and R1. 2 3 ~ 5 • 136336 012701 7 1363~2 000~02 B 9 1363~~ 012701 10 11 136350 012700 12 136354 105061 13 136360 005721 H 136362 077004 15 13636~ 000207 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 136366 OOm7 36 136372 010146 37 136m 010201 38 136376 00~767 39 136402 005742 40 11640~ 012601 41 136406 012703 42 136~12 004767 43 136416 010146 44 136420 010201 45 136422 004767 46 136426 005742 47 136430 012601 48 136432 077311 49 136~34 000207 50 j-- 000000 BLNKLO::ftDV 8R 10.Rl BLNKDS iindex lower displa~ 000001 BlNKHI : : "OU I!.RI ;index uPper displa~ 000006 007712 BLNKDS: ftOV a: CLRB TST 16.RO SEOBUF(RIJ ;count 6 disits iblank a disit ;index next disit of sale displa~ level ;do six disits SOB RTS (Rut RO.lI PC Hf DSPDEC takes i nUlber in Rl and an index to either second-fro.-lhe-left lED disH in R2 and displi~s the nUlb@r as a decilal value or! the correspor,dins LEO digits. R2 = 10 to index the lower row of LEDs! = 11 far the uP?fr row. The lettlOst LED digits afe not ~rfected. To dis?lay a two's COIlf"!ei€nt decilal 'w'ah.. , call this routine frol another routine, which places a linus siYi in tile hfllost LEO digit and passes the absQlute value of the n1jlber to be displa~d to this routirle. Uses: RI R2 !\eei.al value to be displayed Index to lED row on which to display it Returns: RO, Rl, Contain sarbaSe R2. R3 ;-- 015662 DSPDEC: :JSR PC.81NASI ~DV Rh-(SP) MDV JSR TST HOV ftOV JSR HDV HDV JSR TST MDV SOB RTS R2.Rl PC.DSpnlG -(R2; (SP)bRl 177370 000004 015576 177344 tt: 1~.R3 PC.BlHASC R!.-(SP) R2.RI PC.DSPDIG -(R2) (SP)t.Rl R3.!1 PC A-29 10000's di~it ;save reaainder iindex left LEII disH ;displa~ d@rilal disit iindex next digit i~et ilake a coonter ;strip a di~it frOI Rl ;s~itch resisters ,display decilal digit iindex next digit to the right ;set back decilal nu~ber ;do six digits T-ll Evaluation Hodul. Honitor HACRO V05.OO Sunda, 13-Har-83 0~:10 PaS, 24 LED Display Support Routines 2 H+ KEYGET torns on the LEDs and waits for a keypress. The keg nutbit of the k~ that was pressed is retlJrned in Rl. The ke~s are nUloered as follows: 00 -- [ClR] 12 -- [ 6 ] 01 -- ( 1 ] 13 -- [ 9 ] 02 -- [ 4 ] 14 -- [A['V] 3 4 5 6 7 03 -- [ 7 ] 04 -- [ 0 ] OS -- [ 2 ] 06 -- [ 5 ] 07 -- [ 8 ] 10 -- [EXA] 11 -- [ 3 ] 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 15 -- (BAC] 16 -- [REG] 17 -- [AOR] 20 -- [SST] 21 -- [GO ] 22 -- [BPI] 23 -- [FNC] Uses! Returns: Rl Contiins nuaber of key that was pressed KEYPIV Cleared SPClBf Cleared PS Priorit~ reduced to 5 ;-- 2~ 25 136436 012737 136~70 007676 KEYGEI nHOV IIOV8 26 136444 112737 000007 177~44 27 13M52 106701 "FPS 28 136454 120127 000277 CMPS SlOS 29 136460 101402 HIPS 30 136462 106427 000240 1$: DR 31 136466 000777 32 KEYGf1: ClR 33 13M70 005037 007676 ClR 3~ 136m 005037 OOm6 HOV 35 136500 012602 lSI 36 136502 005726 HDV 37 136504 012600 lSI 38 136506 005726 HIPS 39 136510 106~26 RTS 40 136512 000207 41 tKEY6El,@tKEYPIUilink input routine to keypress vector t007, PtP$PORC ;lurn on LED displays Rl RJ.1277 ;priority 5 is laxilu. for LEDs to operate 1$ 1240 ;set priority 5 1$ ;wait for ke~reS5 mEYPIV jdisconnect keypress veclor autn off flashiml error, if an'::! ~ISPClBf (SPIt.R2 (SPit (SP)t,RO (SPit (SPit PC A-30 hestore R2 idiscard old Rl ;restore RO idiscard return address ibut replace PS b~te ;return to caller of KEYGET T-ll Ev.lu.tion "odule """itor KACRO VOS.OO Sund., 13-".r-83 0~:10 P'So 25 LED Di5pla~ Support Routines iH 2 3 4 5 6 7 8 9 10 11 12 136514 116101 136522 13 136520 000107 KEYBCD translates the ke~ nuaber in Rl into a BCD value far the ke~s 0 tu 9, 12 lor the CLR k." 013 lor the EXA ke" .nd -I for .11 other '"s. Uses: Rl Ke~ nueber RI Translated value to be translated Returns: ;-- KEYBCD ::ttOVB RTS BCDTBI. IRI IoRI PC ;translate Rl into BCD cod@ BCDTBL: .BYTE •BYTE •BYTE •BYTE .BYTE •BYTE .BYTE .BYTE .BYTE •BYTE 012 001 llCLRJ ;( I J l[ 4 I ;( 7 I HOI 14 IS 136522 16 136523 17 136524 18 13.\525 19 136526 20 136527 21 136530 22 136531 23 136532 2~ 136533 25 13653~ 26 13.\535 27 136536 28 13.\537 29 136540 30 13.\541 31 136~2 32 136543 33 136544 34 1365~5 35 36 012 001 004 007 000 OO~ •BYTE 007 000 002 005 010 013 003 006 011 J77 377 •BYTE 377 •BYTE 377 •BYTE •BYTE •BYTE 377 377 l [ADV] ;[sACl mEG] 377 ;[ADD] 002 005 010 013 003 006 011 377 377 377 377 J77 •BYTE •BYTE .BITE .BYTE H 2 ) H 5I H8] mXA] l[ 3 J n6] H 9] 377 assn J77 HGO J HBPTl 377 J77 l(FHCl .EVEN A-31 T-Il E•• lu.tion Module "-nitor MICRO VOS.OO Sunday 1)-M.r-8) 04:10 p.se 2. LEO 8isplas Support Routines 1 H+ 2 3 ~ NUMGET disP'l~s the current . . alut ot R2 in the lower row of LEDs, leaviM the upper row intact. The ke~ad is enabled to allow the USft to aodifY the value 5 ir. R2 with thE' 0 - 7 '!rId ClR lc.eYs. • The value in R2 is returned, whether altered or not, when the user ?~sses EXA • 7 8 9 Uses: 10 Returns: R2 Ini hal vahle 11 R2 New value (if chansed) 12 13 14 15 16 17 136546 042737 000002 18136554 004767 17m4 19 136560 004767 177m 20 136564 004767 177724 21 136570 005701 22 136572 100770 23 136574 020127 000012 24 136600 10102. 25 136602 001420 2. 136604 020127 000010 27 136610 103361 28 136612 032737 000002 29 136620 001004 30 1U622 005002 31 13.624 052737 000002 32 136632 006302 33 136634 006302 34 13663. 006302 35 136640 060102 3. 136.42 000744 37 38 136644 005002 39 136646 052737 000002 40 136654 000737 41 42 136656 000207 f .CHAN nil!! in FlAGSl is set if R2 was Lhat!~edt deared otherwise Contains ~arbage RI Contains !iarbage RO ;-- 00770. Nl.ItIGET: :~IC u: PC.DSPLHH JSR rc.KEYGET rC.KEY8CD JSR TST 8"1 CHF' BIU BEQ CHP BHIS m 00770. SHE ClR 00770. ~$: BIS ASL ASL ASL 3.: 25: h.sn't ch.nsed ,et ;displa!:l value in R2 on lower lEDs iwait for a keYpress ;ranYert ke~ nulber into BCD ;was it a legal ~e~? ina, get another ;was it nuaeric? iool it was EXA/EHT, ;0 return valui! in R2 ,no, it was char iwas it 8 or 9 (not valid octal digits)? ;SfS! sa i~nore it tF.CHAN,@tFlAGSHhas R2 been chan~ed ~et? ;~es, just scroll in ke~ U ielse clear old value first R2 IF. CHAH,@tF1AGS1;indicate it has been chan.!:led ;.ake space fnr new digit R2 RI 1. RloI012 2. 31 RI.'OIO II R2 R2 Rl.R2 ,scroll irl new di!!i t 11 ;accept additional digits CLR R2 ;clear nu.ber for ClR ke~ m 'f.CHAH.@JfLAGSI'show R2 chansed BR 11 RTS PC ADD IR 007706 'f.CHAN.~'FlASSI'show R2 JSR ;return value A-32 I-II Evaluation Modul. Monitor MACRO V05.00 Sund" 13-Har-83 04:10 LED Di5pla~ Support Routines P.~e 27 .SBTTl Error Condition and Startup Entr~ Code 2 3 4 5 6 7 Hf 'START is the powerup inilialzalion routine. which is executed after toe diagnostics are cotPleted. ;-- 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 26 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 IIOV ll: CLR 014000 SOB 007726 007400 000050 000116 135676 135676 000340 007320 MOV MOV MOVB MOVB MOV MOV MOV MOV BR 007746 007710 050544 007702 000024 000026 007462 ;clear RAM frol 0 to 27777 RO t14000,RI (ROlt R1,1$ RS,@tSPCLBf jput PDwer-up error code on LEDs tSCRPAD,PUSP iset IJP user slack pointer tOSO,UCOHfL6 ;set default baud rales t116,1F8251 iset d,rault value for 8251 lode byte tSNULLI,@tUSERVSiinilialize user's interrupt vector IINULLI,@t24 ipf point~ at null t340,Pt26 tTBlTOP,@tTBLBOTiinitialize e.pt~ syabol table idon't clear error display IHALTH Ht SHAlT is the routine invoked b'=l the HALT button, the HALT L line on the board, and the HALT instruction. It saves the processor re!listHs imd the contents of USERIV and KEYPIV if a user PfO!!ral was r·unnin~, It also Perforls a bus reset and reinitialization of peripheral chips before invokins the ke~pad lonitor. ;-005037 004767 004767 042737 SHAlT:: CLR 007726 JSR 000022 176110 JSR 177377 007706 BIC 004767 176224 000167 000564 JSR JltP @tSPCLBf ;C'lear error code on LEDs, if ans ;save context and fix user SP PC,UCSAVE ;assert RESET line and reinitialize ports PCdOINIT tI77377,@lfLAGSI;reset oede, set " •••d ' ....nd .ntr. Heave F".BRKA so breakpoints will be relaved ;Iilte sure interrupt vectors aren't dalaged PC , JOVECI IKONIT ;enter IGnitor A-33 T-l1 Evaluation Module Monitor !\ACRO V05, 00 Sunday 13-Har-S3 04:10 Pa!ie 28 Error Condition and Startup Entr~ Code 2 3 4 5 6 7 137004 S 137010 9 137016 10 137020 II 137024 12 137030 13 137036 14 137042 15 137046 16 137052 17 137056 IS 137062 19 137066 20 137072 21 137100 22 137106 23 137112 24 Hi UCSAVE saves the processor resisters and the contents of USERIV and KEYPIV if a user ?ro~raa was running. It also initializes the lonitor stack. j-- 012637 032737 001433 012637 112637 042737 010637 010037 010137 010237 010337 010437 010537 013737 042737 012706 000207 007460 UCSAVE: : HOV 000100 007706 BIT BED 007750 ItO\I 007752 HO\'B 177400 007752 BIC 007746 HOV 007732 HOV HOV 007734 007736 HOV 007740 HOV 007742 HOV 007744 HOV 007676 007700 HOV 000100 007706 SIC 007460 u: HOV RTS (SP}+,~tSTACK-2 ;Iove return address to lonitor stack If .USER,@tFLAGSlirunniM user code? If (SPltr@tlPC (SPII,@I$PS ;no ;~es, save user context, startiM with PC iPS next jprevent sisn extension ifh: and save stack pointer isa"e RO, iRl, jR2, t17740MtlPS SP.@tlSP Ro,@tIRO RIo@tlRI R2,!lIR2 jR3, R3.@lIR3 R4,@tlR4 iR4, and ;R5 R5,@tIR5 @IKEYPIV,@IKEYPVS iSive user ~e~?ress vector tF .USER,@tFLAGSUshow that user context has been saved tSTACK-2,SP ;so to lonitor stac~ iand return to call ins routine in lonitor PC 25 26 27 2B 29 30 31 32 137114 33 137120 34 137124 35 137130 36 137136 37 137144 38 137152 39 137156 40 137162 41 137166 42 137172 43 H+ BREAK is the console break interrupt service routine. It is sililar to HALT except that it does not invoke the ke!:IPad looitor if the console lonitor lola::· runniOS preYiousl~. The host .ode is terlinated b~ BREAK. ;-005737 004767 004767 042737 012737 142737 113700 052700 010037 012700 000466 177562 BREAK:: TST 177660 JSR 175746 JSR 035377 00770b BIC 133000 OOOObO HDV 000007 007710 BICB 007710 HOVB BIS 000002 HDV 177564 000001 HOV BR iacknowledse interrupt ;save user contexl iassert RESET line and reinilialize ports t035377,@tFLAGS1;initialize .onilor ~odes tLlNEIN,@tCOHIN ihook UP console input service routine t007,nCONFLG iclear console line fla~s (but not speed) @tCDNFLG,RO ;!:let current baud rate ;enable pro.!!. baud rate, disable x_it interrupt tOOOOOZoRO itransfer control word to console port RO,UCIXCSR ; indicate cor.sole break service tloRO ;!iO to fatal error harldler t.o reenter lonitor FERROO @tCIRBUF PC , UCSAVE PC,IDINlT A-34 T-IJ Evaluation Hodule Honitor HACRD VOS.OO Sundo, 13-Har-83 04:10 Page 29 Error Condition and Startup Entr~ Code 2 3 4 5 6 7 8 9 10 137174 106427 000340 11 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 00770. 19 137234 001155 20 137236 032737 000400 007706 21 137244 001430 2213m6 013701 007750 23 137252 00S741 24 137254 012700 007760 25 137260 012702 000004 26 137264 022001 27 137266 001403 28 137270 OOS720 29 137272 077204 30 137274 000414 31 32 13727.\ 052737 020000 007706 33 137304 010137 007750 34 137310 052737 001000 00770. 35 137316 032737 002000 007706 36 137324 001521 37 137326 012700 000002 3B 137332 000406 39 40 41 42 43 44 45 46 137334 106427 000340 47 137340 004767 177440 4B 137344 012700 000003 49 iH BRkPT is the break?oint service routine. If invoked ftol a user proSra., the processor context is 5av~d. It invoked in response to a lanitor breakpoint rather than a sin~le step or user breakpoint, the PC value saved frol the previous context is adjusted to point to the location which contained the .ani tar breakpoint. j-- BRKPT:: ttTf'S JSR 9IT BEQ DIe JHP 2.: BIT BHE BIT SEQ lffiV lSI HOV IIOV 4.: cHI' BEQ lSI $ItOOIT ;':Ies, so not a brea~.point--entet lonitor 'F.BRKA,@'FlAGSl;arf breakpoints installed? ino--user prosra, contairls BRK, so si!:lnal error SI UIPC,RI ;!iet user PC -(RIl ;back. UP to BRK instruction tBRKFIl,RO jindex breakpoint file '4,R2 ifour entries in file (!ffiH,RI idid we in fact encounter a br~akpaint? 3$ ;yes, so adjust PC, flO error 1E!5S<lSe (ROH ;advance to next entry R2,41 5$ m 'F.TBAS,@'FlAGS1;snow we need to print break point lessaSe I10V SIS BIT BEQ 5': .F. SSTo@tFlAGSI ;are we single steppins~ PR SOD 3.: ;disable interrupts in case vl!'ctor is dalased ;save user context .F.BRKG,'.FLAGSl;.re we sinsle stepp ins through a break ;I>oint ;00, so cnec~, if siM:le ster> or new breakpoint 21 .f .BRkG,PtFlAGS1;reset condition $60 iif6tall breakpoints and reSUle execution t340 PC , UCSAVE I10V BR Rl,U$PC ,r,a lalch--prosralt contains BRK".sisnal error ;fix PC tF.ItRKG,@tFlAGS1;show ~e need to siMle step tF,K£YP,~.FlAGSl;no lessaSe if in ke~pad lode IlIONlT ;so just enter .ani tor 42,RO hndicate breah-oint serlJice FERROR ;90 to fatal error handler to reerlter "'Dnitor itt ITRAP is the ille9al instruction trap routine. If a user prosral was runniMr the ~I'ocessor conte>:t is saved ~fore invokiM tht' lonitor. i-!TRAP:: "IPS JSR "0'1 t340 PC,UCSAVE t3,RO A-35 idisable interrupts in case vector is oalased ;save user context ;indicate invalid instruction t~aP T-11 Ev.lu.<ion Kodul. ~oni<or HACRO V05.00 Sund•• 13-Ha,-83 04:10 P••• 30 Error Condition and Startup Entr~ Co~e 1 2 3 itt FERROR signals ~rrors for the abovE' routines and others in the ke~pad lonitor. If the ~e~pad lonitor is running, the errors are displayed on the LEDs. For ~ 5 6 7 8 137350 9 l37352 10 137356 11 137360 12 137362 13 137370 14 137372 15 137376 16 137402 17 137406 18 137412 19 20 137414 21 137422 22 23 137424 24 137426 25 137430 26 1J7432 27 28 137434 137442 29 1J7416 30 137450 137456 137464 31 137470 32 137472 1J7500 13750b 137514 33 137520 3~ 137522 137530 137:;3b 35 137540 36 37 1J7542 38 137544 39 13754b 40 137:;50 41 137:;52 42 137554 ~3 the console lonitor, the error lessages are displayed on the console. ;-RO'-{SP) PC.I(JIlECT (SP)/,RO RO 2.: HOV JSR J5R CLR BR ;save error number ;Ial:.e sure tnterrUf't veetors. aren't daaaged ;ge.t error nu,ber iturn it into an index tF.KElP,ftFlAGSl;are we in keypad lode1 hwsr 50 1"10 console lessase 11 FNESAG-2(RO),R2 ;start address of selected lessa§e ;send <CR> <IF> PC.CRLF ;print radix-50 .essaS! PC.PRINT @liP ;Iake sure nothing lett in btjtfer IHONIT 016037 137542 007726 1$: 000462 HOV DR FERCHR(RO),@tSPCL8F IHONIT 01004. 00~767 17S646 012600 006300 032737 002000 007706 001411 016002 137422 00~767 00~767 FERROR: :HOV JSR HOV ASl m BED 17~122 174360 005037 007630 000466 137434 137450 137472 137522 FHESAG: : •WORD .WORD .WORD •WORD 012446 070511 000000 007525 055240 076732 000000 035206 074444 017502 FHE5GI: .RADSO !CONSOLE BREAK/ m 163 124 163 006 ;~ointers to error lessases 0~2300 •WORD 0 003770 0631~1 FNESG2: •RAD50 IBREAK POINT ENCOUHTERED/ 020563 060426 0177~0 •WORD 004051 01~411 FHESG3: •RA050 05521~ 071713 077167 053605 054007 102604 021025 014400 000000 •WORD 035206 004051 014423 FNESG4: .RAD50 076453 042320 057466 076732 .WORD 000000 120 FHESGI FHESG2 FHESG3 FHESG4 ;?ut two character error code on LEDs 076 071 174 006 155 174 FERCHR: : •BYTE •BYTE •BYTE .BYTE •BYTE •BYTE .EVEN 0 !INVALIO INSTRUCTION ENCOUNTERED! 0 !INVALID STACK POINTER/ 0 120.076 174.071 163>174 124.006 163.155 0(16,174 ~4 A-36 ;r,U (Ur Error) jb,C (Cb Error) jp,b (bP Error) ;n,I (In Error) ;P,S (SP Error) ;l,b (hI Error) T-ll Ev.lu.tion Hodul. Honitor HACRO V05.00 5ond •• 13-M.r-83 0~:10 P••• 31 Errol' CMditior. and Startup Entr~ Code 1 2 / 3 4 5 6 7 8 9 10 137556 11 137560 12 117564 13 137570 14 137576 15 m600 16 137604 17 137610 18 137612 lY 137614 20 137620 21 137622 22137m 23 137626 2~ 137630 25 137634 26 1376~2 27 1376~4 28 137650 29 13765~ 30 31 137662 32 137670 33 137672 if+ HOHITl is the looitor enlrv point to be used for nOflal eXIt frol user prO!lrals. The PTOCI?t;;SOr context is saved, except for the PC, which retair,s its previous value so that the ('rosral can be rlJn asain. .HOHlT is th, entr':j point used blJ lanitor routines after the processor contei~t has ~eerJ saved. ;-HOHlT! : : HFPS 007750 IIOV 004767 177214 JSR 032737 000400 007706 IHONIT: :m BEQ 001~26 012700 000014 HOV 016001 007760 3$: IIOV 00H04 BEO 005720 TST 016011 007760 HOV 0057~0 TST 024040 4$: ClU' 005700 1ST BPL 100366 01370~ 007750 HOV 032737 020000 007706 BIT 001404 BEO 004767 015400 JSR 004767 015314 JSR 042737 030400 007706 2S! BIC -(SP) jpush PS, PC like frol a traf PUf'C.-ISP) ;but k.eep P1'£IviOU5 USEr PC value ;save user conte~t PC.UCSAVE tF .BRt;A,@tFlAGS1;breakpoints current!':j installed? ;no 21 j index last breakpoint address .014.RO BRKFILlRO) .Rl ;set breakpoint address ithis breakpoint is not defined 41 ;point to previous contents IROlt BRKFILIRO) dRll i r~stor~ contents at bf@ab'oint -(RO) ;90 bac~ to address -IRO)'-(RO) ;bad,!J" to next address RO 31 ido four entries ;~Dint to next location UIPC.R4 IF •TS~S"tFL~GS1isee if we should print leSSese ibranch it not 21 it'::Jpe address PC.TYPADR PC. TYPLOI idisasselbb next ir!struction .F •BRM!F •APPL +F •TeAS. PftLAGSI j indicate breahoints reloved 032737 002000 007706 001402 000167 003026 tF.KElP.~.FtAGS1;k.".d lod,? 106746 0137~6 ;and enable break on ~c BIT BED JHP 11 CHONlT JHP KHONIT .REPT •BYTE .ENDR <140000-.> 0 3~ 35 137676 000167 000276 1$: J6 37 38 39 000076 A-37 i!les, 90 to ~,e!lpad lonitor ;and So to console lonitor T-11 [yaluation "odol. ~onitor HACRO Va5.00 Sunday 13-Kar-83 04:10 Pa!. 32 Error Condition and Startup Entry Code I .StTTl Entry POInts 2 3 4 MONITOR ENTRY POINTS: 5 I> 7 ;-- 8 140000 00011>7 015330 START:: J"F' CIA.NO ,do dia~nostics, then initialize lonitor RSTART::JKP $HAlT ;HALT Instructions and halt line vector ;save context arid restart lorlitor ItONITR: :JHP ItONITI ;standard lorlitor entry (no error condition) 9 10 140004 000167 171>742 11 12 13 140010 000167 177542 ifrol user pro~raltJ save conte::! anlj rellGve 14 IS ;breakpoints 11> 17 Ht IS 19 ;-- KEYPAD/lED UTILITY ENTRY POINTS: 20 21 140014 000167 175752 22 23 24 2S 21> 27 140020 00011>7 176012 DGDISP: :JHP DSPDlG in R2 as i 6 di~it vetal valti@ iin the uPP@r row of LEDs. Returns 15 in R1 ;and 9arbag~ in ROt ;Displa~ nUib@r UPDISP:: JtlP 28 29 30 31 140024 00011>7 176014 32 ;Displa~ oUiber io R2 as a 6 digit octal value ;in the lower row ot LEOs. Returns 14 in Rl iand gatbage in RO. 33 34 35 140030 36 37 38 39 40 41 140034 42 43 44 140040 45 46 47 140044 48 49 50 140050 51 00011>7 176332 nu.ber in RO oits 3 to 0 as a h~x ;di9it at LED position indexed b~ RI. jRl=12,lO,06,04,02,OO -. lower displa~ di~its IRl=13,11,07,05,03,Ol -- u?per display dl~it5 iR& bits 15 to 4 ar~ clear~d, 2 is add~d to Rl ;nispla~ OECDSP: :.lKP 00011>7 171>304 DSPlJEC ;Displi~ nUiber in R1 as a 5 digit deci.al ;value an the row of tEVs indexed b~ R2. iR2 = 010 for the lower row, 011 for the upper iReturns zero io Rt an1 R3, and sarbage in RO ;aod R2. BlNKHI jBla~ the upper row at lEDs. Returns zero in iRO and garbase in Rl. 000167 176272 lOBlNK:: JKP BlNKlO ;Blank the lower row of LEDs, ReliJtr1s zero in jRO and sarbase in Ri. 000167 176366 GETKEY: :JI'IP KHGtT ;Turn on lEDs and wait for a keypress, Return ,key nu.ber in R1. Modifies KEYPIV. 000167 176440 BCDKEY: : J"F' mBCD iTranslate ke~ nu.ber in R1 to a FCD value for ,keys 0 to 9, 012 for the ~lR k~, 013 for the iEX/ENTR ley, and -1 for all other ke~s. NU!!GET jDispla~ nu.bet in R2 as an octal value on the 52 53 54 140054 000167 176466 ilower row at lED~, Activate keypad and allow iuser to .odif~ the value in R2 with the keys ;0 through 7 and CLR. Return the value in R2, 55 56 57 A-38 T-II Ev.luation Kodol. Monito, NACRO V05.00 Sundi. IJ-K.,-BJ 04:10 P.s. 32-1 EntMl Points 58 ;changed or not, when user presses EXA. Uses iR2, Rl, and RO. 59 A-39 T-ll Evaluation Hodule Honitor ~O VOS.OO Sundas 13-Hor-83 0~:10 Pa~ 33 Entr':! Points 1 2 3 iff 4 5 6 140060 000167 7 B ;-- CONSOLE LINE UTILITY ENTRY POINTS: OOOIO~ Jill' mBP ,f'rolPl ror a line frol the console. Rl!turn jt~e line in BUFFER with Rl cleared. 9 I~0064 000167 173346 10 11 140070 000167 173222 12 13 JHP GHBP ;Transfer the back pointer (BP) to R3. JHP ilETCH ,RetrIeve character indexed b':l R3 fro. BUFfER. ;Returns character in RO, R3 incfe.ented b~ 1. ;Returns H set if character is a separator, ,e set it it is lower case. JHP GmCH ;RetrIeve character indexed b':l <R3 - 1; frot 14 15 16 1~007~ 000167 173306 17 18 19 1~0100 000167 173306 20 21 22 23 1~010~ 000167 173316 24 25 26 27 iBUfFER. JHP GETCHC Ret\lrns sale as GETCH. ,Retrieve character ir.dexed b':l R3 frolll BUFFER ;without toldiM lower case. Returns chitr~cter fin RO, and R3 incre.ented by 1. Jill' GETNXT ;Retrieve next character which is not a ;s@parator frOi BUFFER starliM at loc6tion i indexed ~y R3. R£lturns character irt RO with jlower C65e folded, RJ indexes next character iin BUffER. JHP PURGE jElilinate BUFFER contents below location 28 29 140110 000167 17333~ 30 31 32 140114 000167 174022 33 iir.dexed b':I BP. JHP ECHO iEcho contents of BUFFER to the console ;startifl9' with location inde:.eed by R3. Returns .R3 indexing BUfFER location Just be!lona last iechaed character. Jill' CRlF ;Send a carriage return 6M lirte feed to the ;consol@ (and printer). JHP CHROUT jSend a (pair of) character(s) to the console j(and printer). Character to be sent should jbe in lower byte of RO. If uPper b~te at RO Hs non-zero, it will be sent as c; secortd ;character, JHP CHROI iSend a sinSl£! character tro. the lower byte iof RO to the console (and printer). Retutrls iRO with its b'::lle swapped. JHP CHR02 .Send a sinsl! character froa the lower byte jof RO to the printer (aux. port) onl!!, ;Returns RO with its bytes swapped. mOOT iOutput an ASCII character in the lower 7 bits iof RO as a ~isible (string ot) character{s) ;on th~ ('onsole. Control characters are outF-ut ;as "<letter>, wi th exc(lptiorrs <SP) ,{ESO, (DEL.; 3~ 35 36 37 140120 000167 173400 38 39 40 1~0124 000167 173400 41 42 43 4~ 45 46 1~0130 000167 173404 47 48 49 50 140134 000167 17341~ 51 52 53 5~ I~OI~O 000167 173462 55 56 57 A-40 1-11 E.,lootion Kodul. Kooilor ~O VO~.OO Sund•• 13-K.,-B' 04:10 P••• 33-1 Points Entl'~ ~B 59 140144 000167 173604 60 61 62 63 64 JKP PARSlN. AND OUTPUI UTILITY ENTRY POINIS: ;-~ JNP GmXp JNP GENEXP 72 140160 000167 014560 73 JKP TYPOC! 74 140164 000167 014470 75 76 140170 005037 oomo 77 140174 000167 173040 79 JKP TYPDEC 69 140150 000167 004346 69 70 140154 000167 00m2 ;Output a striM of bl:ltes to the C'onsol~ (and ;printer). Rl points to start of strin3, which ;.ust end with a blank b~te. R@turns Rl ;pointing to b~te just after blank b~te, Ht 65 66 67 PRIN!A 71 F1XW: ClR ..IIIP ftBp GETLIN A-41 T-ll Evaluation Module Konitor MACRO V05.00 Sunda, 13-Har-83 0.:10 Pa •• 3. Entr'3 Points 2 3 4 140200 5 140206 6 140214 7 140222 8 140230 9 140234 10 1.0236 11 140242 12 1.0246 13 140250 14 140254 15 140262 16 140264 17 140272 18 140276 19 140300 20 140302 21 22 140306 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 3B 140366 39 140370 40 140372 41 1.0374 42 140376 43 140400 44 140402 45 140404 46 140406 47 140410 48 140412 49 140414 50 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 KMOHn::m BIC 007756 007754 BIC BIS 007706 MOV MOV JSR HOV MOV JSR 007706 BIT t000077,@tFlAGSHol.ar .,.vio'JS IOd. illa""e current a.ddress and watchpoint even 11,@tlADDR iin case we ca~e frol console lonitor It.U$WATCH tF.REG,@tFlAGSl iset reSister select ~ade ; inde}: PC iset UP to displa~ • PC • on IJfo'Fer LEDs idispla':! it @:J$PC,R5 iget PC contents ;s~t Ufo' to displa~ on lower LEDs R5,R2 PC,[lSPlNH ;displa'~ it tF.SST ,@.FLAGS1 iwere we sinsle stepf'ing? t007,R4 R',R2 PC,DSPNAM 8ED HOV JSR ;no KlOOP IF. SST,@tFlAGSI ;clear condition @tlWATCH,R2 iis there a watchf'oint? ina KlOOP @R2,F:2 ;~et watchf'oint contents idispla'::l watchpoint contents in upper dis?la':! PC,DSPUHH 012737 140330 007676 KlOOP:: HOV HOVB 112737 000007 177444 HIPS 106427 000240 1$: BR 000777 tKEYCHD,etKEYPIVi link coalsnd input routine to kp,:!press vector lOOMmpORC Hurn on LED displa':! ienable LED displa~ interrupt 1240 iwait for ~e'::lpress, ke'::l code returns in Rl a 8£0 000200 007706 007754 175530 BIC HO\I 005037 012706 005037 112737 006301 000171 KEYCHD: :ClR 007676 HOV 007462 ClR 007726 000010 177444 KEYCH1: :HOV8 ASl JHP 140360 141110 140430 140430 140430 140430 140430 140430 140430 141122 140430 140430 140430 141232 141372 141610 141550 141706 141714 141462 141650 DSPTBL: : •WORD .WORD •WORD .WORD .WORD •WORn •WORD .WORD .WORD •WORD .WORD .WORD .WORD .WORD .WORD .WORD •WORD .WORD .WORD .WORlt mEYPIV ISTACK,SP PlSPCl8F tOl0,PtP$PORC RI @DSPTBUR!) idisconnect ke':lpress vector ;PO? saved reSisters and return vector Hurn off flashing error, if an!:! iturn off LED dis?la~ for faster ev.ecutior! ;Ia~.e a word indei: of Rl ldis?atch to appropriate routine IClR $NUHER ItIUHER $NUHER $NUHER IHUHER $HUltER $HUIIER IEXAM IHOHER INUMER $HUMER IADV IBACK IREG IADDRK $SST IGO $BRKP $FUHC ;[clR) i[ 1 ) i[ 4 ) i[ 7 1 i[ 0 I .PC 2 J ;[ 5 ] H 8 I i[EXAI i[ 3 ) i[ 6 ) i[ 9 ) HAW) i[BACI A-42 ;[REG) HADD) aSSTl ;[GO ) i [8PTl HFHC) T-11 Evaluation Module Morlitor KACRO VOS. 00 5uod.. 13-Ilar-83 04:10 Ke~pad Monitor I 2 3 4 140m 5140431 6 140436 7 140444 B 14044t 9 140452 10 140454 11 140460 12 140462 13 140470 14 1404n 15 140500 16 140502 17 140504 18 140512 19 140520 20 140522 21 140530 22 140532 23 140534 24 140536 25 140540 26 27 28 140542 29 140550 30 140552 31 140554 32 33 140560 3~ 140566 35 140570 36 140574 37 140602 3S 39 140606 40 140614 41 140616 ~2 140622 43 140626 ~4 140630 45 46 140634 47 140642 4B 140644 49 140650 50 140652 51 14065~ 52 140660 53 140662 54 55 140666 56 140672 57 140676 Pa~. 35 .SBTTL Ke~ COlland Routines 006201 004767 032737 001403 020127 101315 032701 001404 032737 001lO6 032737 001001 005005 052737 032737 001004 042737 006305 006305 006:ro5 006305 060105 IHUlIER I IA5R J5R BIT FEQ CMf BHI 4$: BIT BEQ 007706 III BNE 007706 nl BIT SHE ClR BIS 007706 311 007706 BIT BHE BIC 007706 ASL 2$: ASl ASL A5l ADD 176056 000040 007706 000004 000010 000005 000002 000002 000005 000002 032737 000005 007706 DIGEXEIIBIT 001511 BEO 010502 MOV 004767 175264 JSR ; restaTe ke!l nU!IIber RI PC,KEYFCD ;set BCll vallie for ke~ code IF .FUNC,~tFLAGSl fis disit a functiorl selectiorl? 41 rno lis disit higher than 4? Rlot004 ;~esl ignore digit IQOOP tOOO010,Rl iis it S or 9'? 1no, a legal octal digit 11 tF .DATMF ,AD£lR,@JFLAGSl ino 8 or 9 as data or address inf'IJt ilgnore thel if pressed KlOOP IF .CHAr+,@tFlAGSHhas a digit b?!:l alread':l been fressed? i!:les, Just scroll digits HI 31 ;else initialize digit accIJlIIlJlator R5 tF.CHAN,@IFLAGSliindicate that a digit has been pressed tF.DATA+F ,ADDR,@JFLAGSI ;address and dala efllr~ scroll digits 21 IF .CHAlh@IHAGSHothers have sinsle digit enlrs ;prepare for fourth bit (light be e or 9) R5 iscroll disil into RS (digit accululalorl R5 R5 R5 ~loR5 iNow do executiort associated with digit input jClear ke~ Joins us here tF.DATA+F'.ADDR,@tFlAGSl iJust displa!:l new data or address it~r others, do sF-ecial disF'la% instead 11 ;get flew value RS,R2 pe,DSPlNM iand displa~ on lower LEDs BIT BHE MOV BIC JHP tF,DATA,@IFLAGSHfor addresses, store ifl SADDR 21 R5,@UADDR tl,@IIADDR i.ake sure address is everl ;tak.e anolher ke!:l KlOOPI 032737 000004 007706 2$: 001407 013700 007756 00~767 001330 010510 000167 000334 BIT BEQ "DV JSR KOV JHP tF .ADDR,@tFLAGSHbIJl data can 30 Klan~ places-are we pokins RAM? ino 31 @UADDR,RO ;!::I!e5, !lel a cop!:! of current address ;check that it is not in protected RAM PC,KAMCH RS,@RO iplace dala at current address ;take another ke':> KlOOPI 032737 001420 020427 101006 006304 010564 006204 000167 BIT BEQ CHP BKI ASl MV ASR JKP tF.REG,@tFlAGSI icham!ins re:fislers or watchpoint cOfltents? iflo 41 idoes R4 ir,dex a resister (O loru 7 and F'S)? R4,tOOO010 ;no (R4 should b. 0000111 51 il:ake it a word lnde}: R4 R5,IRO(R~1 ;and place data in user re-~ister j f@store R4 R4 ;lake another ~e!:l KLOOPI KDV JSR HOV @IIIHHCH,RO PC,KAMCH R5,@RO 032737 001007 010537 042737 000167 000001 007706 007756 000001 007756 000362 000010 007706 3$: 000010 007732 000302 013700 007754 004707 001260 010510 ~$: A-43 iassulf R4 indexes watchpoint contents icheck that it is not in protected RAM idef'osil data into watchpoint location T-11 Evaluation Hodul. ""nito, HACRO V05.00 Sood,y 13-Har-B3 04110 Pa~. 35-1 Ke~ COliand Routi~ 58 140700 59 60 140704 61 140712 62 140714 63 140720 64 140722 65140m 66 140730 67 140732 6B 140734 69 140740 70 140746 71 140750 72 140752 73 140756 74 140762 75 140770 76 77 140774 7B 141002 79 141004 BO 141006 81 141012 82 141016 83 84 141022 as 141030 B6 141032 B7 141034 sa 141040 89 141042 90 141044 91 141050 92 141052 93 141056 94 1~1060 95 141062 96 141066 97 9S 141072 99 141076 100 141102 101 141106 102 103 104 141110 105 141112 106 141120 107 lOB 109 110 141122 111 141130 112 141132 113 141136 114 141142 ;lake another ke~ 000167 000264 JHP KlOOPI 032737 000020 007706 4$: 001526 020427 000014 103416 020427 000017 101013 006304 006304 1001: 010564 007700 042764 000001 007700 006204 006204 000167 000212 6$: 010537 007754 042737 000001 007754 000167 000174 BIT 8£0 CHP BlO CHP tF.BRKS,@tFLAGSl;chanSins breakpoint or watchpoint address? ;no, isnore (stranSe! that was a satet~ check) KlOOf>I ;R4 indexinS a breakpoint? R4,IOOOO14 032737 001407 010100 012701 004767 000167 032737 001457 010504 020427 001414 010402 004767 006304 016405 006204 010502 004767 000167 000040 007706 1$: 000004 174754 OOOHb 000010 007706 7S ~ ASL ASl HOV BIC ASR ASR JHP HOV BIC JHP BIT 8£0 HOV HOV JSR JHP IF,FUNC,ftFlAGS1;are we enterinS a function code? BIT BEO HOV BEQ HOV JSR ASl HOV ASR HOV JSR JHP tF.RES,@tFLAGSl ibe sure we are selectins a reiister ;else isnore ke~ KLOOP1 R5,R4 ;save selected resister nUlber ;are watchpoint contents selected? R4,tOOOOIl ;Yes, do special displa~ BI R4,R2 ;disf'la:l register's nale on upper LEDs PC,DSPHAH ;.ake a word index R4 ;set resister's contents IROIR4lrR5 R4 R5,R2 ;displa~ on lower LEDs PC , DSPlNH ,take another ke~ KlOOPI HOV JSR HOV BR @IIWATCH,R2 PC,DSPUNH !IWATCH,R5 91 CHP 000011 175042 007732 9S: 174756 000076 013702 007754 004767 174734 017705 046646 000764 BIll as: ;no, it's not 61 R4,IOOOOI7 ;1\0, it's not 61 i.ike an index for word pairs R4 R4 ;p}ace data in breakpoint address file RS,IRKFIl-060IR4) juk.e breakpoint address ellen t1,BRKFIL-060IR4) R4 R4 ;tak.e another ke~ KlOOPI R5,@IIWATCH ;assule R4 indexes watc~oint address t1,@t\WATCH ;Iake watchpoint address even ilake another ke~ KlOOPI SCLR:: ClR 005005 BIC 042737 000002 007706 000610 DR 7\ RIrRO t4,R1 PC,DSPDIG KUJOP1 ino, lust be enteriM a resister nUlber ; set new digit iindex a lower displa~ digit idisplas nev disit ,tak@ another key ,set watchPoint address ;show it on upper displa~ ;set watchpoint contents ;clear disit accuaulator R5 tF tCHAN,@tFLAGSHin case of sinsle disi t lode DIGEXE .[NAil LSB 032737 001421 013702 004767 017705 000004 007706 IEXAH:: BIT BEO HOV 007756 JSR 174674 HOV 046610 tF.ADDR,!tFlAGS1;exa.inin~ RAH? 11 ;no ~IIADDR,R2 ;set current address ;show it on upper displas ;!let contents PC, DSPIiIlt IfADIIR,RS A-44 I-II Evaluation Modulo "onitor ItACRO 1105, 00 SundalI 1J-",r-B3 04:10 Pase 35-2 Kew Co..and Routine§ 115 WI% 116 14lISO 117 1~1IS4 liB 141162 119 1~1I70 120 121 141174 122 141202 123 HI20~ 12~ 141206 125 141210 126 127 141212 128 141220 GNEXAH: atov 010S02 004767 17~670 JSR OS27J7 000001 007706 BIS 0~2737 000002 007706 BIC KLOOPJ: JHP 000167 177112 032737 000010 007706 001.03 00S70! 100357 100767 u: BIT BED 1ST BPl l1li1 032737 0000-10 007706 21: 001763 129 141m 005705 130 141224 100761 111 141226 000167 000774 132 133 ;general eXiline ent~ point R5,R2 ;shov it on lower displa~ PC, DSPlNM Ir,DAIA.@lrLAGSI;so to data ent .. lode IF,CHAN,@IFLAGSI;indic.to no chanS •••t ;take another ke~ KLOOP tF.REG,@tFlAGSl ;exalinin9 a retister? R~ ;no ,R4 initialized to -1 bw SREG Gl£XAH KLOOf'I ;Contents F!Jt in RS b'J D:tGE.XE jisnore EXA", lake user push a di~it first 2$ If,FUHC.@IFLAGSI; ••ecutions sPeCial fUnction' lisnor, all other occur~nces ot EXAM KLIO'I R5 ;RS initializ.d t. -1 b. tFUNC Hinore EXAM, late user push a ~igit first KLIXPI Bltl ;execute special function OOfUHC JItP ,DSABl LSB BIT BED lSI 13~ 135 136 141232 032737 000004 007706 137 141240 001405 138 141242 005237 007756 119 1412~6 005237 007756 140 141252 000723 141 142 141254 032737 000010 007706 143 141262 001425 144 141264 OOS20~ 145 141266 020427 000011 146 141272 103·411 147 141274 012704 000011 148 141300 013702 007754 149 141304 004767 174526 ISO 141310 017705 0%440 151 141314 000714 152 153 141316 010402 154 141320 004767 174566 ISS 141324 oo63~ 156 141326 016405 007732 157 141332 00620~ 158 141334 000704 159 160 141J36 032737 000020 007706 161 141344 001711 162 1413~6 005204 163 141350 020427 000012 164 141354 001001 165 14135o! 005724 166 141360 020427 000017 167 141364 101440 168 141366 005304 169 141370 000436 170 171 ,ENABI. tADV:: BIT BEQ INC INC BR a: BIT SEQ INC ClIP BLO IIlV "O'J ;.0 to next word IF,REG,@IFlAGSI ;ste•• inS thrOUih r.Sist.rs? ;na 2. ; r.~ister index R4 idon't step past watchpoint contents R4ot000011 3$ 1000011,R4 ,.tIMICH,R2 ItO\I @.IMTCH,RS GNEXAH ItOV AS!. ItOV ASR BR BIT BEQ INC CHI' SHE 4$: ;no PC,DSP~" JSR 21: l$ mADDR mADDR .EXAM JSR BR 31: LSB IF,ADDR,@IfLAGSI;stoPpins thrOUih addr.ss.s' TSI CM BLOS DEC DR R4.R2 PC.DSPNM R4 SRO(R4IoRS R4 GHEXAH ;select watohPoint oontonts watchPoint address ishow it on opfer displa~ ; set uatclwoint contents' ;~et ;displil~ re!lister/~ nate or. upper LEDs ;Iilke iI word ind.~ ;set re~ister contents tF.BRKS,ltFlAGSlist.ppiRS thro~h br.akpoints~ KLOOPI ina, i~nore advance R4 R4,tOOoo12 4. iincrelent breakpoint index ida SPtCial inCf@lent P3tt~tn (R4H R4.tOOOO17 BRKPI R4 BRKPI A-45 i'ilke breakpoint displa~ T-II Evaluation Kodul. "-nitor HACRO V05.OO Sood•• 13-Har-83 04:10 Pa •• 35-3 Key CaMand Routines In 141372 173 141400 174 141402 175 141406 176 141412 tr.ADDR,@tFlA6S1isteppin~ throuSh addresses? 032737 000004 007706 tBACK:: 8IT lIED 001405 DEC 005337 007756 DEC 005337 007756 000643 DR 6t mADDR mADDR tEXAH 032737 000010 007706 6$: 001404 005304 100333 005004 000731 8IT lIED DEC BPL CLR 8R tF .R£6"tFLAGSI isteppins throuSh reSisters? ;no 7t R4 ;prevent underflow 3t R4 ;continue in lADV 3t BIT BED DEC CHP DHIS ItOV DR .DSAIL tr.BRKS,@tFlAGSlisteppioS through brea~points? ino, ignore backup KLOOPI idecreeent breakpoint index R4 ido special decre.ent pattern RMOOOOI4 ;.ake breakpoint display 8RKPI ;index watchpoint tOooolJ.R4 BRKPI LSB ,no ;~o to next word 177 178 141414 1~ 141422 180 141424 181 141426 182 141430 183 141432 184 185 141434 186 141442 lS7 141444 188 141446 189 141452 190 141454 191 141460 192 193 194 195 141462 196 141466 197 141470 198 141474 199 141500 200 141502 201 141504 202 141506 203 141512 204 141514 205 141516 206 141520 207 141524 208 H\532 209 141540 210 211 141542 212 141546 213 214 215 141550 216 141554 217 141560 218 141564 219 141566 220 141572 221 141600 222 141606 223 224 225 141610 226 141614 227 141620 22B 141624 032737 000020 007706 001652 005304 020427 000014 103005 012704 000011 000402 012704 010402 004767 020427 103420 006304 006304 016405 006204 006204 010502 004767 042737 052737 000441 000014 7S: BIC BIS 8R tOOOOI4,R4 ;index breaKPoint 0 ,show nale of breakpoint on upper displa!::l R4,R2 Pc.oSPNAH ;indexing watchpoint or a breakpoint? R4,tOOOOI4 ;the watchpoint It ;Iake an index tor word pairs R4 R4 BRKFIL-060(R4),RS ;set breakPoint address R4 R4 ;displa~ it on lower LEDs RS,R2 PC , DSPLNH tOO0077,PtFLAGSlicl •• r p..vio", ODd. tF.BRKStF.DATA"tFLAGSI i ••t br,,~point and data ODd. KLOOP2 HOV 8R @ttWATCH,R5 2t SBRKP:: KOV BRKPl! HIlV JSR 174416 000014 007700 2.: ClIP BLD ASL ASL HIlV ASR ASR ItOV JSR 174320 000077 007706 000021 007706 013705 007754 000763 a: 012702 004767 013705 010502 004767 042737 052737 000416 icADDRK: :HOV 012702 004767 012704 004767 000012 174332 007756 174252 000077 00770. 000004 007706 JSR HIlV ItOV JSR BIC BIS 8R 000013 174272 fREG:: ItOV 177777 IlO\l 174506 JSR JSR ;~tt watchPoint address ;PfOIPt with I Addr • on upper displa~ t012,R2 PC,DSPNAH @UADDR,R5 ;get pre~ious address ;show it on lower display R5,R2 pe,DSPLNN tOOOO77,@tFLAGSliclear previous lOde tF.ADDR,@tFlAGS1;set current address entry lode KLDOP2 t013,R2 PC , DSl'NAK t-hR4 PC , BLJI(LO A-46 ;prolPt with' rEG I on uPper display iinitialize re~ister index to illegal value fand blank lower display T-ll Evaluation Kodul. "-nito. MCRO Y05.OO S.nda. IJ-Ki.-83 04:10 Ke. C....nd Routin.. 22'1 141630 042731 000077 007706 BIC 230 H1636 052737 000010 007706 BIS 231 141644 000167 176436 KLOOP2: J"P 232 233 234 141650 012702 000020 tFUNC:: "OV 235 141654 004767 J74232 JSR 236 141660 omos 177777 HOV JSR 237141664 004767 174m BIC 238 141670 041737 000077 007706 8IS 239 141676 052737 000040 007706 SR 240 141704 000757 241 242 243 141706 052737 000200 007706 $SST: : BIS m 245 141714 023727 007746 007400 246 141722 101004 247 141724 023727 007746 000004 248 141732 103007 249 141734 042737 000200 007706 250 141742 012700 000004 251 141746 000167 175376 252 253 141752 013702 007736 254 141756 013703 007740 25S 141762 013704 007742 256 141766 013705 007744 2571mn 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 1420S4 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 0017£0 277 142104 012701 000004 278 142110 013020 279 142112 077102 280 142114 012700 007760 281 142120 012701 000004 282 142124 005710 28J 142126 001405 284 142130 012730 000003 2B5 142134 005720 $GO:: eN' tG01: : BHI CHP BHIS u: BIC "0'1 J"P 2$; "DY I\0Il ~V ~V ~V 4$: 9$: ItOV HOY eIC BIT BEQ SIS /tOy I\0Il HOIJ ItOV /tOV SIS P.~ 35-4 'OO0017,@tFlAGS1;clear preyious lode tF.REG,@tFLAGSI ;.nd set resi.t•••• I.<t oodo KLOOP jprOlpt Mith • rune' on upper displaw t020,R2 PC,DSPNAH t-I,f/5 iinitializf iceuaulator to illesal value PC,8lNI(LO ./and blilrd: lotlE'r' displi1~ .OOOOn,."FlAGSl klear previous lode IF.FUNC,@tFLAGSliand .ot r.nction .elec\ lOde KLIIIJ>2 'f.SST,@tfL~G51 ;show we are sinsle stepping msp,tSCRPIID Hs user SP in his RAH'? ;no, show error lessag! It @lISP,1l ;and is th@re roo. for 2 pushes? ;wes. SP is acceptable 21 tF.SST,@tFLAGSI iol.o .bort Il,RO ;SP Error isla to fatal error handler to reenter .anitar FERROR @t\R2,R2 ;restore user context, I!tlR3,R3 @IIR4,R4 @tlf/5,R5 iand user kp~press vector mmVS,ftKEYPIY ive're on user's stack now I!tISP,SP @tlPS'-(SP) ;push PS, PC like frol a traP to20dSP) it'lear T-bit tF.SST,@tFLAGSI i.r. w•• inslo .toppi~? 31 ioo ;!:Ies, set T-bit t020dSP) ;.ake sure BPT trap is still connected tBRKPT,@toI4 134O,@l016 ;finish restoring context @"RO,RO @tlRhRI @tIl'C,-ISP) ;push PC RTT tF.USER,@tFlAGS1;show we are runnin~ user code iand silulate return frat trap 9IT BNE tF.8RKG,@tFlAGS1;sinSle steppins oypr a break point ,if YeS then don't install 41 "0'1 tBRKFlL,RO t4,Rl @(RO)t.IROlt Rhlool tBRl(F1L.RO f4,Rl IRO) 300' 13,@(ROlt (RO)t 3$: SS: 100$; ItOV HO'I SOB 200$: /tOV ItOV lSI BEQ HDV TST A-47 ;start of break point table ,foot entr'J5 ;suck UP data frOi break paint locations i ;start of break point table ;sale as last tile ;first see if there was reall!:l one set ;branch if not ;set break point ;skip to neli:t T-Il [y.lu.tion !Odule !onit., KACRO V05.00 Suod•• 13-K.,-83 04:10 p.Se 35-5 K•• Coooood Routines 286 142136 077106 ~OOS: 287 142140 ~02 288 142142 032020 300.: m 142144 000774 290 142146 052737 000400 007706 500$: 291 142m 000725 292 293 SOB BR BIT BR BIS BR Rl.200$ i1'our entf'~S 500$ (RO)+' (ROll iskip this entr~ 400$ ;~o back for next IF .BRKA,HFLAGS1; irldicate breakpoints installed 91 ;and So m 295 142156 032737 040000 007706 KAIlRCH: BIT 296 142164 001017 BHE 297 14216.\ 020027 020000 CIII' 298 1421n 103014 BHIS CKp 299 142174 020027 007400 300 142200 103411 BLO 301 142202 020027 010000 CKP 302 142206 103403 BLO CHP 303 142210 020027 017400 304 142214 103403 BLO 305 142216 OOSOOO 2$: ctR 306 142220 000167 175124 Jill' 307 308 142224 000207 309 u: RTS RO.tSCRPAD scratch protection on? ;no, deposit an~where ii5 address above UP~er instance of scratchpad? '. ;Yes, detinitel~ doesn't address protected RAI1 iis it below lower instance of scratchpad? 1$ ;'::Ies tF.PROT,@.FLAGSlike~pad 1$ RO.t20000 1$ iis it within lower instance 01 scratcopad? ;~e5' address is il1e~al RO,tSCRPAD+I0000iis it between instances 01' scratcMpad RAM? RO.tl0000 2$ 1$ RO F[RROR ;indtx user RA" error .essa~e ;!iO to tatal error handler to reenter lorli tor PC ,address is acceptable A-48 ;'SI!St not withir. thea, so address is OK 1-11 Ev.IUltion Kodul. ~it.' IlACRO V05.00 Sund.., 13-lIir-S3 04:10 P'!Ie 36 K.. C....nd R""ti'" 1 2 3 .SBlll Specl.I K.,..d Konit.r Functions 4 W226 006305 DOFUHC::ASl Jltp 5 142230 000175 142234 6 fNCTBl: : •WORD 7 142234 142246 .WORD 8 142236 142270 •WORD 9 142240 142572 .WORD 10 142242 142320 11 142244 142562 •WORD 12 CANCEL: :HOV 13 142246 012700 000020 14 142252 105060 007757 it: CLRB 15 1422~ 077003 SOB 16 142260 005037 007754 CLR 17 142264 000167 175710 FNCDON: JIt> 18 19 142270 112737 000007 177444 GOllED::MOVB 20 142276 000167 177412 JHP 21 SPDTBl:: tWORD 22 142302 000454 23 142304 001130 •WORD 24 142306 002260 •WORD 25 142310 004540 •WORD 26 142312 011300 •WORD 27 142314 022600 .!IORD 2S 142316 045400 •WORD 29 SPEEDS::HOV 30 142320 012702 000021 JSR 31 H2324 004767 173~2 32 142330 11J70S 007710 HOVB 33 142334 042705 177707 BIC 34 142340 006205 5.: ASR 35 142342 006205 ASR 36 142].14 016501 142302 HDV 37 142350 012702 000010 HOV JB 142354 004767 174006 JSR 39 142360 004767 174052 3S: JSR CHI' 40 142364 020127 000010 BED 41 142370 001436 ClIP 42 142372 020127 000016 43 142376 103067 BIllS 44 142400 020127 000014 ClIP 45 142404 001410 BED 46 142406 020127 000015 CHI' 47 142412 001362 BKE 48 49 142414 005305 DEC DEC 50 142416 005305 51 142420 100007 BPl 52 142422 005005 CLR 53 142424 000405 BR 54 55 142426 005725 2.: 1ST ClIP ~ 142430 020527 000016 BlO 57 142434 103401 RS PFNC1'I!LI R5) iRS was 0, 1, 2, 3, or 4 idispatch to selected function CANCEL GOllED CKONI SPEEDS NPROI ;0 leans cancel breakpoints i1 .eans turn on LEDs and ~o at user PC i2 leans cold start console aonitor ;3 leans select baud rates and console t~pe ,4 aeans disable ke~pad lanilor scratch protec, t020.RO BRKFIL-I(RO) RO.lI mWmH KIIOItI1 ,8 words in breaKPoint file iclear address/contents pairs ;~o to re~ister select lode tOO 7.@tPIPIJRC IGO ,turn on LED displass ;ilnd go icancel watc~oint also 300. 600 • 1200 • 2400 • 4800 • 9600. 19200 • t021oR2 PC.DSPNAH !tCDiFlG.RS tl77707.R5 R5 RS SPD18L!R5)'RI t010.R2 PC.DSPDEC PC.KUGEl RI,IOIO ; index 'CooSol' ;show pro.pt on upper displa~ ;set baud rate bits ;.ask out other flass ;shift to word index position 11 ;~esJ ~o to aYX port speed iWils is a function ke':!? ;'::'25, exit ;w~ it advance? ;':les, aodi f!:j: baud rate ;was it backup,? RI.tOI6 101 RI.tOI4 21 Rl.t015 31 ;~et corresPOndins baud ;no, wait for another ke':! R5 R5 41 RS 41 ;decrease baud rate (R5)t ,increase baud fate ; show new rate ;prevent underflow RS.to16 ioverflow? 4t ;,.., A-49 fate ;index lower di5pla~ idisplay decilal nuaber ;wait ror a kelJ ;was it 'Enter'? T·11 Evaluation Module ~itor MACRO V05.00 Sunda. 13-Ka.-83 O~:IO Pase 36-1 SPe~ial Ke~Pid Monitor Functions 58 142~36 0057~5 59 142440 006305 60 142«2 006305 61 142444 006305 62 1~2«6 106137 007710 63 142452 110537 007710 64 142456 106037 007710 65 142462 00>205 66 142~64 000725 67 68 142466 012702 000022 69 142472 004767 173414 70142416 016501 142302 71 142502 105737 007110 72 142506 100002 73 142510 006201 74 1~2512 006201 75 14251~ 012702 000010 76 142520 004767 173642 77 14252~ 004767 173706 78 142530 020127 000010 79 142534 001653 80 142536 020127 000016 81 142542 103005 82 1~254~ 012700 000200 83 142550 mOl7 007710 8~ 142554 000750 85 86 142556 000167 175562 4$: 1St TST ASL ASL ASL ROLB HOVB RORB ASR DR IIOV JSR 8$: HOV ISIB BPL ASR 9J: ASR MO'J JSR JSR CItP em CHI' BHIS HOV XDR lOt:; -(RS) R5 R5 RS @ICOHFLG R5.nCOHFLG @ICOHFLG ;store index in baud rate bits ipf"@serve hi§l order bit (F .A64X) RS 5' 1022.R2 PC.DSPHAII SPDTBUR5) .Rl !!tCOHFlG 91 RI RI Hndex -A.Port· ishou proIPt iset console baud rate jis 64 Xset tor auy. port? ;00, sale speeds ;else console rate / 4 ~IO.R2 ;index lower disp1a~ ;displa~ baud rate ;wait for a ke':l ;is it 'Enter'? ;!:Ies, finished ;was it a function button? PC.DSPDEC PC.KEYG£! RloI010 FNCOON Rl.1016 101 ;+:Ie5, exi t DR RO.@ICIINFLG 81 ;no, tog~le aux port baud rate iCONFlG is an even b':lle iwait for enter ke':l JHP KEYCHI ;execute function ke':l IF.A6~X.RO 97 88 142562 052717 89 1~2570 000635 0~0000 007706 NPROT:: SIS DR IF ,PROT .@IFLAGSHt"", olf protection ,go to reSister select ~de FNCDOH A-50 T-ll Evaluation Kodul. Konito, ItACRO \105. 00 Sunda, 13-Ka,-83 04:10 Pa•• 37 Sp@cial Ke~pad ~onitot Function; .SBTTL Console Monitor 2 3 4 5 6 7 8 9 10 11 12 13 iff REGISTER USAGE: R5 R4 R3 R2 Rl RO coIPutational scratch passiM to botto. level routines and scratch Cold entr~ point: j-- H 15 161425n 17 142600 18 14260. 19 H2.14 20 142620 21 142624 22 142632 23 14263. 24 142.44 25 142650 26 142.54 27 142660 28 142664 29 142672 30 142676 31 142704 32 142710 33 142714 34 142720 35 36 37 38 39 142724 40 142732 41 142736 42 142744 43 142752 44 142754 45 142762 46 142770 47 142776 48 49 143000 50 143004 51 143012 52 143014 53 143022 54 143026 55 143032 56 143036 57 143042 last 1!)(P'ression value. current ten value and scratch currtlOt address running; poir.ter for input buffer pointer and ~eneral passing to routines 012737 012737 012737 005037 105037 142737 105037 012767 113700 052700 010037 004767 052737 106427 012737 004767 004767 012702 004767 006500 040100 000004 007630 007672 000007 007673 133000 007710 000002 177564 172304 002000 000000 000100 170614 170610 143052 171042 oom6 CHOM 1:: KOIJ 007330 KOV 007325 IlO\l CLR CLRB 007710 BICB cm KO'I KOVB BIS KOV JSR PIS KTPS KOV JSIl JSR NOV JSR 035214 00770. 177560 nlJh,nSp jinitialize user SP for console lonitor iset default aodes tF.IlULL,~IlASllN;;nihali'. last lin. no;s t400.lootl00,~tTKPKOD mp hnitialize console bufter P'ointirs ;clear host buffer pointer also 'tHFP tOOMtCONFLG iclear console line flags (but not speed) ftHSTFLG ;clear host flags tllNElH,COHIK ;hook UP console input service routine PtCOIfFLG,RO ;s@t current baud fate too0002,RO ienable PfOS, baud rate, disable xlit interrupt ;lransfer control word to console port RO,PtCIXCSR pe,SETAUX iset .lUX port balJd fate ano:! disable tF.KEfP,@tFlAGS1;disable ke~pad IOnitor ienable interrupts tOOO tOO0100,~tC'RCSR;enable ('(Insole PC,CRLF PC,CRlf tGRET ,R2 PC,PRINT fE'ceiver interrupt istart a new line ;point to sreeting .e5sa~e illlPe lE!ssa!le ;ff ;M_ Warl entr~ point: 012767 106427 012737 032737 001412 012737 112737 112737 000402 133000 035126 CKOHIT: :KOV KTPS 000000 000100 177560 NOV 004000 007706 BIT BED 134540 000120 NOV 000046 007711 IIOVlI KOVB 000046 177m 8R tlIHEIN,COHIN ;hook. UP cOl'YSole input service routine ;ehable interrupts tooo tOOOlOOt,tcSRCSRienable console receiver interrupt tF.HOST,UFLAGSHis host lode enabled? ;00, clear host flass to lerlinate functions 11 tHOSTIH,~tAUXIN ;hook UP host input service interrupt t046,mUXFLG ;saye a COP~ or new AieRES value t046,flAICREG ireen.lble .lUX port receiver interrupt 105037 032737 001501 042737 004767 013704 004767 004767 005737 007673 11: 000200 007706 2$! ;stop host actiyit~ IF .SST ,@tFLAGSl ;",ere we 5irl~:ne steppin9? ;no . scrap line CKOH3 .r.SST,@tFlAGSl ic}ear flas frol IG01 rouhr.e pc , TYPREG j~es, displas resisters Ptlf'C,R4 ;point to next location PC, TYPItDR ; hpe address PC,TYPLOI idisilsselble next irlstruclion tWfre we repeating? 'tREPEAT 000200 007706 006702 007750 012212 012126 007466 CLRB BIT BEQ BIC JSR IIOV JSR JSR TST 21 ~IHSTFlG A-51 I-II Evaluation Kodule "onito, ~O YO~.OO Sund•• 13-"-,-83 O~:IO Paj< 37-1 ConsolE' tklnitor 58 14304& 59 Im50 OOI~&3 OOO~76 BEQ BI! CltON3 ;no CKOH4 ;~es, A-52 keep cOMand line T-II Evaluation ",""I. Honito. ItACRO V05. 00 Sunda. 13-Ki.-83 04:10 Pa •• 38 Consoli! Monitor 2 143052 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 ITEH CONSOLE HONITOR VI.O I .WORD .RAD50 .WORD 023132 001156 OVERFU .RADSO 046557 •WORD 0 170400 056007 170374 170276 170776 000134 170354 170344 170602 PC,CRlF ;t~pe <CR> <IF) t400*13H007,RO <BEll> \ PC,CHROUT PC,GETBP iset rurlnins pointer to back pointer PC,ECHO iecho blJffer to corlsale to indicate error tl34,RO it'S?£! \ <CR> PC,CHROUT PC,CRLF PRINT ;print error .eSSige 004540 WHAT: 0 I WHAT I 0 IBUFFER OVERFLOI/I 8 9 143120 10 143124 II 143130 12 143134 13 143140 14 143144 IS 143150 16 143154 17 143160 18 19 20 21 22 23 143164 24 143170 25 143174 26 143200 27 143204 28 143210 29 30 31 32 33 34 143212 35 143216 36 143224 37 143230 38 143234 39 143240 40 41 42 43 44 143246 45 143252 46 143256 47 143262 48 143266 49 143270 50 143274 51 52 143276 53 143304 54 143310 004767 012700 004767 004767 004767 012700 004767 004767 000167 PRNERR:: JSR HOV JSR JSR JSR HOV JSR JSR .JItP a". Hf COliand error entr~ point: j-- 012706 012702 004767 012700 004767 000402 007462 143076 177720 DODO)) 170320 CHON2:: MOO HOV JSR HOV JSR BR Ht tSTACK,SP tllHAT ,R2 PC,PRNERR to)),RO PC,CNROUT CHON3 ;we Colle here frol unspecififd depth ;point to error lE!ssase ;print erroneous cOlaand line and error .eSSiSe it':!?!! ? (CR) General error entr~j scrap rest of coaaand line, terlinate host input: j-- 004767 142737 012706 005037 005037 152737 177702 ERROR:: JSR PC.PRNERR ;print error IE!S5aSe 000200 007673 00f3:: Bleil tF.lOAD.~tHSTFLG;stop loading fro. host 007462 CHON3!: HOV tSTACK.SP ;we don't know at which level error occurred 007630 @tBP idear both bad. pointer and forward pointer ClR @tREPEAT idon1t keep repeatin~ bad cOlland line 007466 CLR 000004 007324 tF.NULL"tLINFlGiact like line was not eapty BISB Ht Fresh calland line ind repeat entr~ point: j-- 000337 105037 004767 005737 001403 005337 000543 007324 007324 170166 007466 ~lllHFL6 JSR TST BED @tllNFl6 PC.Pl.IIGE I!tREPEAT II DEC BR CHON5 HOVB JSR HOV i restare p"enar,ent lOdes ;start a rI@W line PC.CRLF t<24.SOt05>.50tI5.RI ;RAD50 triplet 'TEH' cm 007466 113737 007331 007330 004767 170214 012701 076725 ;save old line parsin~ fla~s i~set line parsins flass tor new line ;pur~e bottol at buffer, clear ruonins pointer ;ttpeat line or PfOIPt tor a new one? jPtOlPt for i new one ie-aunt repetitions ;ar,d fe-execute line C"otf4:: SWAB 1$: ~tREPEAT ~IPERHOD.~tTHPHOD A-53 1-11 Evaluation Kodule "ooitor I1/\CRO V05.00 SUnd" 13-Ko,-83 0.:10 Pas. 38-1 Cor~ole t10ni tor 55 H3314 004767 170464 56 143320 012700 020076 57 1.3324 004767 170200 58 143330 123703 007631 59143m 001415 60 143336 004767 170600 61 143m 126327 007467 000015 62 143350 0013.17 63 143352 105037 0<17324 64 143356 005003 65 143360 142737 000001 007673 66 143366 000506 67 69 143370 105737 007672 69 14337. 001755 70 143376 105737 007673 71 143402 100444 72 143404 132737 000001 007673 73 143412 001403 74 143414 004767 171124 75 143420 ooom 76 77 143422 004767 170076 7B 143426 012701 032153 79 H3432 004767 170346 SO 14343.1 012700 037m 81 143442 004767 170062 82 143446 105737 007672 83 143452 001411 84 143454 004767 171264 B5 143460 132737 000001 007673 96 143466 001003 87 143470 010100 as 143472 004767 170032 89143m 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 98 143530 042702 177400 99 143534 001003 100 143536 120127 000012 101 143542 001407 102 143544 120227 000140 103 143550 103007 104 143552 110162 007470 105 143556 105237 007631 106 143562 106427 000000 107 143566 000660 2.: BED 8$: JSR CKPB BHE ClRB ClR BICB BR 3$: T518 BEG TSTB BKI mB BEG JSR BR 9$: S$! JSR I10V J5R ftOV JSR TSTB BEO JSR 7.: 4$! 101: 11$: lOB 109 143570 106427 000000 110 143574 012702 14J104 HI 143600 000167 177406 JSR I«l\I JSR CMPS 6$: mB 81/!: MOV JSl! C"P8 BfO elR ClRB BR ;t~e a sinsle RAP~O triplet PC,PRIHTl t400*0401076,RO 1\... ) (SPAC£> PC,CHROUT ;s@e if a character has been t~~ed UFP,R3 ;00, So check host buffer 3\ .echo character to console PC,ECHO ;is last character a <CR>~ BUFFER-1IR31,tOI5 ino, wait for 00£1 21 ;reset line tla35 froe ECHO ULlNflG ;set NJnniM pointer to be9inrriM of line R3 IF ,ElYTEh@tHSTFlGielear host line ~yte bucket ("0) flas ; (lKecute 1ine CI1ON5 ;see if we have a character trol the host ;no, So back and chec~ console ;are we 10adinS or just listening? iloadiM 4f tF,BYTB,~tHSIFlG;are WI i~Dri~ host lessages? 91 tRO ;~es, set character frOI host PC,HGETCH ;and throw it awa~ 2' ~tHFP 2' UHSTFlG ;start a new line to show lessaSe fro. host PC,CRlF ;RAD50 t,i,lel 'HOS' 1<10.50tI7>.sOI23,R1 It~pe a sinsle RAD50 triplet PC,PRIHTl t400'0761124,RO ;'T)' ;cOlflete the header PC,CHROUT ;~ee if we hav€ ~ character ttHFP ;00, check console for ke~press 7' ;get character frol host buffer PC,HGETCH tF,BYTB,@IHSTFlG;are we ignoring h05t aessases? ;~esl throw character awa~ 7f R!.RO pC , CHROUI @lfP,R3 5t R3 ttLINFlG If ;else echo it to console ;see if console t~ped a character HI !lOt, continue nnst aessos€ ;PtePare to re-ecno console input J5R "TPS ItOVII SIC BHE CKPB BEO CKPB BHI5 KOVB IHeB KIPS DR PC,HGETCH ;get character frca host buffer iblock console interrupt tor a while ;set console buffer input pointer ;prevent sisn extend ;we aren't at be~innin~ of line ;throw aw~ line feeds at beginning of line 1000 21 iis buffer full~ abort load process ltranster character to console input buffer jad~ance butfer input ~ointer ;restore interrupts ;echo buffer to corlsole KTPS I«l\I JKP 1000 IOVERFl,R2 ERROR ;rfstore interrupts ;point to error lessa~e iand f'rint it mo tlfP,R2 t17740Q,R2 101 R1,1012 ;redispla!l prolPt and echo buffer asair, 11$ R2,1140 6' ;~esf R1,BUFf'ERIR21 UFP A-54 I-II Ev.lu.tion Kodule Honitor MCRO VOS.OO Sunda. 13-K,,-83 04:10 Pase 38-2 Console "onitor 112 113 114 1lS 116 117 H360~ 004767 167616 118 1~3610 000~02 ,-- PC.GETNXI CHONi> ;~et first leanin~rul 004767 167570 COlITlN: :JSR PC.GETLCR ;recovpr list aCQuired charact!r 005737 001004 110337 105337 000337 105037 007466 CftON6:: 1ST e'REPEAT ;are we repeatinS? 007630 007630 007326 007326 BHE KOV8 DECB SIIA8 ClR8 8R R3.@t8P @m PlctJ!COK PlCURCOH CHON7 CItONS:: JSR a: 000~02 a character ;':J£'S, so keep last ~olland ;else throw it awa~ ;save old cOlland floss ;and initialize thea for next cOiland itt Pars£' top ltvel: 130 131 132 133 134 143646 m H3652 136 lU6S6 137 138 143660 139 143666 140 143674 141 143676 142 lU702 143 1~3704 lH 143710 H5 1~3712 Next cOlland entry point: DR m 120 143612 121 122 14361. 123 143622 124 143624 125 H3630 126 H363~ 127 143640 128 H3644 129 H+ ;-- 167554 120027 000015 00~767 001S4~ .EHABl COlILUl': JSR CHON7: CHPB BEQ 152737 000004 007324 is: 132737 000020 007324 00136~ 120027 000054 001761 120027 000033 001005 000~02 BIS8 8m 8NE CltP8 BEQ CHP8 BHE BR LSB PC.G£TNXT RO ••015 DOCR ;S!t next aeanin9tul character ;is it <CR)? ;Y£,5, SO to <OR) handler .F.NULl.PllINFLGi5how that line i5 not e.pt, tF .COtIH,@'LIHFLSiare we in a cOlleot'? ;Y@S, keep looking for <CR> COitlUF Hs it cDaaa'l' RO.'OS4 ;i~nore cOI.as at top level COHlLf iis it <ESC)? RO.'033 2. ino ERROR2 1~6 147 143714 HB 143720 149 150 143724 151 HmO 152 143732 153 143736 15~ 143740 155 143742 156 1437~6 157 H375~ 158 159 143756 160 143762 161 1~376~ 162 143770 163 143m 16~ H3776 165 1~4oo2 166 167 14~00~ 168 144010 000167 000354 000167 177m .u: JHP ERROR2: JIIP DOEXPR CItOH2 1~D to seneral e~~re5sion handler 2$! 120027 0000~2 103773 120027 000137 101370 001006 010537 007336 152737 000010 007324 000713 CHPB BlO CHPB BHI BHE NOV BISB BR iis character control, space I or '!'7 ;¥!S, in~alid cOlland ERRm2 RO.tI3) ;i5 it above underscore? ;~es, invalid co •• and ERROR2 ;oot an underscore 5. iexecute underscore RS.itS/IVEXP .F.SAVX.itLINFLG;5h.. pending underscore CIIONS ;~t next CO'lin~ 120027 000136 001010 005337 007756 105737 007330 100703 005337 007756 000700 51: CHPS DEC BR RO.tl36 6. PUADDR I!tTHPHOO CKON5 mADOR CHOl!5 ;is it caret? ;no ;exerote caret jare we in b~te lode? ;~es, back UP a byte ;else back UP a whole word ;~t next cOIaand 120027 000134 001017 6S: C~PB RO"13~ ,is it reverse slant? BHE 7. ;no SHE DEC IST9 8~1 RO.'~2 A-55 i-ll Evaluation Kodult Monitor HACRO V05.00 Soodas 13-"a,-83 0~:10 Console Konitof' 169 1~012 106437 007327 HIPS 170 144016 001010 iHE HO\I 171 IH020 010537 007756 172 1~4024 010504 IIOV 173 144026 00~767 011216 JSR JSR m 1~4032 00~767 01l~2 175 14~036 000662 BR 176 8.: KOV 177 144040 012702 151372 178 14~ 000167 177142 J"r 179 180 1~~05O 120027 000133 7.: CHPB SHI IBI 1~054 101321 IB2 1~~056 120027 000100 C"PS 183 1~~062 101314 9I!1 18~ 14~06~ 001715 BED 185 186 14~066 116001 155m HOIIB 187 14~on 042701 177770 BIC 188 1~4076 006301 1st J(P 189 1~4100 000171 1~~104 190 .DSABL 191 192 1~410~ 14316~ PARDSP: •WORD 193 144106 l4~m .WORD 194 144110 151426 .WDRD 195 H~112 H~124 .WORD 196 144114 15116~ .WORD 197 14~1I6 1~~134 .WORD 198 14~120 143164 •WORD 199 144122 IH274 •WORD 200 201 202 144124 152737 000020 007324 OOCO"": DIS8 203 14~132 000624 iR Pa~. 38-3 fIlASCOH 81 R:;,@IIADDR R:;,R4 PC,TTPADR PC,IVPLOC CI10IIS idid the last expres5ion have undefined s~.bols ;yes, refuse settins of the current address iexecute reverse slant ;set new address it~pe R4 as hUlber or label ;t~pe location addressed b~ R~ ,set next cOI&and IUHPEFX,R2 ERROR ;error, undefined ex,ression ;is it lett bracket? ina, invalid cotlanlj RO,1I00 pis it alphabetic? ;~esl beginning of expression or instruction 41 rna, at si!ln is invalid calland ERRDR2 rwe've narrowed RO to the 042 to 077 ranSe PARAHS-040(RO),RI iset parsins code 1177770,RI ;Iask out other inforutiorl ;Iake it a word index RI @PARDSP(RII rand dispatch accordin~l~ LSi Ro.II33 ERRDR2 CttOH2 DOEXPR DOLABL OOCOHK llOSYHi DONVAL CKON2 DOEXPR ;0 leans invalid coaland ,1 leans s~t expression or instruction ;2 leans define label ;3 leans sterl COllent ;4 afans define 5~lbol ;s leans t~pe oulericol1~ ;6 earrs valid as operator within eX?l'eSSiOfiS ;7 leans both 1 and 6 are true tf.COHH,@tLINFLGhndicate we're in a couent CItON5 rand continue 20~ 205 206 144134 004767 207 144140 016746 208 I~~I~~ ~2767 209 144152 010501 210 14~m 00~767 211 144140 012467 212 1~16~ 000167 213 167364 043164 000200 OOIIVAL: JSR IIOV 0~3156 010716 0~31H 17741~ SIC HOII JSR KOV JKP it!jpe last expression (lIJlerically ;save flass IF-IYTK,IIIP"OD ;Ia~,e word .ode R5,RI PC,TYPNHI (SPIt. IKPHOD ; restore flaSs CKOI/5 PC,CRLF TMP~OD,-(SP) 21~ 215 14~170 216 14m~ 217 14~176 218 144202 219 14420~ 220 1~~210 221 1~~212 m 14~216 223 14~22~ 22~ 1~~226 225 1H232 105737 007673 100426 106437 007324 DOCR:: ISIB 8"1 HIPS 001423 BEQ 106n7 007325 103427 013704 007756 132737 00000~ 007325 HIPS DeS HOV SlTB SHE "OV KOV ooloo~ 013704 007334 007756 010~37 @IHSTFLG 31 fIlINFLG 31 @ILASLlH 51 ;are we loadins frai host? ;~es, suppress <CR) COlland teatJJre i~ft cOI.and line flass Hine is nol eIPt'!f, so do nnthiM Hast line caused siMIe step, so step asain ;set current address IF,NULL.@ILASlIN;did la,\ line duo, Io,.tioo,' 61 inol so don't advarlce PIADVADR,R4 ;advance past last dua? UIADDR,R~ R~,!lIADDR A-56 T-11 Evaluation Kodule "onitor "ACRO V05.oo Sood•• 13-"ar-83 04:10 Console tklni tor 016705 033535 004767 010734 010437 007334 0.: 005737 007466 001002 1I0117 007630 000167 176756 3$: 235 144270 000167 003122 5': 226 144236 227 144242 228 H424. 229 230 144252 231 14425. 232 144260 233 IH2.4 234 u: Pa~. 38-4 KDV JSR "DV -1.R5 PC.TYPLIN R4.@tAPVAPR TST @tREPEAT BHE "0\11 4' JKP R3.itBP CKON4 ;are we rep@atins? ;1des, so keep cOlland line ;00, discard px@cuted cOI••mds JKP STEP ;exetute single st@P A-57 ityp@ a line of locations ;sa . . e next address for subseQuent dUIP T-ll Evaluation "oOOle I1onitor NACRO V05.00 Sund,. 13-",r-83 04:10 Pa!iE! 39 Console "oni tor .SSTTl Parsing Routin~s 2 3 4 5 6 7 iH DOEXPR parses an expression, instruction, directive, or verb, and handles it accordin!il~. If appropriat~, e»pressions are deposited at lhe current location. Note that the old value of R2 (which la'J b~ a pointer to i s':Ilbol fro. the last invocation of DOEXF'R) is saved before parsiM an expression. This is to acroaodatfl the .ESC directive, whOSE! parsiM will chaMe the ."alue of R2. The old valUe is ne@ded tor seQuences such as <s'=llbol> .ESC K • The old value ot EXPfLG is also saved, for the sale reason. 8 9 10 11 12 13 14 144274 15 144300 16 lW04 17 I4HOb 18 141312 19 144314 20 144320 21 144322 22 144326 23 14mO 24 144332 25 144336 26 27 144340 28 144142 2' 14m. 30 14mO 31 W354 32 144356 33 144362 34 144364 35 144370 36 144372 37 144376 38 14HOO 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 14m6 54 144452 55 144456 56 IH460 57 144466 ;-004767 120027 001453 120027 001450 106437 102010 106437 100063 102003 005737 100031 010405 120027 001432 120027 001427 120027 001424 120027 001421 106437 100m 004767 105737 100406 010514 005237 000403 000212 000072 .ENABl LS8 PC.GENEXP CNPi RO.I072 BEG 14\ CNPi RO.I075 14\ BEG NTPS @ICURCON iVC 2\ @IEXPfLG NTPS BPL 8\ BVC It @lFLAGSI 1ST SPL 3\ DOEXPR: :JSR 000075 007326 007332 007706 oooon 91: 21: NOV CNPi R~,R5 BE~ NOY INC BR 14\ RO.t134 14\ RO.t137 14\ RO.t033 14\ I!ILlNFLG 6\ PC.ADRCHI mNPNOD 4\ R5.@R4 mADOR 51 CItPB BEQ WB BED CNPB BED NTPS BMI JSR TSTB 000134 000137 000033 007324 010120 007330 BIll 007756 RO.IOn ;set an expression ,is next character :1 j~s, isnore expression iis next character ;1 i':lfs, isnore expression ihas RS been set1 j~es! not Just a nale ,what is nallle'? ;predefined s~,bQl ;detined user sSlbol, proceed ;~lse see if we are in PASSl ~ode iUiier defined nale has no value irl P~SS2, error ;~et nale's value iis next character '?"? do nothin~ ;is it \1 ;~es, do nothing ;is it _? ;~s, ;~es, do nothin~ lis it (ESC>' do nothin!i ihas under line been eXlK'uted? ;~esl duap RAH locations ;chec~ if odd address or not in user RAH jare we in b~te .ode? hilfs ;de~osit data word ;~es, 000167 176536 31: JItP C"ON2 110514 005237 007756 000167 177152 41: NOVB INC JNP RS.@R4 mADDR CONTIN BlCB NOV JSR BNE IF.SAVX,I!ILIHFLG ;~et startin~ address @ISAVEXPoR4 idulP a lin@ of locations PC. TYPLIN 14\ BITB tF.IHST,@tTHPHODiavoid t~in~ duplicate addresses BED 7\ 142737 013704 004767 001366 132737 001771 51: 141: 000010 007324 61: 007336 71: 010524 11S: 000100 007330 lOS: A-58 ;dePosit bste of data ;recover last character, parse next cOlland 11 EVlluation ttodule Monitor MACRO VOS.OO Suod.. 13-K.,-83 04:10 rsimJ Routines 58 1444)0 004)6) 010512 59144414 000770 60 61 144476 102403 62 144500 10331) 63 144502 00016) 005500 JS11 DR 8': P.~. 39-1 PC. TYPlINt4 111 BVS m ~is a directive or verb Bee 91 JKP G!:T1NS iis RO, ., Bt, etc. ielse is an iostruction 64 65 144506 00016) 002460 66 67 12$: JIiP DOVER8 .DSAil LSB A-59 ;handle directives and verbs T-U Evaluation Hodull! Konitor KACRD V05.00 Sunda. 13-Kar-83 04:10 Pas, 40 ParsiM Routines H+ G£TEXP f'ar5@~ a whole ('xPte5sion ano returns its '101ue in RS. GEHEXP parses an eXHession or rE"cognizes an instruction or ;':IaboL 2 3 4 5 6 7 144512 8 144520 9 10 144522 !! 144526 12 144532 13 144540 14 144542 IS 144546 16 144550 17 144554 18 !44556 19 144562 20 144564 21 144570 22 144574 23 144600 24 144602 25 144606 26 1H610 27 144614 28 144616 29 144622 30 144624 31 144630 32 144632 33 144636 34 144640 35 1441>44 36 144M6 37 144652 38 144656 39 144662 40 144664 41 144666 42 144670 43 144674 44 144676 45 46 144700 47 144702 48 144710 49 144714 50 144716 51 52 144720 53 144724 54 144730 55 144734 ;-.EHABl lSB tF.VALU,'.CURCOHiset fla~ to allow non-valued objects 152737 000002 007326 GENEXP: :BISB 7_ iSYCh as undefined s':Ilbols, directives, etc. BR 000402 004767 005037 152737 005004 120027 001464 120027 001461 120027 001004 004767 004767 120027 001522 120027 001517 120027 001003 004767 001)436 004767 100403 004767 000430 01)4767 100476 004767 106737 106437 100406 102446 103016 10.437 102442 000412 GErm: :JSR 000452 007332 7.: ClR 000004 007326 BISB GETm: ClR 000053 CHPB BED 000055 CKPB BEQ oooon GETER": : CIIPB BNE 000402 JSR 16U32 JSR CKPB 000074 a: BEO 000133 CIIPB BED 000047 C"PB BNE 001236 JSR 007526 3$: 000450 007436 2.: 000576 007332 007332 007326 102011 St: 142737 000004 007326 005737 007706 100032 000402 004767 004767 120027 001506 56 H-4736 120027 57 144742 001507 000246 166456 000076 000135 ;initialize and set valued expression ;clear level counter and lert flass .F.UHDF,~tCURCOH;clear undefined expression flas iinitialize tel'l re~ister R4 RO,tOS3 ;is it +? GEropv ;~S, accept operator RO,t055 Hs it -? GETIW'II RO,t043 its it t? PC,EXIH!! mXPFlG U PC,EXINIT PC,GETNXT RO,t074 lPAREN RO,t133 lPAREN RO,t047 3. PC,GETUT GETOPV PC,III)"CH 2. PC,GETNKB GETDPV PC,RADCH ;set valued expression ;set next character iis it <'? ;':IeSr do lett parenthesis lis it [? ; ':Ies , do left parenthesis ; is it''? ;Jl{) jparse literal tel'l ifort'e VillJ@d e:t.F'ression <lno gel operator iis it nuteric? ina iset nulber ;force valyed E!xpressioru set operator jis it RAD~O character? ino, illegal character ;parse oaaed object ;save condition flass irecover actual values ;user defined s'::IlIIbol or undefined nale ia directive or verb, tr':l to exit iF-redefined 5~abOlr set operatoriis this a valued expression? ino, we have an instructiorl.t tr!::l lo exit iuse base value of instruction as data, set OPt DR JSR BMI JSR BR JSR B"1 JSR MFPS KIPS BM! BVS BCC KTPS BVS DR ENDEXP GETOPR @tCURC!lII EHDEXP GETDPR BVC BICB TST BPl BR ;ptoceed if user s':Ilbol it defined GETDPR tf.UNDf,@tcuRCOHishow we have encountered an yndefined s':Iabol iare we in PASS1? mlAGSl EHlI£XP ,nol don't allow undefined s~bol if1 f;:f'feSSlOn j~es, proceed with eXP'I'ession GETDPR 6ETOPV: :JSR GETOPR::JSR CKP! BEQ CKPB BEQ m PC,GETNAN @t[XPFlG mXPFlG a. PC,EXINIT PC,GETlCH Ro.t076 RPAREN RO,t135 ,PAREN A-60 ;initialize data expression ,recover last character iis it >1 ;~es, do ri~ht parenthesis hs it J? ;~s, do risht parenthesis fetch t-11 Evaluation ~odul~ Monitor MACRO \lOS. 00 Sund., 13-M",-83 Q~:10 Pas. ~O-I ~int Routines ~59144150 """''''' ""1'1'>"£\ ~"" 103412 601W'52 120027 61 lm56 103007 62 IH760 116001 63 14~76~ 042701 64 1~4770 020127 65 144m 103053 66 67 144776 004767 68 69 1~'5002 10'5737 70 145006 001015 71 145010 106437 72 14'50I~ 102410 73 14'5016 106437 74 145022 100~01 75 145024 102406 76 14'5026 102003 77 145030 005737 78 14'5034 100101 79 145036 000167 80 81 145042 000167 82 83 145046 020627 84 85 m052 103773 110 145054 004767 87 145060 010546 8Il 145062 113746 89 14'5066 105237 90 145072 004767 91 145076 004767 91 145102 004767 93 145106 010504 94 145110 112637 95 145114 012605 96 145116 004767 97 145122 000700 98 99 145124 004767 100 145130 004767 101 145134 004767 102 145140 110037 103 145144 004767 104 145150 000602 105 106 145152 105337 107 145156 100731 108 145160 000417 109 110 145162 004767 111 145166 011505 112 145170 000207 113 114 145172 106437 000060 1'5'5774 177770 000006 '\.,'\\\'\ BLO C"PS BHIS HOVll BIC CKP BHIS """"",,,,, 61 \\.~ .....~'"\.y~\~, \1t.\."S\ ,~. j~es, not an operator RO.t060 Hs it above /? ;~~S, not an operator 61 ;~~t parsins: code PARAKS-040IRO).RI ilask out the s:arba~e 1177770.Rl jis it an operator? Rl.t6 ;~S, do operator OOOPER 000216 6$: JSR PC.EXDOOP ina lore operators, but de previous one 007333 166344 5$: JHP @tlEVEl 131 "CURCO" 51 @tEXPFlG 91 131 '51 @!fLAGSI 121 GETLCH jare we at top level? ina, error ii5 expression supposed to be valued? ;not necessaril'S iwas tera valued? ;00, but it was user defined 007706 EHDEXP: lSlB SHE HTPS BVS HTPS !HI BVS 91 : BIIC TST 176116 13\: JKP CIIOH2 007410 lPAREH: CKP 007326 007332 1ft 000112 007343 007333 000102 166324 177432 007343 166304 000042 000064 1662..6 007343 166256 ;00, error iwas valued, no probl~1 iare we in PASS1? ino, undefined s~lbol is not allowed iget last character back in RO ishow error SP.IBOTTOKtI0.t22.t2. jis there rool to recurse? j(that was S words tor future JSRs, 11 for interupts, and 1 safet~) ;no, parenthesis too deep 131 910 ;torce upper expression to be valued JSR PC.EXINIT R5,-(SP) KOV ;save accululator @tOPER!T'-(SP) iand previous operator MOV9 ;show we are ~oin9 deeper IHCB mEVEl hnitialize accu•• and operator for neKt level JSR PC.EXIHll ;set first character of nested eXpression JSR PC.GETHXT ;g;et value of nested e):pression JSR PC.GEIEXI R5.R4 h.ested value beCOteS operand KOV ISP)t.@WP£RAl ;r~over operator ItOVB KOV ISPlt.RS ;and accuaulator ;~et character after right paren PC.GErNXT JSR ;and look for next operator 8R GErOPR MOPER: JSR JSR JSR HOVB JSR BR PC.EXIHlT PC.EXDOOr PC.GETLCH RO.@lOPERAT PC.GETHXT GETERH iforce valued expression iexecute previous operator iget new operator istore it ;~et next character Hook for a hr. 007333 RPAREH: OECB BKI BR mEVEL 131 EXDOOP iare we at top level? ;~s, too .an~ ri~ht parenthesis ido last operator inside parenthesis ~nd return 177764 ,PAREH: JSR KOV RTS PC.RPAREH @R5.R5 PC ido a fetch EXIH1T: HTPS mURCOil ih.Js expression alread~ beer. initialized? 007326 A-61 T-ll Evaluation Module "onitor ItACRO \105.00 SUnd•• 13-N.r-83 04110 P••• 40-2 P.rsins Routines 115 145176 116 145200 117 145206 118 145210 119 145216 120 121 145220 122 145224 123 145226 124 145232 125 145234 126 127 145240 128 145244 129 130 \31 145250 132 145252 133 145254 134 145256 135 145260 136 145262 137 145264 138 145266 139 145270 140 145272 141 145274 142 145276 143 145300 144 145302 145 145304 102007 evc 112737 000053 007343 EXINll I Nove CLR 005005 aIea 142737 000002 007326 4$: RTS 000207 106437 007326 102774 113701 007343 006301 000171 145146 EXDOOPI HTPS BVS HOVe ASL JNP 012702 151372 000167 175742 12.: 152130 143164 143164 143164 143164 152m 143164 143164 143164 152142 152154 14J164 152160 143164 152164 OPRTBL: .WOItD 41 t053,@tOPERAT ;set + as default operator iclear ex?ression ~rcu.ulatDr tF,VALU,@tCURCOHishow expression is valued R5 PC ii1 expression is valued, do operator jnot valued ;set operator ~tOPERAT,R1 ;aake a word index R1 @OPRTBl-102(R11 iexecute operator @tCURCON 41 NOV tUHDEFX,R2 JIIP ERROR .DSABL LSB .WORD •WORD .WORD •WORD .WORD .WORD .WORD •WORD .WORD •WORD •WORD ; ':IE'S LDGOR CHOH2 CI!OH2 CHOH2 CNOH2 LOGAHD CHOH2 CHOH2 CHON2 NULTIP ADOII CHOH2 •WORD sum .WORD •WORD DIVID CNON2 A-62 ;point to undefined expressiorl aessa!le ;show error j! ,., ;t a ;I ;& ,., ;( ;) a it ;, ;;. ;1 1-11 Evaluation "odule "onitor MeRO V05.00 Sundo. 13-Ho,-83 04:10 Po •• 41 Parsin~ Routines I 2 3 4 5 " 145306 7 145310 8 145312 9 145316 10 145322 11 145324 12 145326 13 145330 14 145334 15 145336 16 145342 17 145344 18 19 145350 20 145354 21 145360 22 145362 23 145364 24 145370 25 145372 26 145374 27 145376 28 145400 29 30 145402 31 145404 32 145410 33 145412 34 35 145414 36 145420 37 145424 38 145426 39 145m 40 14543-4 41 145H6 42 145440 43 145442 44 145444 45 145446 itt GETHHB parses a nulber and returns all condition fla~s lowered. i-- 005303 010346 004767 004767 100373 012603 005001 120027 001427 004767 100402 000167 GETtmB::DEC 166000 007034 1$: 000056 006740 175614 4$: 004767 165742 004767 006776 100410 102770 162700 0000.0 006301 006301 006301 060001 000763 3$: 005303 004767 166016 010104 000207 0047.7 165676 004767 006732 100767 162700 000060 006301 010146 006301 006301 062601 060001 000762 ItOV JSR JSR BPl HOV ClR CHPB BED JSR BIll JHP R3 R3,-ISP) PC,G!:TCH PC,NUHCH ;savt' runnin~ pointer to peek. ahead II hIes, wait tor first r.on-nuaeric character· ;~ back to besinniM of nUlber ISP)hR3 Rl RO,S056 2. PC,RADCH 31 CIIOH2 DR PC,GElCH PC,HUllCH 51 41 t060,RO Rl RI RI RO,RI 31 SS: 6S! DEC JSR Hoo RTS R3 PC,6[TNXT Rl,R4 PC 2$: JSR JSR SKI SUB ASl HDV ASl ASl ADD ADD BR PC,IlETCH PC,HIJIfCH 61 to60,RQ Rl RI,-(S?) Rl Rl ISPlt,Rl RO,Rl 21 JSR J5S BHI BVS SUB ASl ASl ASl ADD A-63 iis it 0 thtoU9'h 9? hs first non-nuaeric chancter a period? ;~es, parse a decilal nulber ;is it alphabetic? ;00, parse an octal nulber Hlle!!lalr libel besins with a nUlber ;is it 0 through 7 or a through 9? ino, end of nUlber ;8 and 9 are illeS'al in octal nUlbers 'like it BCD ,accUMlIate digits ;set next dhlit ;~et character after nolber ;store value at oulber ;trailin~ dedlal iaccUiulate disits iset next disH F'oirlt T-ll Evaluation ""601. "-nitor MACRO V05.00 Sunday 13-~.r-S3 04:10 Paie 42 PitSin~ Routines 1 2 3 4 5 6 7 8 9 10 11 12 13 itt GErM"" parses a nale and converts it into RADSO at locations TBLTOP arid T8I.TOP!2. It the nale has a corres?oodins value, it is placed in R4. R2 is an index to where the nail! is stored. It cao index either the RAD50 table in ROH tor predefined 5~abo15' or th@ user 5~.bol table. GETNAH returns condition flags to indicate these options as follows: V=1 leans the nale has no value N=l leans the na-e is user defined (not ~redefined) C=l leans the nail! is a Ine.onic, directive, or verb N=O, V=O, C=O leans that the naae is RO, SP, PC, Bl, UR, etc. H;:::O, 11=0, C=l aeans that the nile is an instruction N=O, V=l, C=1 aeans that the nate is directive or verb N=l, V=l aeans that the nale is an undefined 5~abol N=l, V=O aei~S that the nale is a user s~abol 14 15 ;-16 17 .ENAB!. 18 19 115450 112737 000003 007341 GETHAK: :KOIJB ClR 20 145456 005001 1$: 21 145460 004767 006712 JSR 22 145464 004767 165626 JSR JSR 23 145470 004767 006606 BM! 24 145U4 100431 DECD 25 145476 105m 007341 BIlE 26 145502 001lO6 tIOV 27 145504 010137 007320 MOVB 28 145510 112737 000003 007341 ClR 29 145516 005001 31: JSR 30 145520 004767 00bb72 J5R 31 145524 004767 Ib5566 32 145530 004767 006546 JSR BM! 33 145534 100421 34 1455lb 105337 007341 DECB ~E 35 115542 001366 41: J5R 36 145544 004767 165546 JSR 37 145550 004767 006526 BPl 38 145554 100373 BR 39 145556 000412 40 JSR 21: 41 145560 004767 000264 ItOV 42 145564 010m 007320 ~OV 43 145570 012737 000003 007341 ClR 44 145576 005001 JSR 6.: 45 145600 004767 000244 MOV S.: 46 145604 ~101l7 007322 DEC 47 145610 005l03· JSR 4ll 145612 004767 165610 MOV 49 H5616 013700 007320 SO ClR 51 145622 OOS002 10.: CMP 52 145624 020062 156142 BNE 53 115630 001011 CMP 54 145632 020162 156144 BED 55 14S0l6 001414 ClIP 56 145040 020127 006200 ONE 57 145644 001003 ... lSB ll,mOUNT2 Rl PC,ASCRAD PC,GETCH PC,RADCH 21 @tCOUlIT2 iconvert ASC!! in RO to RAD50 in Rl ;get ~ext character iis it a le~al RAD50 character? ;no, end of na.e If Rl,@tTBlTOP t3,ftCOUHT2 Rl PC,ASCRAD PC,GETCH PC,RADCH 61 mOUNT2 31 PC,GETCH PC,RADCH 41 51 jdiscafo all characters after 6 ;i~ character still part of nale? ;':Ies PC,PADRAD RJ,ftTBlTOP t3,@tC0UHT2 Rl PC,PADRAD RJ,@tT8LTOP!2 R3 PC,GETNXT @lUlTDP,RO ,pad Rt with spaces istore first word of naae R2 RO,D5YHS(R21 ;colPare naae to predefined ones ;set next leaninsful character jRO, Rl contain converted ~a.e m RIoDSYHS!2(R21 iget value of predefined 5~abol PDSVAl iaight this be a bste aode anelonic? R1ot50150102 lif inc A-64 T-11 Eyaluation "odul~ Monitor ItACRO V05.00 Synd.l. 13-Kar-B3 0~:10 Pas, ~2-1 Parsin~ Routines 5B 145646 005762 59 145652 .0 14565~ 61 1~5656 62 145662 63 14566~ 64 65 145670 66 145674 67 145676 68 145700 69 145702 70 145706 71 145710 72 73 145712 7~ 14S716 75 145m 76 145724 77 1~5726 78 79 145730 80 1~5734 BI 145736 B2 14SHO 83 1457~2 B4 85 HS744 020227 000054 103401 002005 006202 016204 007732 006302 la: 21$: 13$: 020227 000100 103004 016204 007700 000257 000207 14$: 020227 000300 103003 000277 000250 000207 7$: 006202 17$: 15t: 155~~ 020227 000340 103003 012702 000064 000421 020127 001014 020027 001411 006202 006202 105762 100323 006302 006302 052704 162702 000257 000261 000207 006200 18$: 1557H 012700 OQOQ~O 004767 006346 105337 007341 001371 000207 20$: 19.: DSYKSt2IR2) PDSVAl IR2ltdR2lt RbtTOPHAK 101 GETSYK ;and is nale the saae without triiling 'B'? ;~es, handle b~te lode case iadY<lrIce to next nate iend of table? jnot ~et ino latch to predefined 5~lbols BlO BGE ASR KOV ASl BR R2.tDSYKUR-DSYKS;now ;0\ ,,"bol', valy, in R4 iRO through • m iB:1 or higher 141 ilake a word inde>; R2 IROIR2hR4 ;RO thrOtJSh , R2 lSI CHP BHIS KOV CCC RTS R2.tDIRVRB-DSYKS ;BASIC or hiSh,r 71 BRKFll-(DSYKURt4-DSYKS)IR2).R4 m throYSh B4 iflas a predefined s~lbol PC iand return CKP SIHS sec R2.ICKHEKS-DSYKS iCLC or hiSiher 171 iflas a directiYe or yerb CLN RTS PC ASR KOV ASL CKP BHIS KOV BR 075131 100000 000340 TST BED CKP CKP BlO JKP PDSVAI..: :CHP 000~05 B6 145746 016204 B7 1~5752 006302 as Im5~ B9 145760 90 145762 91 145766 92 93 145770 9~ 145774 95 HS776 96 146002 97 146004 98 146006 99 146010 100 146014 101 146016 102 146020 103 146022 104 146026 lOS 146032 106 14603~ 107 146036 lOB 109 110 146040 III 1~6044 112 1~6050 113 146054 114 146056 1S614~ 00140. 022222 020227 000770 103760 000167 003070 CKP BHE CKP BEQ ASR ASR TSTI BPL ASL ASl BIS SUB CCC SEC RTS .VSAIL PADR1: NOV JSR PADRAD: DrCB BNE RTS ;and ntum R2 CBASES-«CKNEKS-DSYKS>/2>IR2).R~ ;~t yalue of Inetonic R2 R2.IKNEKS-DSYKS HiALT or higher IBI tKNCCC-KNEHS.R2 ;ind" lneoonic CCC 191 ;jwte lOde naae? Rlot50lS0102 ;no 201 RO.I(23150t27>ISOtOI iSWAB anelonie? ;~e5' not b~te lode 201 R2 R2 iinstruction lesal in b~te IO( PARAltS-<<KNEKS-DSYKS)/4>IR2) ;no 2a R2 R2 ;adjust opcOOe to b~te lode t100000.R4 tKNEKS-DSYI'!S,R2 iad...iust indl!x to instruction table iflag an instrijction PC m 10~0,RO PC.ASCRAV @lCOUIfT2 PADRI PC A-65 iroijtine to pad RADSO triplet with spaces T-11 Evaluation Module Monitor "ACRO V05.OO Sond•• 13-Ha,-83 04:10 Parsins Routines 1 2 3 4 5 6 146060 7 146064 B 146070 9 W072 10 11 146076 12 146100 13 14 15 146104 16 146110 17 146114 18 146116 19 146122 20 146124 21 146lJ2 22 14m. 23 146140 24 146146 25 26 146150 27 H6154 28 29 30 146156 31 146162 32 146166 33 146170 34 146174 35 36 37 H6176 3a 146202 39 H6206 40 41 146210 42 146214 43 146220 44 45 146222 46 146230 47 48 146232 49 146240 SO 146242 51 146246 52 146250 53 146252 54 146256 55 146262 56 146266 57 Pa~. 43 itt GETlI! pa,s,s ASCII lit.r.ls. j-- JIIf' CItOH2 don't fold case iis it <CR)? ioo ;error, no character on line ItOV JIIP RO,R4 GETNXI ;store value ;tet next character, return 004767 165326 120027 000015 001002 000167 175066 GETLIT::JSR CIIPB BHE 010004 000167 165322 1$: 110137 004767 005303 105m 100403 042737 120027 001106 11J737 000502 SETHOD: !!OVB JSR !lEC ISIB 007330 8NI BlC 000001 007756 1$: CNP8 000015 BNE KOVB 007330 007331 BR 007330 165312 PC.GETCHC RO.IOI5 1$ Rh@llHPNOD PC.GEINXT R3 @lTHPItOD 1$ Ih~UAonR ;fix address when leaving b~te lode RO.to1S ECON ;i5 ,ode Calland last cOlland on line? ECAN:: NOV 142701 000100 152701 000200 000736 EBn:: 9lCB BISB DR IF .IIiST .Rl IF.BYTH.Rl SETNOO 142701 000200 152701 000100 000731 EINS: : BICB BISB BR IF.BYTK.R1 IF.INST.RI SETKOn 012m 007320 007462 EClR:: NOV BR 000451 132737 001447 106·\37 100044 102443 162702 004767 004767 ooom 000002 007327 ED£l:: Bm EDELl: BEQ KIPS 007332 BPl BVS SUB 000006 JSR 003620 JSR 003406 BR set perlanent lodes IF .AIS.Rl SETKOn 012700 000020 105060 007757 077003 005037 007754 000467 CLRB SOB CLR BR ; ':tes , ECON EAlIS:: BISB u: in<] ~ITKPNOD.iIPERKOD 152701 000002 000753 BR ;~et next character, t20,RO BRKfll-I (RO I RO,II ~tlWA!CH ECON tTBlTOP,@tTBl80T,love s!:Ilble table pointer to el1't!:l position ECON tF,VALU,@tlASCOKiwas last 'colland" valued? ;~es, not just a nate EERR ilEXPFlB El:RR EERR 16.R2 PC.TYPSYK PC.DELSYN ECDH A-66 ;can't delete pre~efined s~lbols ;can/t delete a forward reference ;back UP to specified entr!:l ;t!t'Pf current value before deletin~ ;delete entry T-11 Evaluation Module Monitor I1IICRO V05. 00 Suod" 13-M.r-83 04:10 Page 43-1 ParsiM RoutiOf'S 58 146270 59 146274 60 61 62 146276 63 146302 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 SETHOD 010537 007466 110337 007630 000167 174734 EREP:: HOV JHP RS,@tREPEAl R3,UBP CHON4 142701 000002 000672 ESYM:: BICB SR tF.ASS,R1 SETI10D 004767 165102 004767 176172 000115 EEXT:: JSR JSR JKP PC , GETHXT PC,GE1EXP HOVe ;enable repeated execution ;aC"t lih- a liew line starts after <ESC) N iexecute rest ot line repeatedl~ ,~et character after Z ;parse transfer address @R5 73 74 146332 75 146336 76 146344 77 146350 78 146354 79 146360 BO B1 146364 B2 146370 B3 146372 B4 146374 Ir.i 146400 86 146406 87 146412 BB 146414 B9 146416 90 146420 91 146424 92 146426 93 146432 94 146436 95 146442 96 146444 97 146446 98 146450 99 146454 100 146456 101 146460 102 146464 103 104 146470 105 146474 106 146476 107 146502 lOB 146504 109 146510 110 146512 111 016746 040772 [RES:: 042767 000200 040764 004767 003360 012667 040754 000167 175224 ECOH: 000167 174600 EERR: Hoo SIC JSR HOI' JHP JHP lKPI1OD,-ISP) tF.SYlH,IKPHOD PC,lYPREG ISP)t.THPItOD CItOH5 CHOH2 EttOV: : 106437 007324 100373 010502 013701 007336 142737 000010 007324 005737 007706 100760 020201 103760 105737 007330 100404 042701 000001 052702 000001 013704 00))56 u: 060204 HIPS @tlIHFlG ;see it underline has been executed ;ii hasn't--error-- lissins ~araleter EERR R5,R2 ,Set fiflal address of SQurce .e.or~ block @tSAVEXP,R1 ;set starting address of source IF .SAVX,@tLINFlGishow that saved expression has beerl IJsed @tFlAGSI iare we in PASS! lode? ECOH ;Yes, don't execute love R2,RI iis final address below startiM address? ;~es, show error EERR jare we in byte lode~ @tTHPHOD ;ws 11 t1,R1 ;else force starting address to even bo~ndary tllR2 iar~ tinal address to odd boundir~ ;!iet startiM address of destination block @UADDR,R4 R2,R4 icalculate tinal address frOi lensth 01 source R1,R4 14,RO isave result for later ;are we in byte .ode~ @tTHPHOD ;yes 2. iadjust result for previous SIC and ~IS R4 ;check that final destination address is legal PC,ADRCH2 ;~et shrUM destination address and check it PC,ADRCH1 inow seE' if destination addre5s~ straddle protected RAH RO,UUR ;i$ tinal addr below lower instance of prot RAM ;yest destination ran~e OK 31 ;is start addr above uPper instance of prot RAM R4,t20000 ;~es, destination ranse OK 31 jdoes destin overlap lower instance of prot RAH R4,t10000 ;~es, ranSe is unacceptable 4$ iis final addr below upper instance of prot RAM R00t20000 ;this is a trick test -- we know RO is not ;.ithin the ra.'. 'URt10000--17777 Ir.1 ADRCH2 jYes, raMe doesn't overlap UPPfr instanCE! 31 tUSERAH,R2 ;point to U~f RAM error .essaSe ~60104 010400 105737 007330 100401 005304 004767 006044 004767 006034 020027 103415 020427 103012 020427 103403 020027 2.: 006500 Bf'l MOV HOV SICB lSI 8HI CHP BlO rSTD BHI BIC SIS IIOV ADD SUB HOI' ISTB 8HI DEC JSR JSR CHP BtO CHP 020000 SHIS CHP 81.0 CHP 010000 020000 112 113 146516 103404 114 146520 012702 154476 4.: BlO HOV A-67 ifor b~te Aode ; ;hp'e contents of reSisters and watcnpOlnt irestore fla!iS T-11 Evaluation Hodul. Honitor IlACRO V05.00 Sunda, 13-Har-83 04:10 Pa.. 43-2 Pirsin~ Routines 115 H6524 116 117 146530 118 146532 119 146534 000167 174462 3.: 020401 101004 61: 112124 120 146536 020102 121 146540 101775 122 146542 000704 123 51: 124 146544 005202 125 146546 005200 7i: 126 146550 114240 127 146552 020201 128 146554 101375 129 14655.\ 1XlO676 130 EFHD:: IJ1 146560 106437 007324 132 146564 100275 133 1465.\6 010537 007334 134 146572 142737 000010 007324 135 14661Xl 004767 164622 136 146604 004767 175712 137 146610 024646 138 146612 010516 139 146614 005066 000002 140 146620 120027 1XlO137 141 146624 001010 142 146626 004767 164574 143 146632 004767 175664 144 146636 010566 1XlO002 145 146642 005166 01XlO02 a: 146 146646 013704 00/336 2t: W 146652 105737 007330 148 146656 100430 149 146660 042704 000001 150 146664 011401 m 146666 011600 152 146670 074001 153 146672 046601 000002 154 146676 001005 St: ISS 146700 004767 006344 156 146704 004767 006204 157 146710 000405 3$: ISB 146712 005204 159 146714 105737 007330 160 146nD 100401 161 146722 005204 6S! 162 146724 020437 007334 163 146730 101750 164 146732 022626 165 116734 000167 174652 166 4$: 167 146740 111401 168 146742 011600 169 146744 074001 170 146746 046601 000002 171 146752 042701 177400 error afS5age JHP ERROlI ,~rint CHP 8HI R4,Rl 51 IRllt. IR4lt R1,R2 61 ECIlH ;now see if destination block is above or below ;source -- above leans use backward transfer ;else do forward transfer R2 RO -IR21,-(ROI R2,Rl 71 ECIlH ;adJust pointer$ for autodecreaent 1IOV8 CHP BLOS BR INC INC HOVB CHP BHI BR @tLlNflG EERR R5,@tADVIIDR KTPS BPl HDV BICB JSR JSR CHP KOV ClR CHPB SHE JSR JSR KDV CON HDV TSTB BKI BIC KDV KOV XOlI BIC BHE JSR JSR BR INC TSTB SKI INC CKP BlOS CKP JHP PC,GETNXT pe,GETEXP -(SP),-(SPI R5,ISPI 21SPI RO,1137 11 PC,GETNXT PC,GETEXP R5,2ISP) 2ISP) @tSAVEXP,R4 @tTKPHOD 41 .1.R4 @R4,Rl ISPhRO RO,Rl 2(SP)'R1 31 PC, TYPAllR pe,TYPlDI 61 R4 @tTMPKOD 61 R4 RMtADVADR 21 (SPIt. ISPIt CONTIN HDVB HDV XOR SIC BIC @R4,R1 ISP)'RO RO,Rl 2(SPhRl t177400,R1 ida entire block 'perfor. backward transfer ida erltire Dlock ;see if underline has been e~ecuted ;it hasnft--error--.issin~ paralfter ;$ave upper search ranse li,it t.f'.SAVx,@tLINFLG;show that saved e>:pressior\ has been used A-68 ;get character atter r ;get valiJe ta be searched for ;.ak!! space for two scratch locQtion on stack ;save vallJe to be 'Searched for Oft stac~; hl"litializl? cOIiPleaent of search .as~. to zero ii'S next character an underscore? ina, optional task para.etet not F'resent ;~et character after underscore iset search task ,store it on stack ;coI?le.ent task i§et starting address at search range ,are we in byte lode ;~es, perfort bytewise search ;ror word sE'arch, lake sure address is fvefl ;get a word j~et search value jeo.pare values ~ isnore bits that are .asked out iM latch location itl§'e contents! but not as an instruction iTYPLOl alread~ increaented R4 iadvance to next location ;ore we in b~te lode? ;~es, advance blJ one ielse advarlce a whole word ;see if ef,tire raMe has been checked ;continue searchin~ idiscard stacked vallJes irt't'over character in RO, fuse next ('cI.and ;t~pe address of latched ;'set a b!!lte ;get search value icolPare values jignore bits that are .asked out iisnore discrepancies in high b~te 1-11 fViluition Kodul. Keni!o, KACRO V05.00 Sunda. 13-K.r-83 O~:10 P.... ~l-l Patsin~ Routines 172 W756 000747 173 BR 174 EKOD:: JSR 175 H6700 004767 164540 176 146764 013704 007706 I1O'J HOV 177 146770 012702 156256 178 H6n4 032704 100000 BIT 179 147000 004767 000132 JSR 180 147004 032704 004000 BIT 181 147010 004767 000122 JSR 182 147014 113704 007330 HOVB 183 147020 012702 156366 KOV 18-4 147024 132704 000100 BITB 185 H7030 001402 BEG 186 147032 004767 000100 JSR ~.: 187 H7036 188 147036 012702 156346 KOV 189 147042 132704 000002 BITB 190 147046 001002 SHE 191 147050 012701 156412 MV 6$: 191 147054 004767 000056 JSR 193 147060 012701 156362 KOV 194 147064 132704 000200 8lTB 195 147070 001402 8I:U 196 won 004767 164676 JSR 197 147076 012702 156376 KOV 7': Bm 198 147102 131704 000300 199 147106 001002 BNE 200 147110 004767 000022 JSR 201 147114 012701 156432 lOS: KOV 202 147120 031767 004000 040203 8lT 203 W126 004767 000004 JSR 204 147131 000167 177216 JHP 51 PC.CRlF 'tFLAGSloR4 tDIRVBI.R2 tF .PASloR4 pc.a tF.HOST.R4 PC.II itTHPKOO.R4 tOIRVSI.R2 IF .INST .R4 H pc.a ;start a n~w line ;get a COPS of SOle lode flags ;point to PASSl cO.lland ;see if welre in PASS1 or PASS2 ;print proper lode and point to NOPROT ;see if HOST or NOHOST is actiYI! ;pri~t proper aode ;get a cOP~ of the rest of the lode flass ;point to INSTRU coe.and ;see if instruction lode is active ;brcmcn if not jprint propel' lode tOlRIIBA.R2 tF.ABS.R4 61 tDIRIISS.R2 ;point to ABSOlU c~.. and ;see if absollJte or SYlbolic IIOdl! is active i;H)solute .ode ;point to s~lbolic lode pc.a jprint ?T'oper lode ;poif)t to 8YTE conand tDIRV8H.R2 IF.BYTK.R4 ;see i1 b~te lode is active 7. Ht isn't, print rrothins PC.fRINT2 ;else print BYTE cO'land ;point to word lode tDIRVBN-4.R2 Ii t not b~te or inst.rurtiorl then word If.INST·F.BYTK.R4 20. pc.a tDIRVBTtI4.R2 IF.VT.PERKOD PC.I. EeON ;point to vtlOde ;see if set jgo show wich vt tode jand re-turn 205 206 147136 207 147140 208 147141 20'1147144 210 147146 211 147152 212 147156 113 147162 214 147164 106746 106416 001001 011222 004767 164622 012700 004440 004767 164346 106426 001401 215 147166 022222 216 147170 000207 ll: 2$: HFPS KTPS SHE CKP JSR 3S! JSR KTPS BED CMP RTS ItO\I -(Sf) ;save- Z flas (SP) ,get back i CQP~ ;print ('oatand pointed to b~ R2 2. (R211. (R11t ;else- advance to next CQ[IIt.anlj ;print co.tand, advance R2 PC.PRIHT2 t400101It040.RO 1(so,'.> <tab> PC.CHROUT (SPit ; reco~er Z 11as ii1 we advanced before, don't Ijo it asain 31 ;~ip oyer next co ••and (R211'(R2It PC A-69 T-11 Evaluation "odulp Monitor MACRO UOS.CO Parsins Routines 1 2 3 4147172 S 147176 .147200 7 147204 18 Hmo 19 147232 20147234 21 147236 22 Hmo 23 147242 24 147244 25 147246 26 147250 27 147252 28 147254 29 147256 30147260 31 147262 32147264 33 147266 34 147270 35 147272 36 147274 37147276 38 147300 39 147302 40 147304 41 147306 42 147310 43 147312 44 147314 45 147316 46 47 147320 48 147324 49 147330 50 147336 51 147342 52147346 53 1473S0 54 147354 5514735. 56 147362 57 147366 P.~ 44 .SSTTl Directive and Verb Handlin~ Routines 162702 000100 006202 020227 000042 103403 8 147206 005303 9 147210 10 147214 11 12 13 147220 14147220 15 147222 16 147214 17 147226 Su~'. 13-M.,-83 04:10 013701 007330 000172 147220 OOIltRSllSUS ASR CMP 1Il0 DEC u: ItO\I JMP tDIRVRB-DSYKS,R2;retove offset frot index to verb 'I~.e ita word index R2 Hs this verb an <ESC> sea. reF'liIceaent R2.'URBDS1-~BDSP ;00 a ;Iake it so thit we can use pr~viaus routines R3 ;trol the escape seGuence handler @tTMPftOD.Rl @VRBDSPIR2) ,di5~atch to proper handlins routine IJRBDSP: : 147320 147m 14741. 150202 150212 150222 150306 150504 150442 143164 143216 147776 W700 147466 147560 147634 147654 146150 146156 136752 146176 146210 146222 147444 146270 150012 146312 146760 146Jl2 152040 147374 147406 .WORD .WORD ,WORD .WORD .WORD .IIORD .WORD • WORD .WORD .WORD .WORD •WORD .IIORD .IIORD .IIORD •WORD •WORD URBDS1: .WORD .WORD .WORD .IItlRD .IIORD .IIORD .IIORD .WORD .WORD .WOIID .WORD .WORD •WORD •WORD •WORD HELP:: MOV 012702 156242 2.: 004767 164174 JSR 112737 000010 007341 "OIIB a: JSR 004767 164432 020227 156442 CMP BHIS 103010 DECS 105337 007341 001763 BEO 012700 004440 HOU 004767 164142 JSR BR 000763 HRP Gl) STEP PASS1 PASS2 HOST HOHOST TAlK LOAIr CMOH2 CMON3 $.EVEN \.ASCI I. BYTE I.IIORD I.BLKS I.BLKW EADS [CAN SHALT ; .START ;.END ;ABSOLU point to the start of escape ;CANCEL ;EXIT ;Bm EBY! ElNS ECLR DELETE BIIIM IRPEAT ESYI! EMOD EREG TYPTBL UTON vroFF .DELETE ;WORD ; REPEAT .SYMBOL ;SHOWHO ; S!iOl/RE ;SIIOWSY mON ;VTOFF IDIR~B.R2 ;t!n"! the verb/dirpctive table on HNSTRU ;CLEAAI ;start i new line PC.CRLF 18,,@tCOUNTZ ;put 8 cOllands on a line ; print a cOMantj PC,PRINT2 ,have we done the whole table? R20ICHNElIS ;~s 31 @lCOIJHT2 ,have we finished a line? ;~es 21 1400t0111040.RO ;t,pe <.pace> (t.o> PC,CHROUT 11 A-70 the console T-l1 Evaluation Kodule Monitor HACRO V05.00 Sund" 13-H,r-83 04:10 P,se 41-1 Directive and Verb Handlins Routines 58 59 147370 60 61 147374 62 W402 63 64 W406 65 147414 66 67 W416 68 147424 69 147432 70 147440 COHTIN ;recover character in RO, continue parsins line 052767 004000 037726 VTON: SIS 000167 174176 VTJMP: JIIP Ir.VT,TMPHOD CHON5 ;turn vt .ode on 042767 004000 037714 VTOFF: SIC SR 000772 Ir.VT,TIIPHDD VTJMP ;turn vt off 052737 000200 007706 STEP: : 152737 000001 007324 023727 007746 006500 GO:: 000167 172256 Ir .SST, PlrLMlSl ishow WE' are sinsle stepping 000167 174216 3t: JIIP BIS BISB CHP JNP 71 72 73 147444 005203 74 147446 004767 175040 75 147452 005303 76 147454 132737 000002 77 147462 000167 176552 78 79 80 147466 013737 007756 81 147474 004767 175022 82 147500 113746 007330 83 147504 052737 000200 84 147512 013704 007334 85 147516 004767 005006 B6 147522 112637 007330 87 147526 110514 B8 147530 005237 007334 89 147534 120027 000054 90 147540 001003 91 147542 004767 163660 92 147546 000752 93 94 147550 013737 007334 95 147556 000571 96 97 98 147560 013737 007756 99 147566 004767 174730 100 147572 013704 007334 101 147576 004767 004726 102 147602 010524 103 147604 010437 007334 104 147610 120027 000054 105 147614 001003 106 147616 004767 163604 107 147622 000761 108 109 147624 013737 007334 110 147632 000543 111 112 113 147634 004767 174662 114 147640 106437 007326 DELETWINC JSR DEC 007326 BITS Jltp tr.SST1,PILINFLG PIISP,IIUR jis user SP in his RAH? ;IJse ke':lpad lanito:' GO routine 1001 ;counteract earlier DEC RJ in this C3se R3 ;set SYlbol nate to !;Ie deleted PC,GENEXP ;r.ow prepare to use <ESC> seCluence routine R3 tF.VALU,@tCURCOHireplaces test on LASCOH in EDEl ;!:Io to routine t.o delete a S':ltbol EDELl 007334 t.BYTE: :MOV u: JSR IIOVB 007330 BIS IIOV JSR HOVB HOVB INC CIIPB BNE JSR BR @ttADDR"tADVADR;!:Iet a scratch COP':I 0' current address PC,GETEXP ;set a value to be deposited !tTIIPHDD,-(SP) aool ADRCHK into thinldM we are in b':lte lode Ir.BYTH,@ITMPMOD ;!:Iet runniM copy of current address @IADVADR,R4 ;check that it's not in probcle,j RAM PC,ADRCH2 (SPH,@ITHPItOD ;restore proper lOde bits ;deposit a b",te R5,@R4 @IADVADR ;advance runniM address hs next. character a COllla? RO,1054 21 ina PC,GETHXT ;get character after COila ;deposit another b~te 11 007756 2$: 'tADVADR"tSADDR;update current address VCOH HOV BR 007334 t.WORD::MOV 1$: JSR HOV JSR NOV IIOV CIIPB BHE JSR BR @ttADDR"tADVADR,!:Iet a scratch COP':l of current address PC,GETEXP ifet a value to be depo5ited ;set runnins address mDVADR,R4 ,check. that it's not in protected RAI1 PC,ADRCH2 R5,(R41t ideposit a word ;advance runniM ('01'':1 of (,lJrrent address R4,@tADVADR RO,1054 lis next character a cOI~a? 2$ ina PC,GETNXT ;set character after COila ;deposit another word If 007756 2t: itADVADR,UtADDRiIJPdate current address VCON MOV DR t.BUB: lJSR NTPS PC,GETEXP @ICURCOH A-71 ;set arsulent icheck it it contained undefined s!:Ilbols T-ll Evaluatio~ Module Monitor MACRO V05.OO Sunda. 13-Mar-83 04:10 Pase 44-2 DirfCtive and Verb Ha~dling Routines SHE ADD DR VERRI R5,mADDtl VCON ;it did, refuse .8LKB directive ;add it to current aodress t.BLK": :JSR PC,GETEXP i~et ar~Ulent ~tCURCOH ;check if it contained undefined syabols Ht dieh refuse .lItKW dirto'ct-ive ;.ake a scratch cop~ idouble it ;add it to current address 115 W6H 001H6 116 147646 060537 007756 117 147652 000533 118 119 120 147654 004767 174642 121 147660 106m 007326 122 147664 001136 123 147666 010504 124 147670 006304 125 147672 060437 007756 126 147676 000521 127 128 129 H7700 110037 007345 130 147704 013737 007756 131 147712 004767 163m 132 147716 120037 007345 !33m7n 001417 134 147m 113m 007330 135 147730 0,2737 000200 136 147736 013704 007334 137 lm42 004767 004562 138 147746 112637 007330 139 147752 110014 1<40 147754 005237 007334 141 147760 000754 142 143 147762 013737 007334 144 147770 004767 163432 I4S 147774 000462 146 147 148 147776 00,237 007756 149 150002 042737 000001 150 1,0010 0004,4 1,1 152 1,3 1,0012 00,203 1,4 150014 004767 174502 1,5 150020 106437 007326 156 1,0024 001056 157 1,0026 005705 158 150030 001450 159 150032 120027 0000,4 160 150036 001043 161 1,0040 000167 176232 162 163 164 165 150044 005203 166 1,0046 004767 000006 167 1,0052 005303 168 1,00,4 000167 176304 169 170 1,0060 004767 174436 171 1,0064 120027 000137 ms SHE NOV ASl ADD DR 007334 t.ASCI::HOVB ItO'I 1$: JSR CHPB BEO HOVB DIS HOV JSR HOVe 007330 ~OVB INC BR 007756 2$: ~IIV JSR BR 007756 \.EVEN: lINC BIC DR IRPEAT: : I NC JSR ~TPS BHE TST BEQ CHPB BHE JHP VERRI R5,R4 R4 R4,HfADDR VCOll RO,UDELIM ;save deliaitet @ttADDRr9.ADVADR;~et a scratch cOP~ of current address iset ne~t character, don't fold to uPper case PC,6ETCHC ;have we reached deliliter yet? RO,@'DELlH iyes, done 21 @tTHPHOD,-(SPI ifool ADRCHK into thinking we are in byte lode tF.BYTH,@'THPHOD @IADVADR,R4 iget runniM COPY of current address ichedk that it's not in protected RAK PC,ADRCH2 (SPltr@tTHPHOD irestore proper lode bits ;deposit a b!:lte RO,'R4 @lAIIVADR ;advance running address 11 @tADVADR,@'IADDR;uPdat. current address ;set character after deli.iter PC,GElHXT VCON @tlADOR tI,@tlADDR VCON R3 PC,GETEXP mURCOH VEftRI R5 RERR RO,t054 VERR EREP ;counteract earlier DEC R3 in this case iget repeat count ;check if it contained undefined ssabols lit did, refuse REPEAT cOI.and isee if a repeat of zero was given ; refuse zero ;cher~ that a COila follows ;no COila. error, .i55in~ paraleter ;so to repeat cO.land line routine .EHABl 1tO'IE" " INC JSR DEC JHP LSD E~OV ;counteract earlier DEC R3 in this case address pair ;prepare to use <ESC) seouence rountine j~o to routine to lOve it IflOry block u: PC,GETEXP RO,t137 ;get first address Hs it followed ~ an underline? JSR CHPB R3 PC,II j~et R3 A-72 1-11 Evaluation "odule Konitor MCRO V05. 00 Sunday 13-"ar-B3 04:10 Po;e 44-3 Directive and Verb Handlins Routines In 150070 001026 173 150072 174 150076 175 150104 176 150110 010537 152737 004767 000167 iNE ~OV 007336 000010 007324 163316 17H06 SISB JSR JIIf' ;no, lissins: paraletef ;save the first address tF.SAVX,@tLINFLG;show we have saved sOlethin5 in SAVEXP ;.!Jet character a1tH underline PC.GHNXT ;Set second address GHEIP VERR R5.rtSAVEXP 177 17B 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 150172 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 21B 150274 219 150302 220 221 222 150306 223 150312 224 150314 225 150320 226 150326 227 150334 22B 150342 005203 004767 177736 120027 000054 001007 000lb) 176424 FIND: : INC JSR CN'S SNE JHf' •DSABl 052737 040000 007706 HOPROT::BIS R3 peru, RO.t054 VERR EFHr. ;cOIJnteract earlier DEC R3 irl this case ;get address pair lis it followed b~ a cOlaa! ;no, lissin~ paralter ;90 to routine to find a value (search .e.or~) LSD IF, PROT ,@tFLAG511turn off loni tor scratch f'rotectiorl ;r all ,,,t. VCON 000167 173450 VCON: JHP CHON6 ;cOl',tinue parsing 000167 173012 VERR: J"r CIION2 ;general error 012701 151412 000167 173030 RERR: NOV tREPOfO.R2 ERROR ;reppat of zero error JIIf' 012701 151372 000167 173020 VERRIl HOV JIll' tIJlfDEFX.R2 ERROR ;undefined expression error 042737 040000 007706 PR01EC: : BIC DR 000760 tF.PROT,@tFlAGSHturn on .anitor scratch protection 052737 100000 007706 PASSl:: BIS 000754 DR tF.PASl.@tFlAGSl;sh.w w. are in PASSI ••d. VCON 042737 100000 007706 PASS2:: Ble 000750 DR tF .PASJ,UFlA6SHshow w. are i" PASS2 •• d. VCOH 032737 001346 105037 105037 004767 052737 105737 012737 112737 112737 000167 004000 00770. HOST:: BIT BNE 007672 cm 007673 ClRB 164656 JSR 004000 007706 SIS lST8 177550 134540 000120 HOV 00004. 007711 "ova HOVa 000046 177452 173304 JNP 105737 lOOm 105037 112737 112737 042737 000677 NOtIOST: :1518 BHI CLRB 007673 000042 007711 /IOVB 000042 177452 HOVB BIC 004000 007706 DR 007673 VCON tF.HOST,@tFlAGS1iare we already in host .ode? hes, error VERR @tHFP ;initialize host input buffer ,aM host rIMS @tHSTFLG i.atch oux port baud rate to console ~Drt PC.SHAI2 tF.HOST.!tFlAGSl;set host ••d. idiscard an~ jarbase in the port @tAfRBUF tHOSTIN,@tAUXIn ;hook UP host input service routine iS8ve a neW" copy of At-CREG vallJe ;enable aux port receiYer interrlJPt irecover character in RO t046.!tAUXFLG t046.@tAfCREG CONTIN ;are we in host load lode~ ;~S, refuse NOHOST coatand ;clear host flags ;s8ve a COP~ of new At-CREG yalue ;disable aux port receiYE!r interrtJ~t tF,HOST,@tFLAGSlishow we are flat in host .. ode @tHS1FlG UERR @tHS1FLG t042.@tAUXFlG t042.@tAfCREG VCON A-73 T-11 Evaluation Module "">fIi tor "ACRO V05.00 Sunda. 13-"a,-83 04:10 Pose 44-4 Directive and Verb Handling Routines 229 230 231 150344 150347 232 150352 233 150354 150357 150362 150365 1503)0 150m 1503)6 150401 150404 15040) 150m 150m 150420 150423 150m 15~31 150434 150m 234 150441 235 236 23) 150442 238 150442 239 150450 240 150452 241 150456 242 150460 243 150466 244 150470 245 246 150472 247 150500 248 150502 249 250 1505~ 251 150512 252 150514 253 150520 251 150522 255 256 150530 25) 150534 258 150510 259 150544 260 150550 261 262 150556 263 150562 264 150566 265 1505)0 266 1505)4 26) 150576 056 101 015 105 105 124 040 050 123 105 040 050 116 102 101 054 101 123 104 101 077 000 123 122 012 040 130 051 122 122 125 051 102 123 104 122 113 040 040 105 040 051 000 124 124 050 III 054 040 105 liS 054 040 lOS 040 •. snn: .ASCII I.STARTI ;string to latch for enablins at load lOde ;<CR). <LF) OPTION: .BYTE 015.012 .ASCll IE (EXITI. R lRESlR1El. B (SEHD BREAK), -A (SEHD -Al 'I 105 OSI 136 050 116 136 040 •BYTE ;because the linker won't zero till 0 .ENABL L5B BlOAD: : 032)3) 004000 00))06 LOAD:: BIT BEG 001410 105)3) 00)673 100405 152737 000100 00)673 005002 000417 032737 020000 00))06 LERR: 001622 12$: 00020) ISIB 8ft! 8158 CLR 8R TALK I BIT tf.T8AS,@tFLAGSliare we runoin~ Tin~ Basic? RTS VERR PC BED 03273) 004000 007706 TALK:: BIT BED 001615 TST8 105)3) 007673 8ft! 100612 BICB 112737 000100 00)673 106427 005737 105737 004)67 112737 TAm: ms 000300 TST 177562 TST8 177550 JSR 162)54 KOVB 000011 177444 00476) 000364 105737 1))560 100017 113)01 177552 000240 006201 bf: u: tF.HOST,@tFlAGS1,is host lode enabled? ;no, refuse LOAD cOI.and LERR ;are we in host load lode? PtHS1FLG ;~es, refuse LOAD cOIAland LEIlR tF.LDST,@tHSTFl6;show we want to start loadins upon .START ;initialize index to latch .START strins R2 JSR TSTB BPL MOVB HOP ASR ;no ;~es, return to BASIC tF.HOST.~tFlAG51;is ho.t lode ,nabl.o? ;no, refuse LOAD COIaand VEfiR ;are we in host load lOde? PtHSTFlG j~es, refuse TAlK COlland \I£l!R tf.LDS1.PIHSTfLG;sho. w•• ant to isno,' .START t300 mtRBUF ftAlRBUf PC,CRlF 1011, UP$PORC ;disable interrupts except console brea~ ;clear an~ ~arbaSe in the ports PC.CLRAPE PtClRCSR 2' UAfSREG.RI ;clear aux port error iuser type a character? Rl A-74 ;slart a new line aurn on lEII durin! vi rtua! terlina! operation i"" ;chec~ host port status ;na place holder for the abov~ line t .. T-ll Evaluation ~odule Konitor MACRO VOS.OO SUfld.. 13-M,,-83 04:10 r ... 44-5 Dirlctivl and Vero Hif'ldhn~ Routines 2.8 150.00 269 150602 270 1506% 271 150610 272 150614 273 150.20 m 150m 275 27. 150626 277 150.32 278 150616 279 150640 280 150644 281 150650 282 150654 283 150656 284 150664 285 150666 286 150670 287 150672 288 150674 289 150700 290 150704 291 150706 292 150710 293 150714 294 150m 295 150722 296 297 150724 103012 013700 100407 042700 120027 001450 110037 113701 ll2701 001751 1Il7oo 042700 ll2701 oo1l40 132737 001420 010001 005702 001402 042701 120162 001007 005202 020227 103404 110037 000470 177562 171600 000001 117450 9S: 177552 000002 2S: 117550 177400 000170 000100 007673 000040 150344 14$: 000006 177566 ~t: 005002 5t: 100313 110037 177566 000710 012701 004167 105737 100375 013700 2$ etCIRBUF,RO 2$ t177.0Q,RO RO,tl 3$ RO,@tA$XBUF HOVB BITB BEQ HOVS SIC SlTB SHE BITS @tAlSR[U,Rl t002,RI BEQ 298 150726 105737 177564 299 150732 300 150734 301 150740 302 303 150742 304 15074. 305 150752 306 150756 307 150760 lOB 150764 309 150766 BCC IIOV FHI BIC CIIPB BEQ HOVB 150352 163002 177560 3$! B.: 177562 lOOm 042700 177600 310 150m 110037 177566 311 150776 120027 000001 312 151002 001707 313 151004 042700 000040 314 151010 120027 000102 315 151014 001012 316 151016 012701 100000 317 151022 112737 000057 177452 11$: 318 151030 077101 319 151032 '112737 000047 177452 320 151040 000650 321 lOt: 322 151042 120027 000105 323 151046 001245 324 151050 112737 000010 177444 HOV TST BEO BIC CHPB SNE INC CHP BLO HOVS DR ;CTS not asserted or trans.itter not e&pt~ iSet character fro. console ,ignore error characters i.ake SfJre no parity bit set ;isit~A'? i~es, exit talk lOde ;na, output character to host ~check host port status ido we have a character? 1$ ino l't.\$RSUF ,RO ;get character frol host t1774oo,RQ ;prevent sign extend pis it break or an error? U70,Rl 6$ ;~es, ignore character .f.LOST,~tHSTFLG; ... NO lookiM for .START? 5$ ;no ;Iake iI scratch copy of charadeI' RO,Rl ,don't fold the period R2 IU 4$ ifold lower case to upper case idoes character latch? ;00, go back to the '.' in .START and tr~ again R2 R2.t6 5. RO,l'tCIXBUF 7$ ;have we aatched entire ;trinS? ino, continue with next character ;send the character without dela~! ;a latch, start loading CLR TSTS SPL HOVD SR R2 PlCIXCSR II ROtPICIXBUF ;i; console port read~ for a character ;no, drop character ;yes, echo character to console HOV JSR TSTB BPl HOV 8HI DIC HOVa tOPIIDH,RI pt,PRINTA PiC$RCSR 81 @tC$RBUf.RO 8$ U77600,RO RQ,@tClXBUF RO.tt 9$ t040,RO Ro.tl02 iset charadeI' frol corlsol~ ;cnaracter caused an error, tr~ asain ilake sure no parity bit set ;echo character ta console ;15 it ~A'? ;~es, send it to host ifold lower case to upper iis it B? 10. ina tl000oo,RI t057,@tAlCREG Rl, . 1047,ltA$CREu isend break iwait a while a ; resule t"o-wa~ cOlllmication RO,tlO5 iis it E7 ;00, resu.e cOl.unication ;turn off LED indicator cm BEQ FIC ClfB BNE ItO'I HOVS SOB HOVB SR CHPS 8NE HOVa t040,Rl Rl,$.STRHR21 a a tOlo.rmPllRt A-75 ;point to lessase ;priot ASCII string 00 console ;wait for a character T-11 Evaluation "odule Monitor HACRO vas.OO Sunda. 13-Ha.-83 04:10 Pa,. 44-6 and V!rb Handling Routines ~irective 325 151056 112737 326 151064 106427 327 151070 032737 328 151076 001201 329 151100 000167 330 331 151104 152737 332 151112 112737 333 151120 112737 334 151126 106427 335 151132 032737 336 151140 001356 337 151142 000167 338 331 151146 112737 340 151154 112737 341 151162 000207 342 000046 177452 000000 020000 007706 13.: 172112 000200 000010 000046 000000 020000 172056 007673 177444 177452 007706 7.: HIl'III HTPS BIT DHE JHP ,disable aUK port trans.itter interrupt ireenable interrupts tF.TBAS,@tFLAGSl;are we running Tin~ Basic? ;':Ies, return to BASIC 121 ;return to console lonitor CHOH3 DISD HOVB HOVB HTPS BIT BHE .lItP tF.lOAD,ftHSTFlG;set host load oode IOl0,ftPIPORC ;turn off LfD indicator t046,ptAICREG ;disable aUK port translitter interrupt ;reenable interruF'ts A.S.A.P. 1000 000067 177452 CLRAPE: ItOve 000047 177452 HOVe RTS •DSABL t046,ftAICREG tooo tF.TBAS"tFlAGSl;are we running Tin~ Basic? ;~s, return to BASIC 131 (HOH31 ;return to console lonitor t06MtAICREG t047,@tAICREG PC LSB A-76 ;clear aUK F'ort error flags iasser DTR. RTS, enable aux port xlit and recv T-ll Evaluation "odule Konitor HACRO ~5.00 Sunda. 13-Har-83 04:10 Directive and Verb Handling Routin@s 1 2 .SBTTL 3 .ENAiL 4 5 151164 132737 000002 007327 DOS'OO:: :OITB BEQ 6 1511n 001423 7 151174 010237 007334 HOV JSR a 151200 004767 162222 HTPS 9 151204 106437 007332 8MI 10 151210 100434 BCS 11 151212 103m 12 1512H 004767 17JJ02 JSR 13 151220 106437 007326 HTPS 14 151224 001010 SHE 15 151226 013702 007334 HOV 16 151232 020227 000054 ClIP 17 151236 103407 BlO 18 151240 101012 BHI 19 151242 000167 171716 l.: JIIP 20 13.: HOV 21 151246 012702 151372 JHP 22 151252 000167 171734 23 24 25 151256 006202 41: AS!! 26 151260 010562 007732 HOV 27 151264 000404 BR 28 29 30 151266 042705 000001 5.: BIC 31 151m 010562 007700 HOV 32 151276 000167 172314 6.: JHP 33 34 151302 102021 a: BVC HOV 35 151304 013746 007320 HOV 36 151310 013746 007322 37 151J14 004767 173202 JSR HTPS 38 151320 106437 007326 SHE 39 151324 001006 40 151326 010504 Hoo 41 15!3J0 012637 007322 tIOV 42 15!3J4 012637 007320 HOV 43 151340 000446 BR 44 CHP 45 1513~2 022626 12t: 46 151J44 000754 BR 47 48 151346 010446 2.: HOV JSR 49 151350 004767 173146 HTPS 50 151354 106437 007326 BNE 51 151360 001332 MOV 52 151362 010504 lOt: CHP 53 151J64 022604 SHE 54 151J66 001J2S BR 55 151370 000742 56 57 151372 102564 020071 054114 UNDErx: .RADSO Pa~e 45 Soobol and Label Handli~ Routines LSD tF.VALU,~tLASCO"icheck that list 'colland' was not valu@d iWiS evaluated, error istore index here iiet next leanin~tul character after = iSI@ what ~ind of s~.bol we are definins ~I£XPFLG ;user defined nale 11 iwas a lONonic, directive, or vero--error 31 pe,6ETEXP iset value to be eauated icheck if it contained undefined s~lbols @lCURCOH iit did, refuse s~lbol definition m ~IAD<MDR,R2 i!let back index R2,IDSYHUR-DSYHSlwhat is na.e? IRO thrO\Bh • 41 51 IB1 thr.~h B4 ;else show err·or CH0N2 31 R2,@lAD<MDR PC,GETNXT tUHDErX,R2 ERROR iundefined expression error R2 RS,IROIR2) 61 ;aake a word index i5et appr~riate re~i5ter, watch~oint, or ',' ibreakpoints have even addresses tloR5 R5,BRKFIL-<DSYHURt4-DSYHS)IR2) ;5et approprite Dreakpoint CHOH6 21 isYlbol alreadY defined mBlTOP,-ISP) ;savt naae of s~abol we are defining ~tTSLTOPt2,-ISP) PC,6[TEXP ;~et value to be set @lCURCOH icheck if it contained undefined 5~lbo15 iit did, iSnore s~lbol definition 121 R5,R4 ;~et value to be set ISP)t,@tTBLTOPt21,.cover n..e ISP)t.~ITSLTOP 91 (SP)t.ISPlt 61 iF-OJ> saved nale R4,-ISP) pe,GETEXP @lCURCOH ;SiYl present value of s~.ool \JI R5,R4 ISP)t.R4 31 61 ;auiet1!J il1nore s~abol definition ;~et value to be set ;check if it contained undefined 5~lbo15 iit did, refuse 5~lIbol definition jput value in R4 ;see if s~.bol or label is beins chan~ed ;it is, which is not perlitted ;no chanse, 50 auietly ignore co.~and /UNDEFINED EXPRESSION/ A-77 I-II [valuation Hodule HDnitor HACRO VOS.OO Sunda. 13-Har-83 04:10 PM. 45-1 and label Handlin~ Routines S~.bol 151400 000340 0633;",; 074701 151406 057760 58 151410 000000 59 151412 070530 017574 001136 151m 0020;",; 071330 60 151424 000000 61 62 151426 132737 000002 007327 63 151m 001702 64 151436 004767 161764 65 151m 106437 007332 66 151446 100275 67 151450 102037 68 15H52 013704 001756 69 70 15HS6 013702 007462 71 151462 162702 000006 72 15H66 020227 006500 73 151472 101011 74 151474 012702 151504 75 151500 000167 171506 76 151504 076452 D4571 0 024324 151512 045400 77 151514 000000 78 79 151516 106427 0003\0 80 151522 010237 007462 BI 151526 013722 007320 82 151532 013722 007322 B3 151536 010422 84 151540 IOW7 000000 as 151544 000167 172042 86 87 151500 010446 88 151552 013704 007756 89 151556 000702 90 •WORD 0 REPOFO: .RADSQ fREPEAI or ZEROf .WORD 0 DOLABL::mB BEO JSR HTPS BPL BVC HOV IF.VALU,PILASCOH 31 PC,GETNXT ;see what kirld of label we afe defifllos mXPFLG ;r-redeflm!d s':IIIbols Limit be labels 31 ;user nale all"ead'J deflflel~ 81 ;iet value to be set PISADDR,R4 MOV SUB CMr 8HI MOV JMP TBLFUL: .RAD50 UTBlBOT ,R2 ;set bot tot of s~.bol table ;~o down one entr~ IIuR2 R2,.tUR ;is there sPace for new entr~? ;~S 11$ IlBlFUL,R2 ;point to lE'ssaSe ;prinl error ,essaSe ERROR flABlE FULl! 91: 11$: •WORD 0 MTPS MOV MOV '.ake s~lbol table alterations atolic 1340 jb~ blockin~ console break, etc, R2,PITBLBOT PIlBLTOP.!R2lt ;slore first word of nale @ITBLTOPI2,IR211;and s.cond word ;store SYlbol's value R4dR2lt ;restore interrupt service tooO ; recover character in 1<:0, get nl?i:t cOlillarld CONlIN ItOV NOV MTPS JliP BS: R4'-(SP) @IIADlIlhR4 101 BR .DSABl LSB II1JV MOV A-78 ;save PT!Sent value of label jget cijrrent address! wnich is value to be set T-ll Evaluation Module Monitor ItACRO 1'05. 00 Sunda. 13-Mar-83 04:10 Pa.. 46 S!llbol and label Handlin!! Routines iff 2 3 4 5 151560 6 151564 7 151570 8 151572 9 151574 10 151576 11 12 151600 13 151604 14 151606 15 151612 16 151614 17 151616 18 151620 19 151622 20 21 151624 22 151626 23 151630 24 25 26 27 28 29 30 31 151632 32 151640 33 151642 34 151646 35 151652 36 151654 37 151660 38 151662 39 151666 40 41 151670 42 151672 43 GETSYH .atche~ a new nile to the SYlbol table. j-- 013702 007462 020227 007320 103403 005004 000277 000207 GETSYM!!MOV 2$: CMP BlO 022237 007320 001007 022237 007322 00100S 012204 000270 000242 000207 u: 005722 005722 000755 3$: ;start searchin~ at bolta. of table 11 ;yes CLR R4 RTS PC sec ·n: @ITBlBOT ,R2 R2,ITBLTOP ClIP BHE CMP BNE l10V SEN CLV RTS TST TST BR iany lore entries! ;(la9 nale not found (R2)h@ITBlTOP ;does fi rst word of nale latch? ioo (R2)t"tTBlTOPt2isecond word latch? 3~ U ;00 (R2)hR4 iset value ishow this is a user defined s':Ilbol iand that is has a value PC (R2H (R2lt ;advance to next entry 2~ i+l KATSYK lalches the nUiber in Rl to SYlboI valurs, starting with the lOst recently defined. Returns a pointer in R2 if latched. Returns Nset if no latch. i-- 132737 001013 013702 020227 103006 026201 001404 062702 000767 000270 000207 tr.ABS,@tTMPMOD iabsolute 1Od.? 000002 007330 ItATSYM: :SITB SHE MOO 007462 2$: CMP 007320 BH1S CHP 000004 BEQ 4S! ADD 000006 SR 2~ SEN RTS PC 1$: 3$: 11 !ITBlSOT,R2 R2,tTBLTOP 11 4(R2) ,Rl 3$ t6,R2 A-79 h,es, indicate no latch is.t botto. of table ;anY IOf!! entries? ioo ida we have a latch1 ;!:Ie5 jgO to next nale T-11 Ev.lu.tion Kodule """,to, MCRO 1105, 00 SundaY 13-H.,-83 04:10 P,ge 47 S~ol and Label Handlin!! Routines I 2 3 4 5 151674 6 151702 7 151706 8 151710 Ht DELSYK deletes the s~lbol table enlt~ just below R2. ;-- 062737 000006 007462 DELSYH::ADD 2tt CHP 020237 007462 101001 BHI RTS 000207 9 10 151712 11 151716 12 mm 13 151726 016242 177770 016242 177770 016242 177770 al ~OV MV HOV DR 000765 t6,@tTBL~OT R2,HT8LBOT 1. PC idone ~et? ;hO, love UP all lower entries -10IR2h-IR2) -10IR2),-IR2) -10IR2) ,-IR2) 2. ;IOVf three words for eac~ entrY 14 15 16 itt TYPREG hpes the contents of re~isters RO throo!:lh PS and the ~at('hpoint address and contents it the address is not zero. 17 18 19 20 151730 21 151736 22 151m 23 151750 24 151754 25 151760 26 151764 27 151770 ;-112737 000011 007340 TYPREG: :NOVB IIO\i 012737 156112 007334 004767 161554 013702 007334 004767 162014 010237 007334 162702 156146 004767 173674 012700 020075 004767 161524 010401 004767 003064 105337 007340 001352 013704 007754 001404 004767 003216 000167 003056 000207 28 151774 29 152000 30 152004 31 152006 32 152012 33 152016 34 152020 3S 152024 36 152026 37 152032 38 152036 39 40 41 42 43 44 152040 016746 45 152044 042767 46 152052 013702 47 152056 020227 48 152002 103003 49 152064 004767 50 152070 000772 51 152072 012667 52 152076 000167 53 54 152102 004767 55 152106 004767 56 152112 012700 57 152116 004767 a; JSR MV JSR MV SUB JSR NOV JSR NOV JSR DECB BNE HOV iborrow ADVADR as a poinler pe,CRLF j start a new line HADVADR,R2 PC,PRINT2 ;t~P€ nile ot resister R2"tADVADR IDSYNSt4,R2 ;gO bac~ to resister nate ;~t contents of resister PC,PIlSVAL 1400l040t075,RO ;t.pe • <,p,ce> PG,CHRDUT R4,R1 ,get rE'9isU?r contents itYfe nu.ericall~ PC,TYPN"1 mOUNT! U @"WATClhR4 2. JSR PC, TYPADR TYPLOI PC RTS icount 9 registers tDSY~,@tADVAOR lEa JIW 2.: t9 .. nCOOIHI ;g"t watct\f.oint address ;watchpoint not set ;ty~e Natch~oint address ;t~pe in current ~ode iff ; TYPUtL type-!. thl' erltire user ssabol table. j-- 035264 TYPTBL: :MOV 000200 035256 BIC 007462 "OV 7$: GNP 007320 BHIS 000012 JSR DR 035232 1$: MOV 171502 JNP TNPNOD,-(SP) ilake ss'bols show UP in word .ode tF.DYTM,TNPNOD @lT8LBOT,R2 ;start at the bot tOt of the table R2,ITBLTOP idooe ':let? 161416 161662 020075 161406 PC,CRLF islart a new line ; t':lP(I s'Aho 1 nale PC,PRINT2 1400l040t075,RO a.,. • <"ace> PC,CNROUT TYPSYN: : JSR JSR MOV JSR U ;':Ies PC,TYPSYH 71 ISP)hTIIPNOD CMNS it':lfe the nale and value of one 5Ylbol A-80 ;put back to watever lode it was in ;~et next eoa-and T-II Ev.lu.tion Kodule "ani tar "AeRO V05.00 Sund•• 13-".r-83 04:10 P.se 47-1 S~lbol and label Handlin~ Routines 58 152122 012201 59 152124 000167 002746 "OV JKP (R2)hRl i!l'et value TlPNltI jhp!! it nuaericall~ T-l1 Evaluation Module Monitor KACRO V05.00 Sund •• 13-"or-83 04:10 PaSe 4S S!:Ilboi and LiWel Handlin!! Routines 2 3 4 152130 050405 5 152132 000207 6 7 152134 005104 8 152136 040405 9 152140 000207 10 11 152142 011lS00 12 152144 005005 13 152146 060005 14 152150 077402 15 152152 000207 16 17 152154 060405 IS 152156 000207 19 20 152160 160405 21 152162 000107 22 23 152164 005000 24 152166 005704 25 152170 001403 26 152172 005200 27 152174 160405 28 152176 103175 29 152200 010005 30 152202 00510S 31 152204 000207 .S~TTL Arithletic Routines LOGOR:: BIS RTS R4.R5 PC lOGAND: :CO" BIC RTS R4 "ULTlP::"OV CLR 1$: ADD SOB RTS R5,RO RO.RS R4.11 PC ADm:: ADD RTS R4.RS PC SUBTR:: SUB RTS R4.RS PC DIVID:: CLR TST RO R4 2\ RO R4.R5 BEG 1$: 2$: INC SUB BeC HOV MC RTS R4.R5 PC ;Iake a tDf'~ of first factor ;clear accululator R:i ;aultipl~ b~ successive addition ;count down secood factor iinitialize Quotient ;are we dividing b~ zero? ;yeSt return 177777 Hncre~nt Quotient ;tr!:! subtractin~ divisor froD dividend tsuccessful, nC) underflow ;rep!ace accuaulator with Quotient 1$ RO.RS R5 PC ;adjust for excessive increaent of RO A-8! 1-11 Evaluation ttodule JIIonitor MCRO V05.00 Sund •• 13-H.r-83 0~:10 Pate ~9 Arithl@tic Routines 1 2 3 ~ .SBTTL Instruction Encode/Decode Routines HI GETlNS takes an index to a aneaonic in R2t and the .m~.onic' 5 base value in R~. It parses an~ needed operands and stores the resultins code ~t the 5 current address. 6 ;-7 B R4,-(SP) ;save the base OPcode value 9 152206 010446 GETlNS: :ttev ;chec~ that it's even and in user RA~ 10 152210 004767 002310 PC,ADRt:Hl JSR i,ake a b~te index 11 152214 006202 ASR R2 ;for the PAR~S table 12 152216 006202 ASR R2 ;save OPcode address here 13 152220 010437 007336 RMISAVEXP ItOIJ tF.SAUK,@tLINfLGtPrevenl interference with norlal use of SAVEXP 14 152224 142737 000010 007324 BICB (SPlt'(R4l1 ;store base opcode value 15 152232 012624 HOV R4,fIADVADR ifirst operand address 16 152234 010431 007334 IIOV iinitialize add~5Sing lode scratch 17 152240 105037 007342 ClRB PIHODE PARAHS(R2) ,Rl ;~et fortat code IIOVB 18 1522~4 116201 156034 iaale a word index 19 152250 006201 ASR RI ASR 20 152252 006201 Rl ;Iask out the garbage 1177741,RI 21 152254 042701 177741 BIC PC,fINSDSP(RI) ;!et appropriate operand seauence 22 152260 004771 152276 JSR @tADVADR,@tSADDRiupdate current address 23 152264 013737 007334 007756 ItIIV ;recover next characLer, parse next cOI.and OlHTIH 24 152272 000167 17131~ JHP 25 ,00 leans decode condition codes 26 152276 153172 INSDSP: .IIORD COHCOO 27 152300 14316~ ;01 leans not an instruction .IIORD CItIJI2 ;02 leans nO ~araleters 2B 152302 152770 .IIORD INSDON ;03 •••n, HNN for EH! and TRAP 29 152304 153152 .WORD ElITRAP ;04 leans 8 bit branch displacelent 30 152306 153024 .WORD BRDISP ;05 ..an, RIDD tor JSR and XOR .WORD REGOST 31 152310 152724 ;06 leanS SS or DD .WORD OPRAND 32 152312 153016 ;07 leans SS,DD .IIORD SRCOST 33 152314 153006 ;10 leans R for RTS .WCJlD RTSR£G 34 152316 152714 ;11 leans R,HH 10' S08 35 152320 153102 .IIORD S08DSP 36 .EHABl lSB 37 jparse a SYlbohc nHe PC,GErNAH J8 152322 004767 17J122 G£1REG: :JSR ;user defintd nilef error 39 152326 100414 BKI 3. iinstruction Inelonicf error 40 152330 103413 BCS 3. PCIGETlCH j~et next character in RO 41 152332 004767 161050 JSR R2,IDSYKPS-DSYHS;is it RO through PC? CHP 42 152336 020227 000040 ina, error J$ 43 152342 103006 BHIS jget re~ister nUlber 44 152344 006202 ASR R2 45 152346 006202 ASR R2 ;put it in bottoa 3 bits of addressing lOde R2,PIHODE ADD 46 152350 060237 007342 ClN 47 152354 000250 RTS PC ~8 152356 000207 49 SEN SO 152360 000270 3.: RTS 51 152362 000207 PC 52 53 RO,IIOO iis first character @~ FlIlOPR::CHPB 54 152364 120027 000100 ;,., BHE 55 152370 001005 5. j~es, deterred lode IIO,UIIODE ADD 56 152372 062737 000010 0073~2 PC,GETNXT ;set character after • JSR 57 152400 004767 161022 w A-82 T-11 Eyaluation Modul@ Monitor ItACRO V05.00 Sood,. 13-H.r-83 0~:10 InstNJctioo Encode/Decode Routines 58 152~0~ 59 152~10 60152411 7$: CMF RIS (SPI!,ISP)! PC idiscard sayed character allo rurmins pointer ; return .ode 0 or 1 lOS: ADD TST ADO JSR JSR BHI CHPB SHE JSR CliPS BNE ADD JSR RTS t30,~I"ODE itor -I, add 40 total to addres;ins ~ode ;discird saved roonins pointer ifor (, add 10 to addre~sinS lode ;get character atter ( ;should be a register naat? ;not a register naie, error ishould be followed b~ ) ina, error jget character after ) 177700 100044 012603 012600 120027 000050 6.: 0103~6 00~767 75 152~62 76 152~66 77 152472 78152474 79 152500 80 152506 81 152512 82 152514 83 152520 84 152524 85 152532 86 87 15253~ as 152536 89 90 1525~0 91 IS2S~6 92 152550 93 152556 94 152562 95 152566 it be a resister nale? ;no, definitel~ not a re~ister ;save charader ;save runnios pointer iand tr\l to set a resister f.aae isYccesstul, .ode 0 or t ;restore runnins pointer irestore character in RO iis it (1 illes, .ode 1, 2, or J ;is next character -1 ;no ~finitel!l not autodecre.enL ;saye runnins pointer ;set character after iis it <? ,YeS, lade 4 or 5 ;restore runnins pointer ;restore - in RO ;lS it 11 ;!les, do illediate and absolute ;~et an inde~ or relative address ;indexed addressins .ode ;is it an index? 1';1eS i~t next operand address ilake this operand a PC relative address iilPlicit PC reference 0100~6 62 152m 63 152m 64 15242~ 65 152426 66 152430 67 15243~ 68 152~36 69 152H2 70 152~~4 71 152446 n 152452 7J 152456 7~ 152~60 PC,RADCH 61 RO'-(SP) R3,-(SP) PC,GETREG 71 ISP)t,R3 (SP)t,RO RO,t050 41 RO,tOS'5 91 R3,-ISP) PC,GETNXT RO,tOSO 101 ISP)t,R3 t055,RO RO,t043 111 pe,GETARG 16o.PIHODf RO,1050 121 UADVADR,R4 !tADVADR,-(W 107, ~t"OD!: PC '5$: 100~07 61 152m 001~45 120027 000055 001011 010346 00~767 160754 120027 000050 00H30 012603 012700 000055 120027 000043 91: 001~54 00~767 000142 062737 000060 007342 120027 000050 001421 01370~ 00733~ 163744 007334 062737 000007 007342 000207 022626 000207 062737 000030 005726 062737 000010 004767 160m 00~767 0073~2 0073~2 4$: 12$: 17753~ 100501 96 152570 120027 000051 97 15257~ 98 152576 99 152602 100 152606 101 152610 102 152616 103 152622 001076 001767 120027 001005 062737 004767 000207 160624 000053 000010 007342 160604 as: (SPit tl0,~IHODE PC,GETNXT PC,GETREG 21 RO,t051 21 PC,GETNXT RO,1053 81 110,@IHODE PC,GETNXT PC 10~ 00~767 160570 107 152636 000167 000000 108 109 152642 00~767 171654 110 1526~6 013704 007334 III 152652 004767 001652 112 152656 010514 113 152660 062737 000002 11~ 152666 000207 00733~ ;.i~ht iis it +'! ;00, done iaode 2 or 3 ;set character after + , ADD JSR JHP 127,@IHOIIE PC,GETNXT GETARG Hllediale, absolute afe lodes 2 arid 3 with PC ;Set character after t ;slore il.ediate data or absolute address GETAR.:: JSR HOV JSR Hoo ADD RTS pe,GETEXP @IADVADR,R4 PC,AflRCH2 R5,(!R4 IMIADVADR PC ;51et an ar!lulent in R5 ;!let address of operand ;che~ that we ife still in user RAM ;store arSIJllent at operand addre;:.s ;increaent address lOS 152624 062737 000027 007342 11S: 106 152632 ~9-1 JSIl 'HI HOV HOV JSR SPL HOV HOV CHI'B BEQ CMPS SNE HOV JSIl ClIPS BEQ HOV HOV CIIPB SED JSIl ADD CIIPB BEQ HOV SUB ADD RTS 001672 00~767 p,,. A-83 1-11 Evaluation Kodul@ Honitor ItIICRD V05, 00 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 128 152m 129 152730 130 152732 131 152736 132 152742 133 134 152744 135 152750 136 152752 137 152754 138 152756 139 140 152760 141 152764 142 143 152770 144 145 152772 146 147 152776 1018 153002 149 150 153006 151 153012 152 153016 153 153022 154 155 156 153024 157 153030 158 153034 159 153036 160 153042 161 153046 162 153050 163 153054 164 153056 165 153060 166 153064 167 153066 168 153070 169 153074 170 153100 120027 001036 004767 004767 105037 000207 000054 000042 160520 00m2 SU"~ 13-H.r-83 04:10 COHACH: CHPB BIlE JSR JSR cm RTS Pas. 49-2 RO,1054 21 PC.INSOOI PC,GETNXT @IHODE PC lis first operand followed b~ a cOI.a? ;nor ,rror istore first operand lode ;set character atter CO~.i PC.6£TREG 21 INSDN2 a re~i5ter nUlber ierror, not a reSister oallle ;add it to opcode PC.GETREG 21 PC.COHACH PC.ftl.OPR INSDN2 iset a re~ister nUlber ierror, not a re~ister nale ;chec~ for coua between operar.ds ;§et il full oPHand "HODE,Rl RI HI RI ;set addressing lode bits ;shilt it 6 bits to the l.ft j~et 004767 177402 100424 000416 RISREG: :JSR 004767 177372 100m 004767 177732 004767 17m2 000406 REGDST: : JSR 113701 007342 000301 006201 006201 000402 IHSDHt: HOVa SIIAB ASH ASR BR 113701 007342 060177 034346 IN5OO2: "OVa 1$: ADD ftllODE.Rl 000207 IIISDON: RTS PC 000167 170166 2.: .lIIP CHON2 012702 153266 000167 170204 20.: HOV JIIP tBRANCH.R2 ERROR ;POint to branch error lessase 004767 177352 004767 177652 004767 177342 000756 SReDST: : JSR JSR OF'RAHD: : JSR BR PC.FUlOPR PC.COIIACH PC.FUlOPR IIISIIH2 iSft first operand ;chec~ tor caa.~ between operands ;!i.t sPcol'ld operano ;store second operand tode 171472 007326 BRDISP: :JSR HTPS BED 007756 007334 14$: PC.GETEXP @lctJRCOH 141 mADDR.R5 @tAOVADR.R5 R5 1177600.RS 131 R5 1177600,R5 201 R5 t177400.RS RS.@SAVEXP PC ;!jet branch destination ;did eXf'ression corltain undefined s~lbol 51 ;1"10' no I'roblel h~es, lake instruction "BR " so no raMe error ;Iilke it relative ;Iake it a word offset ;does upper b~te latch bit 77 004767 106437 001402 013705 163705 006205 032705 001405 005105 032705 001344 005105 042705 060577 000207 BIll 8R 8"1 JSR JSR BR HOV 177600 SUB ASR BIT 8EQ 177600 177400 034236 13.: COlI BIT BHE C!lIt BIC ADD RTS 11 Rl.~AV1'XP 171 A-84 ;Set addressins lode bits ;add the. to optooe ;YfS ;no, branch l'anse error ilike it an g-bit nUlber ;add displacelent to op-code 1-11 Eyaluation ""dul. Monitor MACRO V05.00 Sunda. 13-Mar-B3 04:10 PaS. 49-3 Instruction Encode/Decode Routines ;get reSist!r SOBDSP: :JSR PC,SEIREG 172 153102 004767 177214 ;errof. not a register naAf 8MI 2t 173 153106 100731 ;Check for COila between operands PC,COHACH 174 153110 004767 177SS4 JSR PC,GEIEXP JSR 175 153114 004767 171402 idid expression contain Uf"Idefirled sSlbols? mURCOn 176 153120 106437 007326 MIPS inc, no ?roblel BEG Zit 177 153124 001402 ;~es, lake instruction 'BR , I 50 no rang~ error PUADDR,R5 nov 178 153126 013705 007756 ;.ake it relative UADVADR,R5 179 153132 163705 007334 21$: SU8 R5 IBO 153136 006205 ASR ;SOB instrue:tion uses ne9atl?d displaceaer,t R5 181 153140 005405 NEG i6-bit disF-laceler.t tl77700,R5 182 153HZ 032705 177700 BIT ; rar,!fe or direction error 20. BNE 183 153146 001313 184 153150 000747 BR m 185 ;!let trap nuaber PC,BETEXP EnlRAP:: JSR 186 153152 004767 171344 h;holJld be <256. tl77400,R5 187 15315. 032705 177400 BIT ;)255. t errorBNE 2t 188 153162 001303 189 153164 000741 SR m 190 ;set character after COI.a PC,BEINXT 19.: JSR 191 153166 004767 160234 jRl lust be 0 when enteriM -- is it c? COHCOD::CHPB RO,tl03 192 153172 120027 000103 193 153176 001003 BH£ 16t t1,RI iset C bit 194 153200 052701 000001 BIS 195 153204 000421 BR 1St cnps jis it V? 161: RO,t126 196 153206 120027 000126 197 153212 001003 SNE 17' t2,Rl ; .. t Vbit 198 153214 052701 000002 BIS DR 199 153220 000413 151 ;is it Z? 17$: RO,t132 CHI'S 200 153222 120027 000132 SNE 181 201 153226 001003 U,R! ;set Z bit 202 153230 052701 OOOOO! BIS 15\ DR 203 153234 000405 i15 it N? IS.: CMPI RO,t116 20! 153236 120027 000116 ino, illf~al character DNE 21 205 153242 001253 tl0,R! ;set H blt 206 15324! 052701 000010 SIS 207 jget next character PC,BETNX! 208 153250 004767 160152 1St: .lSR RO,t05! iis it a cOtla? CHPB 209 153254 120027 00005! ;~es, get sOle lore 19\ 210 153260 001742 BEG ;colPensale tor opcode base 'IallJe = 241 or 261 DEC Rl 211 153262 005301 ;add condition bits to opcode 212 15326! 000637 BR 11 .DSABL LSD 213 214 215 153266 007521 ~OOO 001155 BRAHCH: .RAD50 ISRAHCH GUT Of RANGEl 153274 076417 022622 004167 153302 017500 .WGRD 0 216 153304 000000 A-85 HI Evaluation 110001. "onHar MCRO V05.OO Sund•• 13-",r-83 04110 Page SO Instruction Encode/Decode Routines 1 2 3 4 5 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 30 153410 31 32 153412 33 153414 34 153420 35 153422 36 153m 37 153430 38153414 39 153436 40 153442 .1 153446 42 153450 43 153454 44 153456 45 153460 46 153464 47 153470 48 49 153474 SO 153500 51 153504 52 153506 53 153510 54 153512 55 56 153514 57 153516 ;ff TYPINS decodes the instruction at addresi R4 and t':lpes it followed on the next line b~ the next address. ;-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 116201 006201 006201 042701 004771 000167 TYPINSllllOV IIOV ASL ASL SWA~ BIC "OVB TST BPL BIC JSR ASR TSTB BPL ASL NOV 177700 007342 100000 000130 156034 "00 ASL ADD HOV JSR IIOV "OV .JSR DR 156502 160406 006200 160374 51: 000054 156502 160340 000011 160062 61,: 156034 177741 153514 001554 ;set bits a throush 13 islore thel here for operand decode ;not a b1:lte lode instruction ;tirst see it it's a bste .ode instruction ;Iatch to table, get index P_S(~2) 51 R2 (R4)t.RS R2,-(SP) R2 IItHE"S,R2 1!R2,Rl PC,PRIHTl (SP)t.R2 150.50.2,Rl PC,PRINTl 61 ;not b~te aode, do it norlally hestore R2 ifix R4, restore R5 ;save index ,lake index to anelonic ;S!t 3 chracter anilonic a~Pe it ;restore R2 it ... B <SP) {SP> ;set OPcoOeo ;Iatch to table (R4)t.R5 PC,II R2,-(Sf') R2 tltHElIS,R2 pe,f'RINT2 (SPlt,R2 10IbRO PC,CHROUT R2 PARAIIS(R2hRI Rl R1 t177I41,Rl "00 ;index last base value IPARAHS-BASES-2,R2 RS,BASES(R2) icolPare opcode to base yalY~ 41 iletch -lft2) ikeep lookiml 31 PC H~ 154132 153540 IIITDSP: .WORD 4$: is!t optode "OV JSR IIOV ASL ADD .JSR HOV IIOV JSR ASR "OVa ASR ASR BIC JSR .lltP 012702 000212 020562 155620 103002 005742 000773 000207 3$: @R4,R5 RS,RO RO RO RO tI77700,RO RO,@IIIODE R5 51 1100000,R5 PC,II R2 CHP PHIS TST BR RTS .WORD ;save index ilak@ indE!>: to IInf!llonic it!lpe ani!lon i c ;set irtdex b~k a!:lpe <tab> ;lal-.e b~te instruction inde,: jfet for.at cadi i,ask out the garbage PC,~IHTDSP(Rll it!:lPE' of'erands TYPADI! it!:lpe next address and a tab TeOMeD NOPCOD A-86 ;CVIN ;16 bit value, nct an o~ode T-ll Eyaluation Kodule "onito, "ACRO V05.00 Sund•• 13-K.,-83 04:10 P..e 50-1 Instrijction Encode/Decode Routines 58 153520 59 153522 60 153m 61 153526 62 153530 63 153532 64 153534 65 153536 66 67 68 153540 69 153542 70 71 1535~4 72 153550 73 153554 74 153560 75 153564 76 77 153566 70 153572 79 BO 15357~ Bl 153600 82 83 153602 8~ 153606 153566 153676 .WOIW •WORD •WORD .WORD •WORD .WORD .WORD .WORD 005744 000553 .EHABl lS8 -(R41 NOI'COO: :TST BR 12* 153564 153722 153m 1535H 153554 1535~4 IHTDON TEKTRP TDRDSP TRGllST TIWRHD TSRllST TRTSf«i TSOBDS irro operands iEKT and TRAP is-bit dis~lacelent ;~,DD i5S or DD iSS,DD iR HI-bit positive displaceaer.t ;bac~ UP to nuaber itYPE! it as data an operand 000200 000026 000102 000164 TSRDST: :JSR 1lI: JSR TOPRHD:: JSR JSR IHTIIOH: RTS PC, TFllOP pt, TCOIIIA PC,IlfTDST PC, TF\IlOl' PC 004767 000070 000421 TRTSRG:: JSR DR PC,GHDST TREGIS 004767 000036 000763 TRGDST::JSR DR pt,TRfGIS 13$ 012700 000054 000167 157716 TCOHHA: HOV !KP 1054,RO CHROIJT 012700 004767 004767 012700 000167 TPREG:: KOV JSR JSR KOV JHP tOSO,RO PC,CHROIlT PC,TRfGIS 105loRO CHROUT itYf'E! ( TRESlS: : HOVB 81C Ast ASl iset bits 0 throush 2 IIOV flKODE,RO 1177770,RQ RO RO DSYIIS(RO)'RI J"P PRINH 004767 004767 004767 004767 000207 ;t~pe ihpE! coala iset bits 0 through S of optode ;t~pe operand it,:!pe resister nate a!lPE! re~ister ;t~tPI~ COMa and second operand 85 86 153612 87 153616 88 153622 89 153626 90 153632 000050 157706 000010 000051 157672 itYPE! resister nale 91 92 153636 93 153642 94153m 95 m650 96 153652 97 153656 9B 99 153662 100 153666 101 153674 102 103 153676 104 153702 105 153706 106 153710 107 153714 lOB 153716 109 153720 110 III 153722 112 153724 IlJ 153730 114 153732 113700 007342 omoo 177770 006300 006300 016001 156142 000167 160126 ; inde)( resister nale is.t RADSO triplet H':lPf it 110537 007342 GElDST: "OVB BICB 142737 000300 007342 111: RTS 000207 R5,PIHOIIE 1300, 'IHODE PC 004767 177734 004767 177674 010501 042701 177700 006301 005401 000407 TSODDS: : JSR JSR "OV BIC ASl IlEG DR PC,TREGIS PC, TCOHKA R5,Rl 11mOO,RI RI RI 61 ;t~pe re~ister 010501 042701 005744 000404 TE"TRP! :trov BIC TST DR RS,R1 1177400,RI -(R41 71 iset lower 8 bits without sign extend 177~00 A-87 naif it!:lpe COila iset lower 6 bits ;.ake it a b~te displaceaent iTYft02 .ill advance R4 T-11 EvaluatIon ~l@ Konitor MACRO V05.00 Sund•• 13-Kar-83 04:10 Pase 50~2 Instruction Encode/Decode Routines lIS 116 151714 117 153736 118 153)40 119 153)42 120 153)44 121 122 153)50 123 153754 124 153)60 125 153762 126 153766 (2) 153772 128 153776 129 154000 130 154004 131 154006 132 154012 133 154014 134 154020 135154022 136 154026 137 154030 138 154034 139 154040 140 154044 141 154050 142 154052 143 154056 144 145 154062 146 154066 14) 154072 148 110501 006301 060401 005744 00016) 001162 IBRDSP: : NOVB ASL 6$: ADD lSI 7$: JHP R5.RI RI R4.RI -(i41 TYPL02 ;~et lower 8 bits with si~n e~tpnd i;ake it a b~te displace.ent iadd in the 'PC' ;TYPL02 will ad. . ance R~ ;t~e this value 113)02 032)02 001404 012700 004)6) 120227 103717 12022) 103034 120227 001423 120227 OOHlO 120227 103404 012)00 00476) 004767 120227 103245 012)00 000167 IFUlOPmOVB @lNODE.R2 tlO,R2 iaddressins .ode 5cratch ;deferred? 007342 000010 000100 (5)536 000020 BIT U! 000060 000027 000037 000040 000055 157470 177546 000040 4f~ 000053 15)446 2$ R2.12) 31 R2.13) 31 R2.140 4$ lO55.RO PC.CHROU! PC.!PREG R2.140 IN!DON l053.RO CHROOI t013.RO PC.CHROU! TYPLOI BR Rbt67 51 R2.t77 5$ PC.!YPlOI !PREG 012)00 000043 004767 157436 000167 001016 3f: 12f: HOV .lSR JNP 149 154m 120227 000067 2$: CNPi 150 154102 151 154104 152 154110 153 154112 154 154116 155 156 154120 157 154122 158 154124 159 154126 160 161 154132 162 154134 163 154136 164 154140 165 154144 166 154150 16) 154152 168 154154 169 154160 1)0 154164 1)1 15416. Btu 001406 120227 000077 001403 004767 000))6 000635 a BEO ItOV JSR CHPB 810 CHPB BIllS CHP8 BEU CNPB BEU CHP8 BlO HOV JSR JSR CHPS lUllS HOV JHP CMPB SEU JSR ;00 IlOO.RO PC.CHIOU! R2.120 TREGIS R2,t60 H~pe ~ ,lode 0 or J? Just t~pe resister nale ;Iode 6 or 7? ;~es, irldey.ed iillediate? ;~es, ;1J'!!S ;absolute? j~es j autodecrelent? ;flO H8pe ;t~pe resi5ter nale in parenthesis iaotoincrelent? ;00, finished it~pe t it':WE' t a~F'e ne>:t location ; relati 'ole? ;~es irelative deferred? i'::lE!S a!lPf f"lPxi location ;type re.!!ister nale in parenthesis 012401 060401 005744 000167 001000 5$: HOV ADO IS! JHP (R41hRI R4,fU -(R4) TYPlO2 ;set next location iadd in the 'PC' iTYPL02 will incre.ent R41 don't do it now it!lf'e the value 010501 006201 103004 012700 004767 006201 103004 012)00 004767 006201 103004 TeONeD: :tIOV ASR 8CC ItOV JSR at: ASR BCC ItOV JSR ASR 9f: BCC R5.Rl RI 61 1l03.RO PC.CHROU! Rl 91 1l16.RO PC.CHROU! Rl 101 ;.!iet opcoOe 000103 157360 000126 157344 A-88 iC bit set? ino itype C ;V bit set? iZ bit set? 1-11 Evaluation "odule Konitor ItACRO V05.OO Sundo, 13-Hor-83 04:10 Pose 50-3 IMtruction Encode/Decode Routines 172 154170 173 154m 174 154200 175 154202 176 154204 012700 000132 004767 157330 006201 103234 012700 00011. 177 154210 000167 157314 178 lOS! HDV JSR ASR BCC IIOV 1l32,RO PC,CHRDUT Rl 1l$ 11l6,RO CHROUT • DSABL LSB JIIP A-89 ,N bit set? T·l1 Evaluation Module Konitor HACRO VOS.OO 5IJfld., !3-Har-83 04:10 Page 51 Instruction Encode/Decode Routines 2 3 4 S 6 7 8 154214 9 154216 10 154220 11 154m 12 154226 13 154230 14 154234 15 154236 16 154240 17 154m 18 154244 19 154246 20 154252 21 .SBTTL Co~version and l~peout Routin~s iH BINASC strips the thousaods di~it fro. the value in Rl and lultipli~s Rl b. 10. Us. SIMASI to get the 10000.s digit. ;-005000 005200 162701 001750 103374 005300 062701 001750 006301 010146 006301 006301 062601 062700 000060 000207 BINASC: :m u: INC SUB BCC DEC ADD ASL HOV ASL ASL ADD ADD RTS 005000 005200 162701 023420 103374 005300 062701 023420 062700 000060 000207 BINASI::CLR a: INC SUB Bee DEC ADD ADD RTS RO RO tIOOO. ,RI 1$ RO tIOOO •• RI RI RI.-(SI') RI RI (SP)!.RI t060.RO PC idivide b~ successive subtraction ItrY to subtract 1000. ;worked, no borrow ;fix RO ,and R1 ;tulti.l. RI b. 10 ailes B ;plus 2 lakes 10 X iadd 060 to lake it an ASCII digit 22 23 154254 24 154256 25 154260 26 154264 27 154266 2B 154270 29 154274 30 154300 31 32 1$ RO tIOOOO •• RI t060,RO PC ;divide b~ successive subtraction ;tr~ to subtract 10000. ;worked, no borrow RO iand Rl i.ake an ASCII di~it j fix H+ RADCH checks if the character in RO is a le~al RAD50 character. Returns II H=I if not. 34 ;-- 35 36 37 154302 38 154306 39 154310 40 mm 41 154316 42 154322 43 154324 44 154330 4~ 154332 46 154336 47 154340 48 154344 49 154346 50 154350 51 154352 52 154354 53 RO RO tIOOOO"Rl 120027 103017 120027 103016 120027 103011 120027 103010 120027 001405 120027 001402 000270 000207 000250 000207 000133 RADCH:: CHPB BHIS CHPB BHIS CHPB BHIS CHPB BHIS CHPB 000101 000072 000060 000056 000044 2$: u: RO.t13l 2t RO,tlOI 1$ RO,t072 2$ RO,1060 jhi~her than Z? iA or higher1 ,! or hiSher! ;0 6r hi~her? 1$ RO,1056 BED 1$ CHPB ftO,t044 BED SEN 1$ RTS ClN RTS PC PC A-90 ;ppriod 1 ,dollar si!lo? T-ll Evaluition Module Monitor PlACRD V05.00 Sunda. 13-Har-83 04:10 Conversion and T~peout Routines Pa~e 52 iff 2 3 4 5 6 7 B 154356 9 154362 10 154364 II 154370 12 15\172 13 154376 14 154400 15 154402 16 154404 17 154406 18 154410 19 154412 20 154414 21 22 23 24 25 26 154416 NUI1CH chec~,s it the character in RO is nuaeric and returns fla!15 as tollows: N=O, V=O character is 0 through 7 N=O, V=l chara~tfr is S or 9 N=1 an~ other character ;-- 120027 000060 103413 120027 oooon 103010 120027 000070 103002 000257 000207 000257 000262 HUttCH:: CHPB 2$l 000207 000270 000207 1$: IllD CHI'S BHIS CIII'S SKIS CCC RTS CCC Sl:V RTS SO RTS RO.I060 U RO.ton II RO.t070 2$ PC jtlas 8 or 9 PC PC iH ASCRAD ouitipli .. RI ~ 40 and adds the RAD50 eoui,.ient ot RO. ;-PC.RIX40 RO,I040 U RO.I056 004761 157500 ASCRAD: :JSR 27 154m 120027 000040 CHPB IlEQ CItPS BEQ CMPB JlED ADD SUB CHPS SKIS ADD RTS RO.to44 5$ RO,RI 1100,Rl RO.tlOI U 10S6,RI PC INC ADD RTS RI I033,RI PC 28 154426 29 154430 30 154m 31 154436 32 154442 33 154444 34 154446 35 154452 36 154456 37 154460 38 154464 39 40 154466 41 154470 42 154474 43 44 45 154476 154504 46 154510 jis it () or hillher? ;no, non-nuleric iis it higher than 9? ;~s, non-nuleric ;is it hi~r than 71 illeS, 8 or 9 ;tla~ 0 throu~h 7 001416 120027 001414 120027 001412 060001 162701 120027 103002 062701 000207 000056 000044 000100 000101 000056 005201 062701 000033 000207 U! 4': Sf: ;.ultipl~ Rl b~ 40 ;spa~es converts to 0 jperiod is 34 If jdollar si~ is 33 ialphabetics are 1 throuSh.32 ;rlUaerics are 36 throush 47 054754 000566 001533 USl:RAH: .RAD50 INOT IN USER RAMI 021020 070265 .WDRD 0 000000 ~7 48 154512 057144 000054 015725 ODDADR: .RAD50 IODD ADDRESSI 154520 074670 .IIIlRD 0 49 15~522 000000 A-91 1-11 Evaluation Nodule Monitor MACRO V05.00 Sunda. 13-Nar-83 04:10 Pa .. 54 Cor.version iIDd hPfout Routines 1 2 3 4 5 6 154660 7 154664 8 154666 9 154670 10 154672 11 154676 12 154702 13 154m 14 154714 15 154716 16 154722 17 154726 lB 154732 19 154734 20 154740 21 22 23 24 25 26 154744 27 154746 28 154754 29 154756 30 154764 31 154766 32 154770 33 154772 34 154m 35 155002 36 155004 37 155006 38 1S5010 39 155012 40 155014 41 155016 42 155020 43 155022 44 155026 45 155032 46 155036 47 155040 48 49 Hf TYPDEC hpE's t.he val~ in Rl as a signed, 5-disi t decillal nUlLber followed b!:l a period. TYPDEl can be used t.o tspl!' unsisne-d niJMns. j-- 012700 005701 100003 005401 012700 004767 112737 004767 000402 004761 004767 105337 001371 012700 ooom 000040 000055 156626 000005 007341 TYPDEC: :NOV tt: JSR 177340 177272 156602 007341 151 Bl'L NEB NOV JSR K1lYB 51: JS: BR JSR JSR 11m BHE NOV JltP 000056 156564 t040,RO Rl 11 Rl tOS5,RO PC,~OUI t5,@ICOUNI2 PC,BlllASl 31 PC,BlHASC PC,C~OUI flCooNI2 51 t056,RO CHROUT ihpe a period H+ TYPOCT t~pes Rl as an octal ward. j-- 005000 032767 001407 112767 000301 006301 006100 000411 112767 000405 005000 006301 006100 006301 006100 006301 006100 062700 004767 105337 001362 000207 TYPOCTl : CLR 000200 032354 BIT 000003 032355 BEQ KIMI SWAB ASL ROI. BR 000006 032337 It: 2S: KOVB BR CLR ASL ROI. 4$: 3$: 000060 156476 007341 ASL ROL ASL ROL ADD JSR DECB BHE RTS RO tr .BYTK, IHPKOlI Hs it in byte lode ibranch if ses 11 iit trYte aode ool!:l three digits t3,COUHT2 ;onl':oJ low irJ:te out Rl Rl RO 31 1',CDUNT2 31 RO Rl RO Rl RO Rl RO t060,RD PC,CHROm moum 21 PC A-93 T-11 Evaluation Kodule "onitor HACRO V05.00 Sund •• 13-H.,-83 0~:10 Pa!le 55 Conversion and T~peout Routines Ht 2 3 4 5 155042 6 155050 7 155052 8 155056 9 155062 10 11 12 13 14 15 16 155064 17 155070 18 155072 19 155076 20 21 22 23 24 25 26 155100 27 155104 28 155112 29 155114 30 155116 31 155122 32 155124 33 155126 34 155132 35 155116 36 155140 37 155144 38 155146 39 155152 40 15515.4 ~1 155156 42 155162 43 155164 4~ 155166 45 ~6 155170 47 155172 48 155176 49 155200 50 TYPSPC t':1pes a tab, except in irlstruction lode (t~pe nothing) • j.- 132737 000100 007330 TYPSPC!!BlTe BIlE 001004 012700 004440 HDV 000167 156446 2.: JHP 000207 1$: RTS tr.IHSI.ttTHPHOD \I t~OO.011t040,RO ;space, tab CHRoo! PC Ht TYPNtm hPes thf value in Rl is it s!iabol or nuaber. TYPNHl t~s the value in Rl as a nulber onlY, i-00~767 174542 100402 000167 156676 000722 TYPNUIt:!JSR BHI JHP TYPN"l: :8R PC.HATSYH TYPNHI PRINI2 TYPOC! ;tr~ to latch it s':1lbol ;unsuccessful, t':1PE' nuaericall~ ;else type SYlbol's nale iH TYPlOC types the location addressed b~ R4 in the current lOde. R4 is advanced to the next location. TYPlOl ran be used within instruction t~peout. ;-004767 \32737 001026 011401 105737 100003 111401 0·42701 004767 100403 012700 000402 012700 TYPlOC:: JSR 177504 8ITi 000100 007330 BHE TYPlOl: atoV 007330 1m 177400 174474 133774 BPl HOVB IIC TYPlO2::JSR BHI Jt: MOV 155076 21: DR 004710 5.: 005204 105737 007330 100401 005204 000207 6S! 010546 004767 176110 012605 000207 HOV JSR INC ISTB IHI INC RIS TYPlOJ::HOV JSR HOV RIS PC.AIIlCHK tF .INS! .mltPllOIl TYPlOI ;set current location as a word tR4.Rl rare we in ~e lode? fmPHOD ;no TYPlO2 ;else set location as a byte tR4.RI IPl'event shIn extension t177400.RI ;try to .itch a s'Slbol PC.M1SYM ;unsuccessful 21 IPRINI2.RO 51 tTYPNHhRO PCdRO) R4 mHPHOD 61 R4 PC R5.-(SPI PC.TYPINS (SPlt.R5 PC A-94 ;save R5 because TYPINS uses it ;t~p~ an instruction ; restore R5 T-11 Evaluation Kodul. Kanitof KACRO V05.GO SundaY 13-Kaf-B3 04:10 Conversion and T~£lout Routines 1 2 3 4 5 155202 6 155206 7 155214 8 155220 9 15522\ 10 155226 11 155730 12 155232 13 155234 14 155240 15 155242 16 155244 17 155246 IB 19 20 21 22 155250 23 155254 24 155262 25 155266 26 155270 27 155276 2B 155300 29 155304 30 155306 31 155312 32 33 155314 34 155320 35 155324 36 155330 Pa~. 56 iH TYPlIN types the next 8 locations or four locations it in binary .ode. j-- PC,TYPADR ;tYP£I address in R4 as label or octal AUlber TYPlINllJSR lB. ,@lCDUNTl ItOVB ;t~ location in current .ode, advance R4 PC,TYPlOC u: JSR PC, TYPSPC JSR ifOf 177776 to 0 ra •• TST R4 BEQ 31 R4,R5 idone iJet! ClIP ;~es BIll 21 @ICOlIIHI DEC BN!: II PC 2S: RTS 3$: CLI RTS PC H+ TYPADR bPeS the value in R4 as a label Dr ochl nUlber, followed by : <SP) ;-- G04767 112737 G04767 G04767 G05704 001406 020405 101003 G05337 001365 000207 000244 000207 000042 016746 042767 004767 010401 132737 001006 004767 1G0403 004767 G00402 TYPMIR: : KOV 032054 ooo2GO 032046 BIC JSR 156236 ItOV OGOG02 G07330 BITB BN!: 174326 JSR BKI JSR 156462 DR 004767 012700 012667 000167 177424 020072 0320GO 156174 ~10 177660 177616 007340 007340 a: 2': JSR KOV KOV JI!P TIIPIIllD,-(SPI itor b':lt.e lode IF.BYTK,TKPIIOD PC,CRtF R4,R1 IF. ABS,@ITKPKOD 11 PC,ItATSYK 11 PC,PRINT2 21 PC,TYPOCT 14001040+072, RO (SPIt. TKPKOD hrstor lode CHROUT A-95 T-l1 Evaluation Module ~nitor MACRO V05. 00 Sond•• 13-Mar-a3 04:10 Pas. 57 Conversion and Typeout Routin@s 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 2S 155434 26 155440 27 155442 28 155H~ 29 30 155450 31 155454 32 155460 33 155466 34 155472 35 155m 36 155500 37 155504 38 155506 39 155510 ~o 155514 41 155516 ~2 155520 43 15552~ 44 155526 45 155534 46 155536 47 155540 48 155542 49 155550 50 155552 51 155554 52 53 54 55 155560 56 155562 57 155564 .SBTTl Power-uF Diagnostics .[NABl LSB 005203 012737 012737 012705 012701 010102 005000 010041 005200 005201 077104 012706 011700 004767 042703 110337 012701 012702 005000 004767 005705 001035 012705 000377 177440 00001l 177444 003133 007776 010000 005777 000146 177770 177444 133000 160000 0OO12Q 000117 DIAGHO:: 11ft I1{JV HOV MOV I1{JV ItOV ClR Ul HOV INC INC SOB HOV MOV .ISR BIC HOVB NOV NOV ClR JSR TST BHE HOV 012700 177560 105760 000002 152760 000004 112701 000060 105760 OOOOO~ 100375 110160 000006 105710 100376 126001 000002 001010 105201 120127 000072 001362 NOV SlUTSJ: Tm OOOOO~ BISS KOVE SLUtt: Tm BPl HOVB SlU.2: 1m BPL CHPB BNE INCB CHPB BNE OOOOO~ OOOOO~ BICB CLRB 2$: 1ST FNE 000002 177564 81TB 142760 105005 005705 001005 132737 OOHOI 000670 000167 161100 ~.! iuse r3 as digit to displa~ nUlOer Hight all s@!laents itutri on led Ilh~'P'PORC t400*006+t33,R5 iinltialize error code '12' 17776,Rl ,fill RAM with pattern, saving location for JSR Rl,R2 RO RO,-(RII RO Rl Rl,1S 110000,SP iset Sf to top of RAM t5777,RO ;cherksu& co.p}elent for RAM pattern PC , CIU(SUN ;cheCkS1JIII words trol Rl (=0) to R2 (=:7776) ;Iask at all blJt digit select 1177770,R3 ;turn off let;! and tlJrn on di si t R3,~'P'PORC 11330oo,RI ;index ROMs IEND,R2 ;set upper check SUI iilit to top of ROMs jperforl check SUI of ROM RO PC ,C/iKSUIt ;do we hav~ an ~rror ~et? R5 ;i::IltS, exit and show it 2' t400tOOOtl17,R5 iinitialize error code' 3' R3 1377,UP'PORA 117756o.RO 2(RO) H,4(ROI 160,Rl 4<ROI SlU.l RJ.6IROI (ROI SlU.2 2IROI,Rl ;point to console ,clEar out and recieyed sarbag@ jset aainenace bit ;init character to xlit iread~ to Xlit ;no - wait ;ser~ char to reciever ;received a char ,00 - uait BEG ~I BR DIA6NO ISTART i!fot what ~OlJ x'titled ;no - error ;produce rM?>:t ascii character ; Hoop until checked 0 to 177 ;reset aaintenace bit ;~S, cleir error ;check for error ;branch it error ,see if in diagno lode ; if not then goodb~ Hoo? for flier hnitialize scralchpad RAft and start lonitor IRllt.RO Rl,R2 CHKSUIt iaccululate check SUI ;done ':Iet 7 ;no JjjP 21 Rl Rl,I72 SLU.1 '4,~IROI R5 R5 4S 12.@1l7756~ .ENABl lSB 062100 020102 103775 CHKSUM: :AnD CHP FLO A-96 T-ll Ev.luation !odul. Konito, !ACRO V05.00 Sund .. 13-K.,-83 04:10 P••• 57-1 Power-up Dia~nostics 58 155566 59 155570 60 155572 61 155574 62 155576 R5 RO itest result CLRB R5 ;cheClSUt foiled ielse clear error RTS PC 000305 005700 SWAB TST 001001 105005 000207 BHE 1$: a A-97 1-11 [valuation ftodul. Monit.. KACRO VOS,GO Sunda. 13-"a.-S3 04:10 Pas. 58 Power-up Oii9nastics ,SBIIl Seecial Data Slructu.es 2 3 4 5 HI INSTRUCTION ENCODEIDECODE and COHHAND DECODE TABLES: The five paralelers listed for each opcode are: I, Base value of the optode 2. Strins nale of the opcode 6 7 8 3. 9 10 11 12 13 14 15 16 17 Paraleter or~anization: 00 - decode condition code bits (N,Z,V,C) 01 - nnnnnn (16 bit nu.be.1 02 - no para-elers 03 - nnn (8 bit nuobe.1 04 - xx. (8 bit di",laceoentl OS - .,dd IM-ddors.s 07 - •• ,dd 18 1~ - 19 11 - r,nn (6 bit displacetlent) EQUals 1 if instl'lJction is le!lal in b'Jte lode 4. 20 21 22 23 24 25 26 27 The fifth paraleter is a code used b~ the top-level parser to decode ASCII characters in th@ 0.0 to 077 ranse. The values of this paraleler are: o - Illesal character at 10' level 1 - Inf.e.rpret as tile first characler of an expression or instruction 2 - :, or label definition 3 - i, or caDent 4 - ., or s~l definition 5 - ,?, or lyp"e as a nulber 6 - Valid is an operator within expressions 7 - Both 1 and 6 •••1. 28 29 30 31 32 r ;-- 33 34 3S 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 ,lIACRo CODE COIlE CODE COIlE CODE CODE CODE CODE COIlE CODE CODE CODE CODE COIlE CODE CODE CODE COIlE CODE COIlE CODE CODE CODE INSTRS OOOOOO,(HALT 000001,(W!IT 000002, (RTI OOOOOl,(BPT 000004.<101 }'2,0,0 ;sPice ),2,0,6 " >,2,0,0 ),2,0,1 ),2,0,1 OOOOOS,<RESET ),2,0,0 ;' 000006 , (RTT 000007,( 000100, (.NIP 000200,(RTS 000210,( 000240,(NOP 000241,(CL OOO257,(CCC 000260,( 000261,(5£ 000277,(SCC 000300,(SWAB ooo400,(BR 001000,<BNE 001400,(B£O 002000,(B6£ 002400,(BLT ;1 ;' A-98 ),2,0,6 ),1,0,1 ,. ;t ;1 ;% ),6,0,0 ;C ),10,0,0 n >,110,6 ),2,0,7 ),0,0,0 ),2,0,7 >,1,011 ),0,0,6 a H ;, ;;, ;/ ),2,0,1 ;0 ),6,0,1 ),4,0,1 H ),~,O,l ;2 ;3 ),4,0,1 },4,0,1 ;4 ),-1,0,1 ;6 ;5 1-11 Evaluation KoOOle Konitor KACRO V05. 00 5und •• 13-1.,-83 0.:10 P". 58-1 Special Oata Structure; 58 59 60 61 62 63 64 65 66 67 6B CODE COII£ CODE CODE COIlE COIlE COII£ CODE CODE CODE CODE CODE COIlE COIlE CODE COIlE COIlE COllE COllE COIlE (011£ CODE CODE COII£ CODE CODE CODE CODE COllE CODE CODE COllf: CODE CODE COllf: COOE CODE CODE CODE CODE COIlE COIlE COIlE CODE CODE COllf: CODE .ENDI 69 70 71 72 73 7. 75 76 77 7B 79 BO BI B2 B3 e. B5 86 B7 sa a9 90 91 92 93 9. 1'5 96 97 98 99 100 101 102 103 104 105 106 107 155600 lOB 155602 109 155604 110 155606 III 155610 112 155612 Il3 155614 114 155616 000241 000242 000244 000250 000261 000262 000264 000270 CBASES::.WORD .WORD .WORD •WORD .WORD .WORD •WORD .WORD 003000.(B61 003400.<9LE 004ooo.<J5R 005000,(ClR 005Ioo.(CO! 005200,<INC oo53oo.(IIEC oo5400.(NEG 005500. (AOC 005600,(5BC 005700.(151 006000. (ROR 006loo,(ROL 006200.<ASR 006l00. (AS'006400,< oo6700.<SXT 007000.< 010000.(1IOV 02OOC0.(C"P 030000.(SlT O4QOOO,(BIC 050000.<815 060000 •<ADD 070000.( 074000,<XOR 075000,( 077000.(508 100000.(BPl 100400,(8"1 101000. (llHI 101400.(lIlOS 102ooo.(8VC I02400.(BV5 !03ooo,(tcC 103ooo.<1lHIS !03400.(tcS 103400,(8l0 104ooo,(E"1 104400.(IRAP 105000.< I06400.(IIPS 106500.( 106700,(MfPS 107000.( 160000.(StJ8 170000.( 000241 000242 000244 000250 000261 000262 000264 000270 A-99 ),·\,0,1 ),4,0,1 >,$,0,1 ),6,1,2 >,6,1,3 ),6,1,1 >,6,1,4 ),6,lrO ),6,1r5 ),6,1,0 ),6,ltO ),6,110 ),6,1,0 ),6,hO ),611,0 ),1,0,0 ),6,0,0 ),1,0,0 ),7,110 ),7,1,(1 ),7,1,0 ),7,110 ),7,1,0 ),7,0,0 ),lrO,O ),5,0,0 ),1,0,0 >,11,0,0 ),4,0,0 ),4,0,0 ),4,0,0 ),4,0,0 ),4,0,0 ),4,0,0 ),4,0,0 ),4,0,0 >,~,O,O ),~,o,o ),3,0,0 ),3,0,0 ),bO,O ),6,0,0 ),bO,O ),6,0,0 >,110,0 ),7,0,0 ),lrO,O mc ;CLV mz iClN iSEC iSEV ;SH ;SEN ,7 ,a i9 ..,•• h j= j) ,." T-11 EvaluatIon Module Monitor HACRO V05.00 Sunda, 13-H,,-83 04:10 Pas. 5B-2 SJ-erial Data Structures 115 116 117 118 119 155620 120 121 122 12l 124 156034 125 116 156142 072460 127 156146 072530 128 156152 072600 129 156156 072650 130 156162 072720 131 156166 072770 Il2 156172 074500 133 156176 062170 134 156202 063370 135 156206 111100 136 156212 127400 137 156216 138 156216 000000 139 156122 010530 140 156226 010600 141 156232 010650 142 156236 010120 143 144 156242 031324 145 156246 027030 146 156252 074745 147 156256 062073 148 156262 062073 149 156266 032153 150 156272 054740 151 156276 070464 152 156302 046531 153 156106 mOll 154 156312 127726 155 156316 127736 156 156322 127473 157 156326 127551 158 156332 131247 159 156336 127534 160 156342 127534 161 156346 003243 162 156352 011366 1.13 15.1356 021411 164 156362 010174 165 156366 035203 166 156m 012245 167 156376 014124 168 156402 111052 169 156406 170 156406 070530 171 156412 075265 BASVAL,HNEH,FORMAT,BYTMO[l,MlSC •MACRO COllE .WORD BASVAL .ENDN BASES:: INSTRS BASVAl, HNEN, FORHAT ,BYTNO[I, HISe .NACRO CODE .BYTE (BYTMOD'200>+<FORHA Tll0: IMrSC .EN[lM PARAI!S:: INSTRS 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 000000 IRO IRI IR2 IRl IR4 IR5 ISP IPC IPS IWP .RADSO I. DSYMS: : .RAD50 .RADSO .RAIISO .RADSO .RAD50 .RADSO .RADSO .RADSO DSYMPS: .RAD50 .RADSO I I I I I ! I I OSYHUR: 000000 000000 000000 000000 000000 062000 000000 062000 075630 075700 076400 060314 042100 014400 004444 014400 020560 012061 076710 0)0440 042420 044130 057665 011624 07MOO 017500 077745 004420 021145 014400 017574 007344 I .RA050 .RADSO .If:t .RA050 /B2 ! .RA050 IF3 .RAD50 IB4 I !IIRVRII:: .RAPSO .RAD50 .RA['50 OIRV~I: .RADoO .RAD50 .RAD50 .RAD50 ,'HELf> I IGO /STEF' IPASS~ " I IPASS2 I IHOS! I lNOHOST I .RAPSO .'TALK ,RAOSO ILOAD ! " .RAP50 ,RA1l50 .RAD50 •RAD50 I.STARTI " ,ENrl I !.EVEN • I.ASC1!1 .RAD50 (IBnE / .RAD50 I.WORD I .RADSO I.Bl~P, I · RAOSO I.BLKW • DIR'JP,A: .RAOSQ IABSOLU,' DIRVBB: .RAI!'50 ICANCELI PrRVBO' •RAIISO IEXl! I D1RVBH: .RAI150 IBm i DIRV81: ,R:'D50 'INSTR/J . ,RA{!50 IClEAR I .RAD50 /DEleE.' OlRVBH: .RADSO IWORD I OIRVBO: Dlf:VBP: .RAD50 IREPEAT l DIRVBS: .RA!l50 ISYHBOl/ A-IOO ;Predefined s~lbol~- lUSt. flOt. be 3 ;i13r cct.ers HI HeMth, or (lIse a 'o'::tf? lO<ie "ersh'n of each ;rlale will also latch, i.e. XYZB will match to iXYZ. Olll~ b':lt.e lode f1neltorllCS sholjld be 3 icharacters Ions. I T-11 Evaluation ModulI' Monitor HACRo V05.00 S~ecial Data Structures 172 156416 173 156422 174 156426 175 156432 176 156436 074017 074017 074017 106257 106257 110727 111225 SlJrlda~ 13-Mar-B3 (4:10 Pase 58-) DIRI'BT : •RAP5Q ;'SHOWliOi 111321 .RAD50 !;HOWF:£;' .RAD50 ISHOW,Y' 053600 023160 .RHD50 IVTOFF I .RADSO ;"~ITON ])) 178 156442 179 156446 180 156452 lSI 156456 182 156462 183 150466 184 156472 185 156476 186 187 188 189 012213 000000 012266 000000 012272 000000 012256 000000 073613 000000 073636 000000 073642 000000 073626 000000 CHNEHS::.RADSO · RAD50 .RADSO .RADSO .RAD50 .RAD50 · RAD50 .RAD50 156566 000770 BASVAL.HNEM.foRHAT,BYTHOD·HISC .MACRO CODE .RADSO ·K:~EM· .[NOH MHEHS: : INSl,,, HN£HSI064 HNCCC j leMth of precedir13 RA050 table • - DSYKS TOPNAM -- 190 156502 191 192 ,fell' ICLV /eL: ICLN ISEe I /SEV ISEZ IS[N -- T-ll Evaluation Module Monitor ttACRO V05.00 Special Data Structures SI.Jrlda~ 13-Mar-8J 004:10 Page 59 2 3 4 5 6 7 8 9 10 11 000642 12 13 14 15 16 17 18 157774 0527H 19 20 21 22 23 24 157776 010 25 157777 010 26 27 160000 140000 itt The locations derined b~ the rollo~ing directive are free and lust ~e zero tor the po~er-up rjia~nostics to wor~_ prof'!Hly. When addiM code in this space or chansing aflY of the Hevious code, adjust lhe checksu. value at CHECKS = 1577704 so that the ROMs ~s ~ whole will have a :ero word chetksul. ;-.REPT .eYTE <15777'--.> 0 .ENDR The following word adjusts the R~ check sua to zero. ;-- CHECKS::.WORD 527~4 ;12-HAY-83 R. Arnott H+ The last b~tp in fach of the ROMs is used to identifY the ROMs. ;-- Lo.m:: .8YTE HI.IO:: .8YTE 010 010 EHD:: START .END ;Version 1.0, low b~te iVersion LOr high b!:lte A-IOI T-ll EvaluatIon "odule 110m tor HACRO V05.00 Sunday 13-"ar~B3 04:10 Pa•• 59-1 tablp S~It>ol AODIT 1521510 ADRCHK 154610 0 A[IRCHI 154524 0 AORCH2 154S30 G AOVAIIR' 007334 0 ASCOUT 133626 0 ASCRAD 154416 0 AUXFLO, 007711 G AUXIN' 000120 0 AUXOUT' 000124 0 AICREO, 177452 G AIRBUf' 177550 0 AISREO~ 177552 0 AIXBUf, 177450 G FASES 155620 G BCDm 140050 I: BCIITBl 136522 9lHASC 154214 0 BIHASI 154254 0 BLH!;DS 136350 BLNKHI 136344 0 8lHKlO 136336 0 SLOAD 150442 G BOTTOH, 007346 0 , 007630 0 BP BRAHCH 153266 BRDISP 153024 0 BREAK 137114 D BRKFIL' 007760 G BRKPT 137174 G BRKPI 141466 BUFFER' 007470 G CANCEL 142246 G CBASES 155600 G CHECKS 157774 0 CIIKSUH 155S60 0 CHROUT 133530 G CHROI 133540 G CHROl 133554 6 CLRAPE 1S1l46 CHHEHS 156442 G CHOHIT 142724 0 CHONI 142572 0 CHON2 143164 0 CKON3 143216 G CHOH31 143224 CHOH4 143246 6 CHON5 143604 G CHDN6 143616 0 CHOH7 143652 CHTLC ' 007344 0 COHACH 152670 COHLUP 143646 CONBRK~ 000140 0 COHCOD 153172 G COHFLO' 007710 0 COKIN " 000060 0 COHOUT, 000064 G COHTIH 143612 G COUHTl' 007340 0 COUNT2' 007341 0 133524 G CRLf CURCOH, 007326 0 CIRBUF, 177562 0 CIRCSR, 177560 0 CIXFUF' 177566 0 CIXCSR' 177564 0 DEBNCE, 007704 0 DECDS? 140030 0 DELETE 147444 G DELIH , 007345 0 DELSIK 151674 0 DOOIS? 140014 0 DIAOIlO 155334 G DIOEXE 1.0542 G DIRVBA 156346 DrRVBB 156352 DIRVBlr 156m DIRVIIH 156362 OIRVSI 156366 DlRVBH 156402 DlRVBO 156406 DIRVBI' 156406 DlRVBS 156412 DIRVBT 156416 DIRVDI 156256 DIRVRB 156242 0 DISPLA 135344 G nlVID 152164 G DOCOiVI 144124 roCR 144170 0 DOEXPR 144274 0 DOFUNC 142226 0 DOLABL 151426 0 DONVAL 144134 DOOPER 145124 OOSIHB 151164 G DOVERB 147112 G DS?DEC 136366 0 DSPOIO 135772 G DSPLNH 136044 G DSPHAK 136112 G DSPNUH 136050 DSPTBL 140360 G DSPUHH 136036 0 DSYK?S 156~O2 DSYHS 156142 0 DSYHUR 156216 [ABS 146150 6 Em 146176 0 EGAN 146156 G ECHO 134142 G EClR 146222 G ECON 146354 £[IEL EDEll EERR EEXT EfND EINS EHOO EHOV ENTRAP END EHIIEX? EHUM EREG EREP ERROR ERROR2 ERRSEO E51H 146232 G 146240 14.360 146320 G 14651Hl G 146210 0 146760 0 146364 0 153152 0 160000 0 145002 146270 0 146332 G W276 G 143212 G 143720 135756 1.6312 0 EXDOOP 145220 EXINlT 145172 EXINl1 145200 EXfnG' 007332 0 FERCNR B7~42 G FERRll1l 137350 0 150114 0 FIND FIXBP 140170 FLAOSl= 007706 6 FHESAO 137424 0 FHESOI 137434 FMES02 137450 FHES03 137472 FHESG4 137522 FHCDON 142264 FNCTBL H2234 G , 007631 0 FP fPAAEH 145162 FULOPR 152364 G f.ABS ' 000002 F.ADDR' 000004 F.APPL' 010000 F.A64X' 000200 F.BRKA' 000400 F,DRKO' 001000 f •BRKS~ 000020 F. BYTB= 000001 F.BYTK, 000200 F•CHAN' 000002 F•COHM' 000020 F.CPBO' 000010 F.CPDl c 000020 f ,CPB2' 000040 f.DATA~ 000001 F.FUNC' 000040 f.HOST' 004000 F.INST= 000100 f. KElP, 002000 F.LDST~ 000100 A-102 f.LOAD' 000200 f .HNEH' 000001 f.NULL' 000004 f .PASl, 100000 f.PROT' 040000 f.REG ' 000010 F.SAVX' 000010 F.SST ' 000200 F•SSll, 000001 F.STOP' (100002 F. T~AS' 020000 F.UNDF, 000004 F.USER' 000100 F.USRD~ 000010 F.VAlU' 000002 F.VT ' 004000 GEHEXr H~512 G OETARG 152642 0 GElBP 133436 0 OETCH 133316 G DEICHC 133412 G OEIDST 153M2 GETERH 144556 0 GETm 144522 G GETEXI 144540 OETlNS 152206 G OElKEY 140044 0 GElLCN 133406 G 6ElLlH 133240 G omIT 146060 G GElHAH 145450 G OElHH! 145306 G GETHUH 140054 G GETHXT 133426 0 6ElOF'R 144724 G OETOPV 144720 G OETREG 152322 G OETSYH 151560 G OHEXAH 141146 G 147m 0 60 OOILED 142270 G 143052 ORET 147320 6 HELP HEXSEO 13·1016 6 HfP , 007072 G HOncH 134744 0 HLID 157777 0 HOST 150222 G HOSTSF~ 007632 G HOSTlN 134540 G HSTFlG' 007673 G IHSDHI 152744 IHSDH2 152760 IHSDOH 1:·2770 INSDSP 152276 INTDDN 153564 INTDSP 153514 IOIHIT IOVECT ITRAP KADReH KEYBCn KEYCHD KEYCHI 135076 G 135224 0 137334 G 14215.:. 136514 G 140330 G 140344 0 KEYGET 136H6 G KEYOEI 13WO [[YPIV, 007076 G KEYPVS, 007700 0 .LOOP 140106 G KLOOPI 141170 !LOOP2 141644 KHOHlT 140200 G LASCOK, 007127 G LASLIN' 007325 G LEDlV ' 000104 G lERR 150472 LEVEL ' 007333 0 L1HElH 133000 0 LIHFLG, 007324 0 LOAD 150442 0 LOBLNK 140040 G lODISf' 140024 G LOGAN[I 1521346 LOGOR 152130 G LO.ID 157776 G LPAREN 145046 MATSYM 151632 G KF8251, 007464 0 HNeCC ' 156566 G HNEHS 156502 G HOOE ::: 007342 G HOHITR 140010 0 HDHlT! 137556 C HOVE 150044 G HULm 15~142 G HAKTBL 136154 G NOHOST 150306 0 HOPCtlD 153540 G HOPROT 150134 0 NPRDT 142562 G HUHCH 154356 0 NUHGET 136546 G O[rlrADR 154512 OPERAT, 007343 0 OF'F:AND 153a!6 G OPRTBL 145250 OPTION 15035i OVERfL 143104 PADRAn 146050 PA[rRI 146040 PARMS 156034 G PARDSP 144104 PASSI 150202 G PASS2 150212 G T-tl Evaluation Module "cnitor MACRO VOS.OO Sunda'J 13-Mar-B3 04:10 F'ag;e 59-2 S,"bo1 hl>l. PI'SUAl 145670 G PER!oD~ 007331 0 PfUEC ~ 000024 0 PRINT 133766 0 PRINTA 133754 0 PRIHTl 134004 0 PRINT2 133774 G PRIHT3 m014 0 PRINT4 134010 PRNERR 143120 0 PRom 150172 0 PURGE 133450 G PIIRFVS' 007674 G PIC REO' 177446 0 PIPORA~ 177440 0 PIPORC' 177444 0 F'U'ORD~ 177544 0 PIPORI: 177542 G P~PORO' 177442 G RAI'CH 154302 G REGDSI 152724 G REPEAT, 007466 G REF-OFO 151412 RERR 1'50152 RPAREN 145152 RSTART 140004 0 RISREG 152714 0 R1X40 134122 0 007336 0 SCRPAD' 007400 0 SCRP!'1 ~ 006500 0 SEOBUF' 007712 0 smux 135170 0 SETAXI 135126 smX2 135124 SETHOD 146104 SlUTST 155454 SlU.1 155472 SlU.2 155504 SOBDSP 153102 0 SPCl8F' 007726 0 SPOlBL 142302 0 SPEEDS 142320 G SRCDST 153006 G STACK ~ 007462 G START 140MO G STEP 147416 G SUBTR 152160 G 150504 0 TAlK TALK I 150530 TBlBOT~ 007462 G TBlFUl 151504 TBlTOP~ 007320 0 TBROSP 153734 0 TCOHNA 153602 • ASS. 160000 000000 IRW,I,OBL,ABS,OVR) IRW,I,lCl,REl,COH) 000 001 Errors detected! 0 SAUEXP~ TCONCD 154132 0 TEHTRP 1~3721 G TFUlOP 153750 0 TIME ~ 007730 0 THPHOD~ 007330 0 TOPNAM~ 000770 G TOPRND 153551 0 TPREO 153612 G TREGIS 153636 0 TROOST 153574 G TRTSRO 153566 G TSOBDS 153676 G TIROST 153544 0 TYPADR 155250 G TYPASC 154m 0 TYPDEC 154660 G TYPINS 153300 6 TYPLIN lS5202 G TYPlOC 155100 6 TYF'lOI 155170 G TYPlOI 155114 0 TYPlO2 155132 G TYPNHI 155076 0 TYPHUH 155064 G moC! 154W 0 TYPREG 151730 G TYPSPC 155042 G t •• Asseabler stotistics W{)r~. file reads: 0 Wo,f. file writes: 0 Size of !Jor'" fIle: HI760 Words Size of core pool: 1}312 Wards O~eratirl.!i syste.: RT-11 I 43 Pag.,) ( 52 Pt3SfcS) Elapsed tile: 00:02:30.51 DK:HON2,DK:HON2IC'DK:HOH2 A·J03 152040 G 137004 0 151m 140034 0 140020 G 1001 141722 G IHALT 136752 G IHOHIT 137570 G INUll! 135676 0 IHUHER 140430 G IPC :: 007750 G 154470 U'S TYPSYH 152102 G TYPT8l UCSAUE UNDEFX UPBlNK UPDIS," USERAH 000100 0 IJSERVS~ 007702 0 150142 VCON VERR 150146 VERRI 150162 VRBDSP 147220 0 VRSI'SI 147262 VTJHP 147402 VTOfF 147406 VTON 147374 WHM 1430'b I~ODR ~ 007756 0 IADItRK 1415500 IA['V 141232 0 UAn 141372 G IFRKP 141462 G HlIlO 0 IClR IEXAM 141122 0 IFUNe 141650 0 100 141714 0 USERIU~ :: 007752 G IREG 141610 G IRPEAT 150012 G IRQ :: 007732 G IRI " 007734 C IR2 :: 007736 G IR3 o 007740 G IR4 :: 007742 C' $R5 ~ 007744 r, ISf' ~ 00774, G ISS 1 141706 r, ISTART 136660 0 IUR :: 006500 G IWATCH~ 00;754 0 $. A~.CI W700 0 I.Blfl 147634 G I.BlKU 147654 0 l.mE 147466 [, I.£V£II 147776 0 1.5m 150344 I.IOR[' 147560 G APPENDIXB SCHEMATIC DRAWINGS J3 I.. .."... .. I ............ .... ................ ...... ..... J4 ..•••••••••••• .............. ....... . \ -_ _ _ _ _ _ _ _ _ _ _ 10.40 F.B.S. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _- 1 (?f>I'1.I60MM) Figure B-1 DCTll-EM Component Placement B-1 CI PROCESSOR CYCl£ IlECllOE Z.2uF + T lEAl 7. H TI EAlbM Tl EAI Ii H 'f! £At ... H TI EAI~H 11 EAI 2 H TI EAI I H 11 EAt IIH 11 ECOUT H 11 [PI H T! ERAS l T, E(AS L 11 [SElOH 11 (SEL I H TI [wLS L 11 (wHB L 12 ROv l TI TeLl< H 11 BCLR L All 7 :7 31) A:~ 11 SAUl H TI SALIZ H TI SAUl H 11 OALl2 H 'ffl)ALII H 3:3 A11 11 DALI. H 32 Alii 21 (OUT 11 SAlle H TI SAL q H TI SAL e H TI OAL 9 H TlOAL9H 31 FI ZQ -RAS UI -(AS TI E(A(K L TIEOMGL TI ESELI H ~Il}lo""----' TI EOMG H ~~~~LB 11 E(ASL~u 28 27 R/-WHB I v' Tt OAL If H ~b -ROY .B XTAll XTALG I -BClh 7"'1.,.53n e 1 01 E~lm(l) 2 L~=========~'+ t 0I L _ _ _ _ _;i17 02 03 LT~I~0AL=-'1-;H'----718A1D7 t:p tv - TIOALZH TIDAl.IH 11 OAL' H 170b 140r; 13: 04 ~"'8'--_ _ _ _ _ __ TI EWHBL ~~~l,--_________________ TI EWLBL I~~.'----------------- TI SAL 1 H Rim r; R2(1)· 11SALbH R;:(I) Ci R7(f) 19 Rb(l)lb R,)(ul'5 R4(\) I TISAl.4H T I SAL 3: H TI SAl';H 11 EOMGL 11 EDBIN TISALZH TI SAL I H II II II TI ERES L ~TIINTAL T.I READ H TI.4 PC;: H TIDCLKH T1ESELmH~ 11 CALlZH TI ESEL. 1 H TI EDBIN L ,~, /' ~TITCLKZH TI EWRL L TI B(lR H ".~.oZ."'1)7b HHZ 1"'1.,.57'" TI EwRH l ':~l TI HBOIR H 2!~>'------- II +~. 11 E(AS H TI EOBtN L TISAL,H DC EN ,---,- 11 TCLK H TI REAO H 11 ERAS L· TI T(Ut H TI OAL£N L ~ ... SELG F; +~. B· TI SAL II) H 11 SAUlt H TI OALIl H 3... 12 z~-;r-p"--------- TI DATA H 11 REAOH +~. TIDAlll)H TI DALI'" H Alb t.tl) 1~1 TI E(AS L ADORESS LATCH 2~~TIEROL ~ 9E21 I 2' TEB - " - - T2 ARC 11 L TI )AlIS H TI CALl4 H TIDALI~H TIDALI2H TloALllH TI DALlltlH TI OAl QH TI OAL Bioi 74LS24'} E4' 9t 18 2 AI 82 17 ' A2 B~16 4.:., 84 11) o A4 BS 14 b Ao Be 11 7 Ab S A7 AS 87 12 BE II " ",,' "~"" f20BrSH T20814H T2 Ofl 13 H T20812H T Z DB r t H TlDBI()H T 2 DB Q H T2 DB H e EN TI SAL 14 H 2 SHB TI SAL II) H 'SHC +sv ", .. !I ERAS L 02 j ~ 03 12 0,+ I I TI OAL 14H 12 ~_ EN 4~, TIC.aII~I-I~~11I3 TIOALSH TI DALbH 'AZ 't iI'3 TI S-"4 DAL4H T r OAL, H TIOAL2H TIDAL I H TIDALItH ~ I 62 I f 8,Ic 84 IS 8S 14 (. ':'S 7.lt> 6 .....7 9 he ~12 E{sBi~ ~ 86 13 87 12 8e II DB S H riB 4 H DB 3 H r 8 2 H DB I H DB 1 H PERI PHERAL (HIP DECODER 74lS138 E26 Drohe2 TISAL3H TI SAlo H TI SAL4 H ~ SELS TI SALCjH SEL( D't "~'''~. T2ADI4H T2 ADI":j H T2ADI2H T2AOIIH T2AOIQlH T2AO 9H T2An 8" FIt;; 14 tAS 7 Ar;, EA7 lAB F<6 I, F<712 F-& II " "" "~. T2ADr;,H T2A'JSH T2A[l4H T2 AD '3 H T2AC2H T2ACIH T2ADIIlH 81 16 R4 IS 8S I .. Sf 13 f,7 12 86 I I ~ ..q )44 6 AS 7Ab c'H 9 AS I~ ~Q~TIDAL,QH REFRESH ON ~~TIDAL8H NORMAL WRITE T2 PPI L T2 pcr L T2 DLART L TIEDM(,L~, ~~10 TI[lALI~H 'TI DALI2 H TIDAL I I H TI OAL I!I H TIC1AL9H TI DAL 8H USER DATA 'sus BuFFER 74lS24<; E'4 81 18 82 17 3j,2 Ib 8IT MODE TI [PI H T! ERAS L TI ECAS L TI ESEL/JH T! ES£LIH TIEOMGL TI EOBIN l 745241 E4a ":j R2 IU IS lL S 13 DBl YBl 7 II OBI YBI 9 R, I ~m 17 TI [(OUT H g:~ ~ OAI b OAl B DA'3 OA4 ::~ YAI Ie YA2 Ito YA,I4 YA4 I T2 (OUTH +>V c"'l,S~'bU E2' I - I T2 HALT L T2 PI H R4 '" T2 RAS L 5I HALT Ro I •• T2 CAS L TI r AL 7 H TIDAL 6 H TIDALSH TI OAL 4 M TI OAL 3 H TIDAL 2 H TI (lAL I H TI DALI]) H Rb I •• T2 SEl (I L +Sv R7 I •• TZSELll T2 PF I (14) Bc JNC 52 INT RQ II. Rl7 2.2K RB ~ T2 OI'1(,L ~: ~!~~~ ~ 11'IIr...~l:5IDIIlp!L-- T2 E(AS 2 L T2 ARD~ l T2 ARD I L T2AROIXL T I 0AL IS H T I OAll'l H orR ENG TI HBCIR H TI CALEN L " EN TISAL7H V.> 7'tLS24S E47 AI 16 B<:: 17 ~L:;2 83 IfA, f<4 IS SAl.> ~LS~ TI OAL II H I SElA TI EWLB L TI SAL II H TI SAL lilI H TISALQH TISALBH 11'l " 1 DATA T 2 067 H T2 Ie b H T2 T2 T2 T2 T2 T2 STA~T ADDRESS J41l10ille T2 ROY L 7'oLS24"j , ,.""~' L TIOALI3H BUS BUFFER U" 81 Ib T2 ARDIl( Db 07 b ~' ' : - " " ..... ,,,,, E VAWATOR 14 os III TI EDBIN L T2 [SEL l 01 11 OAL IS H TI BelR H T2 DBIN L +,. ~ TI TI TI TI TI TI TI TI 9 AI' " AI' ,AO D7~ TZ DBJliH D6~ TZ 081 .. 101 DS~ TZ 0I11H All '., e .. 2 A. , AS TISAL~H , ,16 4 Ali ~A" ~ oil TZ 081'H g~i=: ~~ ~::: • A2 A' TI SAL Z" TISALIN ,A~ 0'77-- T2 08'1101 DZ~ -----lA2 -;:::J ~ AI IS I T~~=~~ TI [WRL L ,, 071H--- T2 017101 Db~ TZ D'~H DI)~ Tl DISH D4~ T2 ol .. H 0,1 ~T2oel"'" ~TZO'ItN ~T2D'12H ., T2011H ff--- 12 DB II H ~T2 DlI,H J!-T2 L-T2J"1f18H ~ P T2 ARo. L ,~ 'Ell ,,, , ,, ,2 , • , ,-----; th!--- T 2 08.-; 101 2 D2~ T20BZH DI~ TZD8IH O.~ T2 !JOI. 5'·~·I" ~ TZ AROII L" El' A8 Z ,17 D 4 t i - - T2 DB 12101 "SA' ~ ,ElO ~ E'S SAlt I H SAL I' H SAL QI H SAL H SAL 7 H SAL t. H SAL'") H SAL" H 019 H , q Tl087M T2 oe'H T208I1)M TZ DB '1M T2 DB:t M 12 oa2 H yzr,tlH 12 re." ~~ ~ ~I 18 ZI TI (wRL L: TI [WRH L I If' ~ E21 27f:11t "2 Eltl) 19 TI SAL fl 101'21 J.12 07 18 T2 08 II) H ~: ~:~ :~ : ~:~ ~ 11 ~~~::~: T I SAL I' H 21t A~ TI SAL q H ~ ,18 Ol.i:: T2 08 12 101 01 11 T2 DB II H ~: ~:~ ~: \I:~ g~ 12 ~~~::: T I SAL 6 H C; AI) i: ~:t:: ~:~ ;: ~:~;: ::~ TI SAL I H II ,lei O. II T2 DB 8 H -l!!.. ~~~~~~~;~ ~ ,. AI~.r;lDl Iq T2 DB 7 H n SAL 11 H 2 TISAll2H Z1 AII TI SAL II H 21 AI' TI SAL III H 21t Aq TI SAL q H zr; ,18 TI SAL 6 H 1 oil TI 'SAL 1 H It ,1& TI SAL f> H I) ,Ie; ~: ~:t ~ ~ ;:~ TI SAL J H 8 AZ TI SAL 2 H QI AI TI SAL I H I' AG +sv [)EttS 01) 11 Olt It. 01 II) 02 11 01 12 Dl I ' TZ DB b H T2 DB I) H T2 DB If H T2 08 1 H T2 DB 2 H 12 08 t H T2 DB II H "'I)V~ 1 iSV 2 ¥ " UI.t) , ~: ~:; ~= I. E21 (tit) 11 EAI, H TI EAI I " TI EAI2 " TI"£AI1" +')V I (1'1) EzT--' E21 I I ~:~:~!: I, 2' Z7ttlt 2' : fKII _.J ZK : L- ff~ ~~ ,. ~~ ~~~:~ t • 11 INTA LTI) INT7 I.:TI) INTEl I.:- TC) INT' L" ~Ot R'W 2 ~DI ~ 7Itf~l't.. 7ItLS~7't E" Til) INH L Tit INT8 L- ~ Rr<!)~_---l_ _i..I> 02 RZCt) f:I If. 01 17 g~ R'{J)~9 ::::.~:",. Til) (NT2 l- :~ DC) Ff)(I) IS Tit OI"IR L' 0" Fl't(l) IZ 1- ___.J,.£,d I' i4-'i.~(1f T2 HALTL 2 loll '" T2 PF l.: I.t IAZ 1Y21t1 I In I" b~-----+=======t'~' ~AI ZYI Ip'!.._ _ _ _-=======~IAJ I A.. 1, .. 12 ~~ZA2 2Y2~ lit 17 ~: ,~ ~~! ~ 2 loll In 12 1'1 ly ... :~ ~A2 2Y2~'9 17 ~: ,~ ,. TI ED"' H TI EPI H --'lr!!s~>='----L-.l I" 18 IY2 It> f:I 8 'Alt IAl I 2AI 2Y1 z~ TIE(ASH If tA2 ~:~, 2~ H AI7H n Alt.H n AIS" Tl AI 't H n AI'" TJ .11:11 H nAil" nAIl" ~ T2DB7H~D7 12 DB b H~ Db 12 OBI) ~ DC; 12 De If ~ 04 ~ ~ PA7 n PAt> 38 3 01 ... 01 RClW 2 RUD') PAC; 702 RZOl b R3(t) Q RIt(l) ,q ... IA2 U. IV2 16 b 143 tV, Ilf 1A.,. IV .. 12 17 2A4 2Y4::1 ,Q 21AI ~ 03 FA ... 4ID PA::! I e 03 18 Olf T2DB2H--HOZ 17 0 ,) Rsm 1b IS 2A3 12 DB 1 12 08111 H~ rt~ PAZl PAI::I RMI) I') R1W 12 13 2A2 FB7r,i-- T4 Pe 7 H 12 PPI L~ cs 14 Db 07 DC ?BC;~ 14 pa'}'" -= 12 DB::! 01 0$ TI SAl2H~ AI TI SAL I H~ ~ PA'I~I.f., I~ TI E081N L - - f t ; ~D TI B(LRH---2.2 RESET "'81~ T4 PBI H TIEwRLL~W'R H~ T4 PC 7 PO T4 PC 6 H---1! PC6 T4PCI)~~P(Cj TI.iP(4H~f-(4 2'AI 4'A b IA~ PB2~T4P82H PB(II~T4peClH po.!.l.---- T4 PC ::I H P(2~ T4 PC 2 H pel~ T4PCIH pelJl~T4PC'H 2VI y"Q 74(c;lQ4(J IVI 'U, ,;~ 18 Ib 14 12 IV" 2n It2A2 I'ZAI ZVlif. T4 UAL J, RZZ 47 eZ4t T~iC; l~ ~~~b T2 AD I T4lDPl Cj _ R2Q 26 '+7 !~~1f R28t 47 T2 AD II): 1'1 T4LEL T4LDL T4 LC L T4 LBl T4 LAL TZA.DIZH DB TI) De:, 4 H IN414fL... T<; De:, 3 H IN4'4e T S De:, 2 H T<; DC:. 1 H D7 Db 7 b IN4, ... e INltl4e TI EWHS L Ifl . T4 PC 4 H 1 (14)"" loll ~., . T4 WHB L 121 - I T'-4 PC b H , I TI (RES l T2 AOl3H T2AOl4 tt T2 AD II) H 13 AI 0 H 13 AI 2 H n 13 AI '+ H 13 AI I) H AI 1 H 13 AI 3 H 13 AI 7 H T4 PB til H T4 PB I H T4 P8 Z H T4 PB 3 H T4 PB '+ H T4 PB C; H T4 PB 6 H T4 P8 7 H T2 HALT L T2 PF L T 4 Of1R L T4 INTS L T4 VEe L. T2 PI H '") , TZ ARD 3 l T'-4 RESET l T4 PC 7 H T2 ARC 11L T4 lACK L T2 Of1G L 12SEL.IH TlSELIIH T4 wLB L RN '" H T2 AD 11 H T2 ARDZ L ,. RI" RlB " T2 AD\) I + Sv T4 PC C; H 2 \04 HADe H T2 AD II H T4 RESET L 2. +I)V TZ AD 7 nAI 6 H E23 , 4J T4WlBL TtEDMC,H~ T I (OMC, L - r - - - . . . J B e D' T<) D6 , 1'1 ,,---., q DS IN41 ... I'")' E23 2_ +C)V~ JS H T2 AD ~ H T ... L() L. TI.i LF L ~ KEYPAD T4 UG l 14UFL T4 UE l T4 UD L 14 ue l 14 ue L 7 2V2~: ylQ VI 14 UDP L f4 7 . 47 1:~3 2Y4::1 _ t l7B 47 !~'7 ~ "t7 - 6 I A'" Ie:, 26 e fR" _ 17 244 1<; 2A~ L--- RIC; 2Y2~~T ~ej~ ~!R2r ~~t f 16 T4 PC3 H ~~Ib ~~7 zv, C; I 12AI EN peb~ 14 PSb H I l i pe ... ~ T4 .pe It H "'B1~ 14 pe::l H 1yl.l8 T 4 WHB L T2 RAS L R•• '" • Sv ,. R" o TI (lACK L I>" T Z CAS L RII T 2 DBIN L IK T2(OUTH T4 lACK L T2 ROv l UPPER NUMERIC DISPLAY UPPER RIGHT OIGET LEFT OIGEl ESO ES2 21: T4 UA L T4 UF L ". ", E"17 <3' e ~ T'5 0(' Cj H LOWER LEfT LOWER RIGHT OlGET DIGH ~A T4 LA L T4 LF L E.9 E" T"UOL c.A!!.\ I I" TCj oG 3 H T'5 oGIL H T4 ue, L T4 U( L '" ~ TCj 0(,4 H Te; oG 2 H Te; OG I H E" '"' 2 < T4 LOP L ""I ElO E'"' ' G II ( III 0 8 T4 LE L· T4 LG L T4 LC L TS OLS I LTI BCLR H I T'l DC" 0\ Til LD L T'5 tNT3 L JtHITlR~.,J re;INTZl BRClK S031 8a:iliHZ .:.') IIIIUF Ie;V TSOG3H T,DGZH· ~~ g~~: +" .,RlO 82<)1 T2007 H T208b H HOBS H ~ D7 D6 to O~ ". -12_~ ~12it DTR T2 08 4 H 2 T2 DB 3 H 1 r.z T2 Dez H T2D81H 28 r J T2 0811 H 27 Dil TZ PCI L II TI SAl. I H 12 c/D TI [OBIN L T I EwRl L R I< C 3 TI TCLK2H 21l ClI( TIBClRH ZI hfSfT rAEMPTv 16 TO; PoSR l 22 5SR SVN)fT BO t6 TO; PCTS L 17 ~TiC TO; SRCU< H ze; RiC " " .~Te;tNTbl cs Te;INT7l TI<O~Q T4 PC I H T4 PC 2 H T4 PC 3 H ~. 14. "e " 0 l l DH. m AUXIlL6.Rv ." J' Lu7K +" DTE CONSOLE R" 4,7K k" ~T'5DLSIL I~ l F"7 TO; Peso TO; PCSI R.b ~TC;LJGIH F2 T4 PC II H Te; PRTS L Te; POTR L '"r, +I~ ~Te;DGZH J TCj DL5 " L Te; LCLK H +IZV ".ro + ·To; BR(lK H ~Te;OGITH 7't14e; THRU en .1I47UF----j TO; INTF L :! ~ T[ST Z'VSS (z +r- RTClJ(')(I3S RTCU(bI 36 127 51 H " M +o;V e9 ~.:. BRKIRQ,H ZE -PBRI 31 -BRSCI H -BRSI 'Ie -BRSl. H T'OG ... H O~"RTRCI/IRG~ ~'l: 2" INIT A.NODE ~ I~ O!l.LI'5 18 DALIlt T2 08 13 H 17DALI3 TZD912H IbOALI2 T2 08 I I H 1'5 f"\ALI I T2DBIIH 14 DII.LI\1I T2 08 Q H J D.l.L<} T2 DB 8 H 12 D.3.L~ T2 DB 7 H I I OAL7 IQ DALb T2 08 b 1-1 9 0AL,) T2 D8 'l 1-1 E' O.~L4 T2 De 4 H 70AL3 T2 08 3 H b OAL2 T2 (;8 2 H T2 D8 I H S L'AL I .. DALII T2 DS (!. H U CLK TI DClK H I -RD TI EOBIN L· 3 -wLB TI ["liL8 L 2 -CS T2 DlART l TISAlZH 23 A2 TI SAL I H 22 A I 21 At ~""" (, II ( II ~D 7 FE T4 UoP L T4 UE L T2 DB I') 1-1 TZ08I41-1 .,R" ;~G FB II ~TSDG4H <9 R' 211. Te;POTAL~B \..!:>L---+- T C; DC, 3 H ~TC;OGo;H To;PRTSL~11 TS DLSO L Te; pcso ," R" l~to I.Z'I I. I. R", ,00 APPENDIXC ERROR MESSAGES C.l DIAGNOSTIC ERROR MESSAGES The following flashing error messages are displayed if the DCTII-EM fails its diagnostic tests. These are fundamental errors and must be corrected before you attempt to do anything else. UPPEA DISPLAY LOWER DISPLAY I I I I'I I I I IElll+1 I I I 121 I I I IElll+1 I I I'H I I I IEI'I'H'I I I I I I I Hll+1 3 1 1 MEANING RAM cha::ksum test failed. Try replacing RAM chips. ROM checksum test failed. Try replacing ROM chips. RAM and ROM checksum tests failed. Board may have major problems. DLAAT feedback test failed. Board may halle major problems. C.2 KEYPAD ERROR MESSAGES If the DCTII-EM detects an error while you are using the keypad, it displays a flashing error message on the upper and lower rows of LEOs. The upper row of LEOs displays a two-character error code and the lower row of LEOs displays: The entire error message disappears and the DCT II-EM is returned to register mode when you press the HALT switch or any key on the keypad. The keypad error messages are as follows. UPPER DISPLAY 111+111 111+111 LOWER DISPLAY MEANING You tried to e;o.:ecute a program With a BPT instruction In it. A break was detected on the console terminal pon while the keypad was active. C-I You tned to execute CI program with an invalid Instruction In It. YOu tried to execute a program and used an unacceptable value for the SP. See chapter 5 for more information. You tried to a!ter a protected location In the keypad monitor scratch pad (locations 7400 through 7776). C.3 CONSOLE MESSAGES The console displays 12 different messages (Table C-IJ. Most of these are error messages that indicate a problem with your input or with the execution of your program. This paragraph explains each of the messages and its probable causes. Some of the error messages are preceded by the portion of your input that caused the error. If this is the case, your erroneous input is displayed between backslashes on the line above the error message. C-2 Table C-l Console Messages Message Meaning BRANCH OUT OF RANGE You input a branch instruction which was too far from the branch destination. Recall that branch instructions have a range of -J28 to 127 (decimal) words. BREAK POINT ENCOUNTERED A breakpoint (81, 82, B3, or 84) or a BPT instruction was encountered while your program was executing. BUFfER OVERfLOW The console monitor was accepting input from a host and a line exceeding 96 characters was received. As with all errors generated during host loading. this error stops the OCT I I-EM from loading further input from the host. CONSOLE BREAK The BREAK key on the console keyboard was pressed. If you are executing a program, execution stops and the OCTJ I-EM internal register values at the time of the break are saved. If you arc in HOST, TALK, or LOAD modes. CONSOLE BREAK causes a return to NOHOST mode. INVALID INSTRUCTION ENCOUNTERED An invalid op code was encountered while your program was running. INVALID STACK POINTER The stack pointer did not have a value between 4 and 6500 (inclusive) when you started your program or when you single stepped. NOT IN USER RAM You attempted to alter a location that was in the protected mOnitor scralchpad area (locations 6500 through 7777, inclusive). ODD ADDRESS You attempted to access a full word in RAM on an odd address bounda~ Use the BYTE mode 10 examine or alter locations at odd addresses. REPEAT OF ZERO You input a REPEAT command that had a count of zero. TABLE fULL You attempted to define more than 66 symbols. UNDEFINED EXPRESSION You attempted to use an undefined parameter, operand. or other data object when a defined expression was required. For example, you referenced an undefined symbol while in PASS2 mode. WHAT'! You attempted to input a line that had a syntax error in it. C-3 INDEX A ABSOLU command, 4-7, 4-29 Address decoding, 6-6 Address pointer, 4-6 Address space, 5-13 standard RAM space, 5-15 expansion RAM space, 5-15 monitor space, 5-15 I/O space, 5-15 for external hardware, 5-16 reserved, 5-16 Altering memory with console, 4-10 with keypad, 3-10, 3-32 Altering registers with console, 4-5 with keypad, 3-4, 3-32 .ASCII command, 4-21, 4-29 B .BLKB command, 4-21, 4-29 .BLKW command, 4-21, 4-29 Breakpoints canceling with console, 4-20 canceling with keypad, 3-27, 3-32 displaying with console, 4-20 displaying with keypad, 3-20, 3-32 setting with console, 4-19 setting with keypad, 3-20, 3-32 Buffers, 6-5 .BYTE command, 4-21, 4-30 BYTE command, 4-7, 4-30 c Cancel breakpoints, 3-27, 3-32 CANCEL command, 4-16, 4-20, 4-30 CLEAR command, 4-14, 4-30 Connectors, 6-8 60-pin (J1), 6-8 through 6-9 auxiliary serial (13), 6-10 console serial (14), 6-11 power supply (J2), 6-10 Console altering memory with, 4-10 altering registers with, 4-5 command summary, 4-29 connecting a, 4-1 control commands, 4-3 default modes, 4-2, 4-21 entering programs with, 4-12 examining registers with, 4-5 examining memory with, 4-7 host loading with, 4-22 input rules, 4-2 monitor, I-I, 3-28, 5-1, 5-15 output formatting modes, 4-6 single stepping with, 4-17 transferring control to and from, 4-2 using breakpoints with, 4-19 using watch point with, 4-16 Console commands ABSOLU command, 4-7, 4-29 .ASCII command, 4-21, 4-29 .BLKB command, 4-21, 4-29 .BLKW command, 4-21, 4-29 .BYTE command, 4-21, 4-30 BYTE command, 4-7, 4-30 CANCEL command, 4-16, 4-30 CLEAR command, 4-14, 4-30 DELETE command, 4-14, 4-30 .END command, 4-26, 4-30 .EVEN command, 4-21, 4-30 EXIT command, 4-2, 4-30 GO command, 4-16, 4-30 HELP command, 4-21, 4-30 HOST command, 4-23, 4-30 INSTRU command, 4-7, 4-30 LOAD command, 4-24, 4-30 NOHOST command, 4-23, 4-30 PASSI command, 4-25, 4-30 PASS2 command, 4-25, 4-30 REPEAT command, 4-21, 4-31 SHOWMO command, 4-21, 4-31 SHOWRE command, 4-5, 4-31 SHOWSY command, 4-14, 4-31 .START command, 4-25, 4-31 STEP command, 4-17, 4-31 SYMBOL command, 4-7, 4- 3 I TALK command, 4-23, 4-38 VTOFF command, 4-3, 4-31 VTON command, 4-3, 4-31 .WORD command, 4-21, 4-31 CTRL/ A, 4-3, 4-24, 4-25, 4-32 CTRL/C, 4-3, 4-32 INDEX-I CTRL/O, 4-3, 4-24, 4-32 CTRL/Q, 4-3, 4-32 CTRL/R, 4-3, 4-32 CTRL/S, 4-3, 4-32 CTRL/U, 4-3, 4-32 CTRL/X, 4-3, 4-32 CTRL/Y, 4-3, 4-32 I INT switch, 3-25, 6-7 INSTRU command, 4-7, 4-30 Instruction format, 4-11 Interrupts, 5-5, 6-6 J D Jumpering, 2-4, 6-4 Default operating modes, 2-3, 4-2, 4-21 DCTII-AA microprocessor, 1-1,6-3 DELETE command, 4-14, 4-30 Directives, 4-20 Debugging, see Breakpoints, Single stepping, Watchpoints E .END command, 4-36, 4-30 EPROM,6-4 .EVEN command, 4-21, 4-30 EXIT command, 4-2, 4-30 Error Messages console, C-2 diagnostic, 2-4, C-I keypad, C-I Examining memory with console, 4-7 with keypad, 3-7 Examining registers with console, 4-6 with keypad, 3-2 Expressions, 4-3 K Keypad altering registers with, 3-4 altering memory locations with, 3-10 command summary, 3-32 entering programs with, 3-12, 3-16 examining registers with, 3-2 examining memory locations with, 3-7 monitor, 1-1,2-3,5-1,5-15 number system, 3-2 single stepping with, 3-17 special functions, 3-26 cancel breakpoints, 3-27, 3-32 go with LEDs, 3-27, 3-32 release protection, 3-30, 3-32 set baud rates, 3-28, 3-32 start console, 3-34, 3-32 using breakpoints with, 3-19 using watchpoint with, 3-22 L LOAD command, 4-24, 4-30 G GO command, 4-16, 4-30 Go with LEDs, 3-27, 3-32 H Host Loading configuration, 4-22 example of process, 4-28 preparing a loadable program, 4-25 the HOST command, 4-23 the TALK command, 4-23 HELP command, 4-21, 4-30 HALT switch, 3-24, 6-7 HOST command, 4-25, 4-30 M MACRO-II,4-20 Memory expansion module, 6-11 Monitor, 1-1,2-3,3-8,3-28,3-30,4-2,5-1, 5-15,6-4 Monitor subroutines, console, 5-8 through 5-13 ASCOUT,5-9 CHR02,5-9 CHROUT,5-9 CRLF,5-9 GETCH,5-9 GETCHC, 5-9 GETLIN,5-8 GETNXT,5-9 INDEX-2 PRINTA,5-9 TYPDEC, 5-9 TYPOCT,5-9 using, 5-10 keypad/LED, 5-2 through 5-8 BCDKEY,5-3 DECDSP, 5-3 DGDISP, 5-2 GETKEY, 5-3 GETNUM,5-4 LOBLNK,5-3 LODISP, 5-3 UPBLNK,5-3 UPDISP,5-3 using, 5-4 N STEP command, 4-17, 4-31 Subroutines, see Monitor subroutines SYMBOL command, 4-7, 4-31 Symbols defining, 4-14 deleting, 4- I 4 displaying, 4-14 symbol name rules, 4-13 Symbol table deleting, 4- I 4 displaying, 4-14 System specifications, I-I T TALK command, 4-23, 4-31 Timing, 6-7 Traps, 6-6 NOHOST command, 4-23, 4-30 U p User LED, 3-25, 5-5 PASS I command, 4-25, 4-30 PASS2 command, 4-25, 4-30 Peripheral chips, 6-4 address decoding, 6-6 auxiliary serial line (825IA), 6-5 DLART console serial line, 6-5 parallel port (8255A), 6-4 reserved locations for, 5-15, 6-4 Processor status word, 3-2 Power supply cable, 2-1 connector, 2-2, 6-8, 6-10 requirements, 2-1 R v VTOFF command, 4-3, 4-31 VTON command, 4-3, 4-31 W Watchpoints canceling with console, 4-16 canceling with keypad, 3-27 displaying with console, 4-16 displaying with keypad, 3-20, 3-22 setting with console, 4-16 setting with keypad, 3-22 ,WORD command, 4-21, 4-31 RAM, 6-5 Release protection, 3-30, 3-32 REPEAT command, 4-21, 4-31 S Set baud rates, 3-28, 3-32 SHOWMO command, 4-21, 4-31 SHOWRE command, 4-5, 4-31 SHOWSY command, 4-14, 4-31 Single stepping with console, 4-17 with keypad, 3-17 Stack pointer, 2-3, 3-2, 5-2 .START command, 4-25, 4-31 Start console, 3-28, 3-32 INDEX-3
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies