Digital PDFs
Documents
Guest
Register
Log In
DEC-15-YWZA-DN1
April 1970
70 pages
Original
2.4MB
view
download
Document:
DDT
Dynamic Debugging Technique
Order Number:
DEC-15-YWZA-DN1
Revision:
Pages:
70
Original Filename:
http://bitsavers.org/pdf/dec/pdp15/DEC-15-YWZA-DN1_DDT_Apr70.pdf
OCR Text
dynamic debugging technique digital equipment corporation DEC-15-YWZ.~-DNI ADDENDUM #1 TO PDP-l5 UTILITY PROGRAMS f1ANUAL DDT DYNAMIC DEBUGGING TECHNIQUE, UTILITY PROGRAM NOTE THIS MANUAL IS A COMPLETE REPLACEMENT FOR THE DDT SECTION OF THE PDP-15 UTI LI TY PROGRAMS r1ANUAL PRINTED OCTOBER 1969 FOR ADDITIONAL COPIES, ORDER No. DEC-15-YWZA-D~1 FROM PROGRAM LIBRARY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754 i PRINTED APRIL 1970 COPYRIGHT (C) 1970 BY DIGITAL EQUIPMENT CORPORATION THE MATERIAL IN THIS MANUAL IS FOR INFORMATIONAL PURPOSES AND IS SUBJECT TO CHANGE WITHOUT NOTICE. THE FOLLOWING ARE TRADEMARKS OF DIGITAL EQUIPMENT CORPORATION MAYNARD, MASSACHUSETTS: DEC PDP FLIP CHIP FOCAL DIGITAL COMPUTER LAB ii PREFACE Prerequisite In the preparation of this manual, i t was assumed that the reader is familiar with the Advanced Software System; e.g., its Monitor and utility Programs, etc. PDP-15/20/30/40 ADVANCED MONITOR SOFTWARE SYSTEM MANUAL, DEC-IS-MR2B-D This manual provides descriptions of system programs including discussions of: languages, utilities and application, operation , core organization, and input/output operations within the Monitor environment. PDP-IS UTILITY PROGRAMS MANUAL, DEC-IS-YWZB-D The PDP-IS Utility Programs manual is comprised of a set of individual manuals, each of which describes the operation and use of a PDP-IS Utility Program. The manuals which make up the Utility Program set are listed in the following Application Guide. In addition, the guide also indicates the order number of each manual and the specific PDP-IS Monitor Software Systems in which the program described may be used. The Utility Manuals may be ordered either individually, by using the title and order number given with each manual or as a set by referencing JlpDP-lS Utility Programs Manual, DEC-IS-YWZB-D JI • iii APPLICATION GUIDE PDP-15 UTILITY PROGRAM MANUALS PDP-15 Utility Program Manuals and the Application of Each Applies to Monitor: Manual Title I Order Number (DEC-15-YWZB- DDT Utility Program DNl CHAIN & EXECUTE Utility Program DN2 SGEN ADVANCED Monitor DN3 MTDUMP Utility Program DN4 PATCH Utility Program DN5 EDIT utility Program DN6 UPDATE Utility Program DN7 LINKING LOADER DN8 PIP ADVANCED Monitor DN9 PUNCH Utility Program DN10 SRCCOM Utility Program DNll SGEN BASIC I/O DOS ADV B/F .; .; .; .; .; .; .; .; .; .; .; .; .; .; I .; .; I I I I / .; .; I .; .; .; .; I I DN12 I! I I DOS Monitor PIP DOS Monitor DN13 Disk SAVE/RESTORE Programs DN14 I I / I I ~ / .; iv I .; I CONTENTS SECTION 1 INTRODUCTION 1.1 General Information 1-1 1.2 Operation 1-1 1.3 Conventions and Special Symbols 1-2 SECTION 2 BASIC DDT 2.1 Loading DDT and User Programs 2.2 Examining Storage Words 2.2.1 Opening a Location 2-2 2.2.2 "Last-Opened-Register Pointer" 2-3 '2.2.3 Closing/Reopening Locations 2-3 2.3 2-1 Type-out Modes 2-3 2.3.1 Address Modes 2-4 2.3.2 Instruction Modes 2-4 2.4 Retype Commands 2-5 2.5 Modifying Storage Words 2-6 2.6 Input Modes 2-6 2.7 Sequencing 2-6 2.8 Breakpoints 2-7 2.8.1 Setting Breakpoints 2-7 2.8.2 Breakpoint Restrictions 2-8 2.8.3 Breakpoint Type-Out 2-8 2.8.4 Reassigning and Removing Breakpoints 2-8 2-8 Proceeding After a Break 2.8.5 2.9 Starting a Program 2-9 2.10 Stopping a Program 2-9 2.11 Errors 2-9 SECTION 3 DDT LANGUAGE AND SYNTAX 3.1 Command Structure 3-1 3.2 Arguments 3-1 3.2.1 Syllables 3-2 3.2.2 The Symbol Table 3-2 v 3.2.3 Expressions 3-4 3.2.4 Symbolic Instruction Mode Octal Number Mode Transfer Vector Mode 3-6 ASCII Text (Output Only) 3-8 3.2.5 3.2.6 3.2.7 SECTION 4 3-7 3-7 DEBUGGING WITH DDT 4.1 4.2 Loading a Program Starting a Program 4-1 4-1 4.3 4.3.1 4.3.2 4.3.3 4.3.4 4.4 Register Examination and Modification Type-Out Mode Commands Special Symbols and Concepts Register Examination Commands Expression Retype Commands Defining a Symbol 4-2 4-2 4.5 4.6 Search Operations Breakpoints 4.6.1 4.6.2 Definition Setting Breakpoints Breakpoint Restrictions Flow of Control at Breakpoints What Happens on a Break The Execute Command Patch File Input and Output Mass Storage Dump Paper Tape Patch Files Miscellaneous Features 4.6.3 4.6.4 4.6.5 4.6.6 4.7 4.7.1 4.7.2 4.8 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.9 Operate Link and AC Make Subprogram Current (Header Command) Initialize Memory Loading DDT Without a Program Restarting DDT Typing Mistakes Protect Mode Commands Error Recovery vi 4-2 4-5 4-6 4-8 4-9 4-11 4-11 4-12 4-14 4-15 4-18 4-20 4"':22 4-22 4-22 4-23 4-23 4-23 4-24 4-24 4-24 4-24 4-24 4-25 A. C"'" .. ..._ _ _ _ .. .,. _..s= nnm ,, _____ ..:J_ vu..i.lULiaJ..:t U.L lJlJ.l. ~UHU.llCl.iJ.U~ Expression Operators ", , rl.L-.L Al-l B. Instruction Mode Commands Al-l C. Address Mode Commands Al-l D. Special Addresses in DDT Al-l E. Special Addresses in User's Program (Not Searched F. on Output) Al-2 Contents of Special User Locations Al-2 G. Defining a Symbol Al-2 H. Starting a Program Al-2 I. Breakpoint Commands Al-2 J. Register Examination and Modification Al-3 K. Word Searches Al-3 L. Patch File Commands M. Other DDT Commands Al-4 N. Error Messages Al-4 O. Special DDT Symbols Al-5 (I/O Monitor System Only) Al-4 APPENDIX B Mnemonic Instruction Table A2-1 APPENDIX C Patch File Format A3-1 APPENDIX D DDT Memory Load Maps A4-1 Symbols Used in Text and Examples 1-2 TABLES 1-1 vii SECTION 1 INTRODUCTION 1.1 GENERAL INFORMATION DDT (Dynamic Debugging Technique) is a conversational system program which is available in the PDP-9/PDP-15 ADVANCED Software Systems. It provides both MACRO and FORTRAN programmers with a convenient means for debugging and closely monitoring the operation of their programs. DDT commands entered via the Teletype{R) permit the user to: 1) start a program, 2) suspend its execution at predetermined points, ine the status of memory words, and 4) make additions and corrections using either symbolic or octal code. Under most circumstances the user will be able to stop a "runawayli program. DDT always resides in core with the programs to be debugged, and may be considered as being both a program supervisor and a binary editor. The type of the input information required by DDT or output (printed) from DDT the user to be familiar with machine language programming. mat of DDT Teletype requires The for- input and output is similar to the format used by the MACRO assembler. 1.2 OPERATION When the appropriate request is typed to the Monitor, DDT is loaded into memory (the top 1600 locations) along with the Linking Loader. 10 Upon command the Loader relocates and loads the user's main program and subprograms (including symbol table if requested), all requested user library subroutines, all requested I/O device handlers, and all requested Fortran Object Time System routines. After loading has been accomplished, the Loader transfers control to DDT. DDT uses the Monitor to communicate with I/O device handlers and to trap errors during program execution. While DDT is running, Program Interrupt and (if available) Automatic Priority Interrupt are enabled. The user converses with DDT via the Teletype l Teletype I/O is done almost exclusively one character at a time in Image alphanumeric mode. This enables the DDT language to contain simple, concise commands. {R)Teletype is a Registered Trade Mark of Teletype Corporation, Skokie, Illinois. lIn the Background/Foreground System, DDT operates only in the Background and communicates with the user via the Background Control Teletype. 1-1 1.3 CONVENTIONS AND SPECIAL SYMBOLS Table 1-1 lists special symbols which are used throughout this manual to represent Teletype Keyboard Operators. NOTE In examples simulating TTY entry/response operations, the character or text to be entered by the user is underlined (e.g., xxx) to distinguish it from printed output. --Table 1-1. Symbols Used in Text and Examples TEXT SYMBOL TELETYPE ECHO KEY(S) TO BE ACTUATED ) Non-Print RETURN Carriage-Return and Line Feed Non-Print SPACE Bar Carriage is advanced one character space Non-Print LINE FEED Platen is advanced to next line Non-Print SHIFT and I/TAB Moves carriage to next tab location (normally 8 spaces) t t SHIFT and N/ Control entry defined within programs t plus a character (e. g. , t T) Char CTRL and Character Key CTRL & T Initiates a program or system control operation defined within the system $ $ ALTMODE Terminator whose use is defined within the system program SHIFT and K/VT Use defined within program SHIFT and Use defined within program + tT OPERATION INITIATED M \ \ Character Rubout SHIFT and L/FORM 1-2 SECTION 2 BASIC DDT This section introduces the main features of DDT to the uninitiated user. Many programs can be successfully debugged using only the basic commands described below. More detailed descriptions of the basic com- mands and other less frequently used commands are given in later sections. To simplify "the information presented in this section it is assumed that only the main program of the user's system is to be tested, even though subprograms and library programs may also have been loaded and linked to the main program. This assumption avoids having to describe, at this point, how symbols in one program are differentiated from identical symbols in another program. 2.1 LOALING DDT AND USER PROGRAMS In a basic Monitor (paper tape) environment, the Linking Loader is an integral part of the DDT tape. In the ADVANCED Monitor, or Background/Foreground Monitor, the Teletype command DDT (or DDTNS) calls the Linking Loader as well as DDT (DDTNS prevents loading of the user symbol table in order to save memory) . The first response to the Teletype , in the I/O and Keyboard Monitor systems is: LOADER > In the Background/Foreground system the Background Linking Loader prints: BGLOAD > The user program is then loaded by typing a command string to the 1 Loader. lRefer to sections 2.1 and 2.2 in the section on the Linking Loader in the utility Programs Manual (DEC-15-MR3A-D). Refer to the Background/ Foreground System Manual (DEC-9A-MRZA-D) for a description of the Background Linking Loader. 2-1 When loading is complete, DDT takes control and types: DDT > to indicate its readiness to accept DDT commands. NOTE NS is printed before DDT if the symbol table could no~ be loaded into available core. In the ADVANCED Monitor system, .DAT slots -4 (user programs), -5 (user external library, if any), and -1 (system device for loading of DDT and system library routines) must be assigned to appropriate devices for proper loading. This applies also to the Background/Fore- ground system with the exception that the system libraries are accessed from .DAT slot -7, which cannot be altered by the user. In the I/O Monitor system, DDT with patch file capabilities utilizes .DAT slot -10 for patch file input and .DAT slot -6 for patch file output. 2.2 EXAMINING STORAGE WORDS To examine the contents of a core word location, the user must "open" the desired location, receive printout of its contents, and, when finished, "close" the location. 2.2.1 Opening a Location TO operi a storage word, 'the user must type its address terminated immediately by a slash (/). EXAMPLE: To open location ADR+l, type: ADR+l/ DDT responds to an "open" entry by performing a tab operation, printing the contents of the addressed location and performing a second tab. EXAMPLE: Entry Response ADR+l NOTE The above examples assume that the program's symbol table is available to the user; if not, the user must enter the location address in an OCTAL form. 2-2 2.2.2 "Last..".Opened..,-Register Pointer" Once a location is opened, DDT sets its address into a special pointer register termed the HLast-Opened-Register-Pointer ii • The pointer is represented in DDT by a period (.)i thus when location ADR+l is opened the pointer (.) is set to its address 2.2.3 (i.e., .=ADR+l). Closing/Reopening Locations Opened registers are closed by entering a carriage-return/line-feed ( ~). EXAMPLE: -f I.M:L,Tll1P-S -I ) ADR+ 1/ The last-closed register may be reopened at any time by using the IILast-Opened-Register Pointer" (.). The pointer symbol is typed fol- lowed immediately by a slash (/). EXAMPLE: DDT responds to a "reopen" entry by reopening the register whose address is stored in the pointer location and printing its contents. EXAMPLE: If ADR+l as given in the preceding examples was the last opened register, the reopen procedure would be: Entry Response ~/ 2.3 ~LACL-I TEMP-S-J TYPE-OUT MODES The examples of 2.2 show DDT typing out the contents of a register in symbolic form (i.e., a symbolic instruction with an address field relative to a symbol). sumed by DDT. The symboL~c This is the type-out mode initially as- All numeric quantities are printed in octal. mode is ~seful if the user expects the opened register to contain a machine instruction. However, that register might be inter-" l preted instead, as octal data, as a transfer vector , or as symbolic text. Additional commands to DDT are available which specify the form IThe term transfer vector means a word which contains a IS-bit address pointing to some other register in core. Transfer vectors are used with indirect machine instructions because memory reference instructions cannot directly access 32K of memory. 2-3 in which data is to be interpreted and printed. These mode commands may be typed whenever control is in DDT and it is waiting for typed input. 2.3.1 Address Modes There are three address mode commands: Typed Symbols Meaning Print addresses in symbolic form relative to a symbol with the closest value, e.g., ADR+l. Print addresses as absolute octal numbers (IS-bit value) . Print addresses as octal numbers relative to the lowest register in the program. F signifies "floating" addresses, which correspond to the unrelocated values one sees in an assembly listing. These addresses are printed as a pound sign (#), representing the program's load address, a plus sign (+), and an octal constant. For example, ADR+ IMLA,C 2.3.2 #+ 3 3~ Instruction Modes Four instruction mode commands specify the form in which the contents of opened memory words are printed. Meaning Command Print symbolic instructions; if the instruction is a memory reference instruction, the address field will be printed according to the current address mode. Interpret words as transfer vectors, ignoring the high-order three bits. Print the IS-bit value as an address in the form dic~ated by the current address mode. $0 Print words as octal quantities. mode has no effect. The current address Interpret data as packed 5/7 ASCII (lOPS ASCII) text. When a register is opened for examination, the contents of both that register and the following register are printed as five ASCII characters. EXAMPLE: Assume that registers ADR and ADR+l contain, respectively, 206613 and 155102 octal. 2-4 >§Y > ADR/ ~ LAC TEMP > ADR/...j LAC #+ 4 2 > ADR/ -+I LAC 6613 > ~~~~·1 ~.;s r ~~MP > nUL\./ ~ £.UOO..L..) > ADR/ ~ TEMP > ADR/ ~ #+42 > ADR/ -+I !XYZ! -+I -tI .-.\ ~ ..., -"I -.! ~ Since #+42 is equivalent to the IS-bit value 6613, the relocation factor (#) is 6613-42 = 6551. 2.4 RETYPE CO~M~~DS Often, while examininq reqisters in the prevailinq type-out mode, the user finds data which should be interpreted in a different mode. DDT permits the user to request that the data be retyped in another form, without changing the setting of the current mode. There are four retype commands which, if no expression is typed immediately preceding these commands, use as their argument the value of the last expression typed out by DDT. Retype Command Meaning Retype the value as an octal number Retype the value as a symbolic instruction Retype the value as a transfer vector Retype the value of the contents of locations . and .+1 interpreted as a 5/7 ASCII text string. ? EXAMPLE: Assume that register TEMP is absolute location 6613 and XYZ is absolute location 26613. Entry Response >$R) >$0) >ADR/ -t 226613 Entry Response -I ~LAC* TEMP ~ -I-=.. XYZ -I -'i ~ %XYZ% ~ or >ADR/ ~2266l3 or >ADR/ 4226613 or >ADR/-.=OOOOOO 2-5 2.5 MODIFYING STORAGE WORDS Once a word has been opened, its contents may be changed by typing the desired new contents immediately following the type-out produced by DDT. A carriage return terminator commands DDT to make the indicated modification and to "close" the word. ABC-2/ 4JMP BEG ~JMP For example, BEG+2) After being closed, register ABC-2 contains JMP BEG+2. If the regis- ter had been closed without typing a modification expression, it would retain its old contents. NOTE DDT does not permit the user to modify all core locations in order to prevent him from inadvertently modifying the Monitor or DDT itself. Should the user attempt to do so, DDT will respond by typing a question mark. When a user types an expression to DDT, as in the preceding example, it should follow the same format as is recognized by the MACRO assembler. However, instruction and address fields cannot be separa- ted by a tab (-f) as allowed in MACRO. 2.6 INPUT MODES There are no input mode commands. Type-out modes are necessary .. since DDT cannot guess which form the user considers most appropriate. Where DDT expects an address quantity, user-typed expressions, such as, ADR+3, are evaluated by DDT and truncated to IS-bit values. wise, they are taken as 18-bit values. Other- There is no provision for typ- ing in data to be interpreted as 5/7 ASCII text. 2.7 SEQUENCING Once a register has been opened and (optionally) modified, it is sometimes convenient to be able to open some other register without having to close the current register and type the address of the new register followed by a slash. (a) DDT contains sequencing commands which modify the open register if an expression was typed, that register, and (c) open a new register. (b) close A few of these sequencing commands are listed below: Command Meaning Opens the next sequential register t Opens the preceding register. Opens the register in the same memory bank or page as directly addressed by the address partl of the last expression typed in or out. IThe indirect and index bits are ignored. 2-6 EXAMPLE: The following illustrates the usefulness of these commands. ADR/ -;.J ADR+l 4 ADR+2 -+j -+I TV+l 4 TV -1 LAC L...J TEMP+ 1 DAC L...J rEMP 2 JMS*L-I TV CAL * L...J ARG-IO DACL-INTX CAL * L..IARG-l 0 Opens registers ADR, ADR+l and ADR+2 l Opens register addressed ~by contents of ADR+2 $Y/ ~ I I -=- SUBRl-l...±..7 t ---.y Retype the value of the lastopened register as a Transfer Vector and open the addressed register ____~Openthe register preceding the last opened register 2.8 BREAKPOINTS One useful testing of DDT is its ability to start execution of the user's program and, if one of several pre-set control points in the program is reached, to suspend execution and "break" to DDT control. Such control points are called "breakpoints". symbolized by the command: 2.8.1 Breakpoints are $B. Setting Breakpoints DDT allows up to four breakpoints which are entered as numbers 1, 2, 3, and 4. EXAMPLE: To set a breakpoint at location ADR, the user types ADR$B (no number assigned) or 2iADR$B (#2 assigned) When no breakpoint number is given, DDT chooses, if available, a breakpoint not in use and assigns its number to the entry. When the command is given to start execution of the user's program, DDT replaces the contents of the assigned break registers with the instruction JMS* 17, where register 17 is an auto index register which contains a return pointer to DDT. DDT can be made, if necessary, to use some other autoindex register. 2-7 2.8.2 Breakpoin~_HR~st!ictions Because breakpoint registers are modified so that control can return to DDT, they should not be set on registers whose contents are programmodified or which are used as literals. The user should refrain from placing breakpoints on CAL and XCT instructions until the implications discussed in Section 4 are understood. 2.8.3 Breakpoint Type-Out When a breakpoint is reached during program execution, control is returned to DDT, which a) restores the original contents of all breakpoint registers, b) prints the number of the breakpoint causing the break, and c) prints the value of the contents of the Accumulator at the time of the break. DDT automatically saves and restores the contents of the Link and the AC when a break occurs and when resuming program execution. The user may examine and modify the saved contents of AC and Link by opening registers A# and L#, respectively, e.g., >A#/ >L#/ -l 777777 -I -t 000001 -I NOTE The instruction replaced by the breakpoint instruction is not executed when the break occurs. It is executed only when execution proceeds after a break (see 2.8.5). 2.8.4 Reassigning and Removing Breakpoints Breakpoints may be reassigned or removed as follows: 2.8.5 a) To reassign a breakpoint, simply type in a new assignment statement using the new address; DDT automatically deletes the previous assignment. b) To remove all breakpoints, type: c) To remove a specific breakpoint, for instance, breakpoint 3, type: Proceeding After a Break After a break occurs, program execution may be resumed by typing: The instruction which is located at the breakpoint is simulated by DDT (except CAL and XCT) and execution proceeds from the register following the breakpoint. 2-8 2.9 STARTING A PROGRAM The command ADR$G will cause DDT to give control to the user's program and to GO to location ADR. If no argument is specified, the command $G will go to the starting address of the program. 2.10 STOPPING A PROGRAM In spite of the fact that the user may have judiciously set breakpoints in a program, execution may never reach those points if, for instance, the program enters an infinite loop. The user may brea~~ out of such a loop and return control to DDT by typing the character CTRL T (iT). 2.11 ERRORS If a typing mistake is made by the user and DDT has not taken action, typing either RUBOUT or CTRL U will erase the entire input and allow it to be retyped. If control is returned to DDT, causing it to print DDT and version number, an illegal action was specified by the program either by having a breakpoint in a routine operating with interrupt off or by obtaining a Monitor error. If an error of this type occurs, the user program must be restarted from the beginning. If a user enters an undefined symbol as part of a command string, DDT will type the letter U and will ignore the entire string. When- ever the user attempts to perform an illegal command, DDT responds by typing a question mark (?). 2.,..9 SECTION 3 DDT LANGUAGE AND SYNTAX This section describes the rules governing the formation of DDT commands and of expressions, which are used as arguments for these commands. 3.1 CO!-!HAND STRUCTURE DDT commands take none, one, or two arguments, depending on the specific command. When two arguments are required, they are separated by a semicolon or by an open (left) parenthesis. mand's arguments always precede the command characters. A com- The command may be either a single control character (such as i, =, or I), or the character ALTMODE (echoed as $) followed by another character, such as, $A, $T, or ~. The following examples illustrate the forms which DDT commands may take: Isingle argument commands Ino argument $B Iboth args missing [two required for B] arg$B larg 1 missing argi$B larg 2 missing argi arg$B Iboth args Note that the $B command is shown four times. arguments. It requires two In the absence of either or both arguments, DDT supplies a predefined value as a default argument for each missing argument. The default arguments used depend on the specific command which they accompany. If DDT cannot recognize a command string, it will type a ? and ignore the string. Appendix A contains a detailed list of the commands which are recognized by DDT. 3.2 ARGUMENTS Arguments to DDT commands are, in general, symbolic expressions which consist of syllables (symbols or numbers) separated by operators. 3-1 3.2.1 Syllables A syllable may consist of one to six characters from the radix 50 octal character set: a) b) c) d) A thru Z 0 thru 9 period (.) % and # The special characters single and double quote (' and ") may occur anywhere within a symbol. on. Their significance is explained farther Syllables are delimited by any non-radix-50 character. A symbol must contain at least one non-octal character; otherwise, it is taken as an octal number instead of a symbol. Since DDT inter- prets all numeric input, and outputs all numeric output, in octal radix, the digits 8 and 9 are treated as an extension of the alphabet. In a symbol of more than six characters, all characters beyond the sixth are ignored. In a number of more than six octal digits, the last six digits are retained and those digits preceding the last six are discarded. The following illustrates symbols and numbers: ITEM 3.2.2 TYPE INTERPRETATION 8 A symbol 8 is not an octal digit. %1.# A symbol • % and # are radix 50 characters. lA A symbol Symbols need not begin with a letter. 123456A A symbol Although the A is discarded because it is the 7th-character, its presence declares the character string to be a symbol. 123456Z A symbol Same symbol as 123456A since only the first six characters are retained. 7 A number Same as 000007. 1234567 A number Same as 234567 since the 1 is discarded. The Symbol Table In order to evaluate symbols within an expression, DDT must find the symbol and its definition in a symbol table (see memory map in Appendix 4). This symbol table has two parts: one part contains the definitions of standard machine instruction mnemonics (e.g., LAC=200000, ADD=300000), the definitions of special DDT symbols 3-2 Ce.g., A# [the saved accumulator] or L# [the saved Link]) I and the definitions of symbols created by the user in commands to DDT. This part of the symbol table resides in the area of core occupied by DDT. The second part of the symbol table resides in lower core and is built there by the Linking Loader. It consists of several groups of internal symbol definitions, one group for each user subprogram loaded. A "header" at the beginning of each group gives the subprogram's file name and its load address (relocation factor). (If the command $DDTNS is given to the Monitor, the Loader will store the headers in the symbol table, but not the internal symbols. This is done to save core space.) Subprograms may have internal symbols which are also used as internal symbols in other subprograms. Thus, the same symbol may appear sev- eral times in the DDT symbol table, each time with a different value. The following explains how DDT, in the face of multiple-symbol definitions, decides which value to assign to a symbol when it appears in a user-typed expression. Normally, DDT searches the entire symbol table for the symbol and its 18-bit value and takes the first match it finds. bol table in the following order: (2) the special DDT symbols, time, (1) DDT scans the sym- the instruction mnemonics, (3) the user symbols defined at run- (4) the symbols for the "current subprogram", and (5) the sym- bols in all other subprograms. Initially, the current subprogram is defined as the main program (the first to be loaded - the first to appear in the Loader's command string). The concept is that one normally debugs one subprogram at a time; therefore, it is natural that when the user types a symbol SYM, he is referring to SYM as defined in the subprogram on which he is currently working and not as defined in other subprograms. The user can, by using the header command ($H), define any subprogram as being "current" thus controlling the manner in which a symbol is defined by DDT. The special character single quote (I), which may appear anywhere within a symbol, declares the symbol to be a file name. The value of such a flagged symbol is the relocation factor for the subprogram with that file name. In such a case, DDT only searches for a header with a matching symbol. The special character double quote (H), which may appear anywhere within a symbol, declares that symbol to be an address tag. Speci- fically, it declares the symbol not to be an instruction; thus, DDT 3-3 will bypass the instruction mnemonic table when searching for the value of such a symbol. This provision is made because it is legal, in the MACRO assembly language, to define address tags which have the same mnemonics as instructions, e.g., JMP JMP, where the second JM~ is an address. So, for example, if the user wishes to examine a register labelled JMP, he types the following to DDT: Both' and are flags (not to be confused as bei~g symbol constituents) much as the character # in MACRO may be located anywhere within II a symbol to declare it to be a variable. Within an expression, any symbol following a space is treated as if it contained the double quote (") flag, that is, treated as an address tag. Thus, for example, in JMP 3+ADR the search for symbol ADR bypasses the instruction- mnemonic table. The special characters ' and octal numbers. II are ignored when they appear within NOTE Symbols defined in a MACRO program by the use of (as in SYM=IOO) are not passed on to DDT in the user's symbol table. The user should be aware that FORTRAN IV passes local symbols to DDT which are identical to global symbols. In each case these local addresses contain transfer vectors which are equal in value to the corresponding global symbol. These transfer vectors exist as long lists toward the end of FORTRAN programs and are used in the same way that MACRO uses external global transfer vectors. The preceding text discussed evaluation of symbols typed by the user. When DDT prints out expressions (for example, the contents of an opened register)~it must perform the inverse process of taking a numeric value and converting it into symbolic form, usually involving a symbol table search. The output form is determined by the prevailing type-out modes and is discussed below. . 3.2.3 Expressions Expressions consist of one or more syllables separated by operators and terminated by a character which is neither a legal syllable constituent nor an operator. When calculating the value of a user-typed 3-4 expression, DDT evaluates the expression from left to right, combining values according to the intervening operators. ASCII text, which can be output by DDT, cannot be input by the user and is, therefore, not considered as a form of input expression. An expression may, of course, consist of only one syllable. DDT assumes, when evaluating an input expression, that the expression is preceded by 0+. two~argument in a This implies that the value of the first argument command is zero when the argument separator is typed with no preceding argument, e.g., ;ADR$B is equivalent to OiADR$B . If the argument separator is missing, DDT supplies a default argument. The following operators define the ways syllable values may be combined. OPERATOR + MEANING Add the two values in two's complement arithmetic (overflow is ignored) Add the two values in two's complement; but, from now until the end of the expression, do not change the instruction part of the accumulated value (bits o through 5) • * Add the two values in two's complement and "exclusive or" the result with 20000 (the indirect bit). (Overflow is ignored). Negate the following value if this is a unary minus. Otherwise, subtract the following value from the preceding value in two's complement. (Overflow is ignored. ) & , Form the "AND" of the two values bit by corresponding bit. Form the "exclusive or" of the two values bit by corresponding bit. Form the '~nclusive or" of the two values bit by corresponding bit. The following subheadings describe input and output expression according to the various type-out modes. Note, however, that the pre- vailing type-out modes have no bearing on user-typed expressions. 3-5 3.2.4 SX~olic Instruction Mode To obtain the relocated value of any instruction in the current program as loaded by DDT, the user may type an expression identical in most respects with the original MACRO instruction. If all the symbols are defined in the original program, new instructions may be formed. Tab, however, may not be used to separate OP code from address field (space is used exclusively). The following are legal instructions, provided that the addresses are defined: 1. JMPL..,IJMP (JMP is an address in the current program) 2. DAC....,l+AD (Although AD evaluates to 15 bits, only 13 bits are used because of the space) 3. CLA!CLL 4. EAE+1002 (DDT does not contain EAE mnemonics) S. IOT+314 (DDT does not contain lOT mnemonics) 6. IAWL..,I-l (Same as LAW 17777) 7. XCT*L..,IAD 8. LAC L..,I C,X 9. CAL ..... 77S 10. AASL..,I,...l (PDP-IS only; indexed instruction) (PDP-IS only; once AAS, AAC, AXS, or AXR is encountered, the remainder of the expression will not alter the value of bits 0 through 8.) On output if DDT is in symbolic mode, the following procedure is used to output an expression representing an 18 bit computer word: the instructions are broken down into categories appropriate to their OP codes. 1. If the OP code (bits 0-3) is 00 (CAL), the instruction is output as an octal number with leading 0 suppression (e.g., 77S) • 2. If the OP code is 74 and the indirect bit is off, the instruction is output as an inclusive ORed microcoded operate instruction (740000 types out as NOP, 7S4000 as CLA!CLL). 3. If the OP code is 74 and the indirect bit is on, the instruction is output as LAW L-rN, wher~ N is an octal' number representing ·the two's complement of the instruction (e.g., LAW~-l for 777777). 4. If the OP code is 64, the instruction is output as EAE+N, where N is an octal number representing bits 4-17 of the instruction (e.g., EAE + 1002 for LACQ). If the DDT symbol table contains an exact match, that match will be output. SA. On a PDP-IS, the OP code 70 must be broken down further (an exact match in the DDT symbol table will be output as in 4). If the instruction is an AAS, AAC, AXS, or AXR instruction, the corresponding mnemonic followed by space would be output, followed by bits 9-17 as a signed octal number. Otherwise, the number would be output as IOT+N, where N is an octal 3-6 number representing bits 4~17 of the instruction, IOT+314 for IORS and AAS~l for 720001) • (e.g., SB. If the computer is not a PDP-IS, the OP code 70 is output (if no exact match is found) as IOT+N. 6. The remaining OP codes are memory reference instructions. The corresponding instruction mnemonic is output. If the indirect bit is set, a * is output following the mnemonic. Then a space is typed, followed by the 15 bit address referred to directly by the instruction, typed in the current address mode. The bank bits for the address are the same as the bank bits of IIpointll (the address of the last opened register), unless an auto-index register is referred to indirectly (e.g., LAC*~lO). On a PDP-IS, the index bit is checked. If the index bit is set, the address is followed by IX. The following are exa~ples of memory reference instructions printed by DDT: 1. JMP~JMP (JMP is an address in the current program) 2. DA~D+l (Relative address mode) 3. XCT*~AD 4. LAC~,X (PDP-IS only) 5. DAC~2l2S3 (Last opened register is in bank 1; absolute address mode; same as 041253) 6. DAC L...J# + 2 (Floating address mode; address relative to beginning of current program [#]) 3.2.5 Octal Number Mode The conventions for numerical input were explained in 3.2.1. On output, octal numbers without leading-zero suppression are used to represent instructions in octal mode, 3.2.6 (e.g., 060010 for DAC*~O). Transfer Vector Mode In this mode, bits 0-2 of the word to be output are ignored. If the address mode is· relative, the symbol table is searched according to the current header for the address which is nearest in value to the value of bits 3-17 of the word to be output. If its value is within 100 octal of the word to be output, this address symbol is typed followed by either + or - and the difference as an octal number. Since the same symbol in the symbol table may represent more than one address, care must be taken on input of addresses. Since transfer vectors in FORTRAN are defined locally and globally with the same symbol, the following seemingly legal attempt to restore the value of a location fails: The contents of local symbol TAN now contains, not the global address of the beginning of the tangent routine, but the address of the transfer vector TAN (its own address). On input, local symbols of the current subprogram always take precedence over globals. 3-7 In absolute address model the 15 bit address is output in octal. In floating address mode, the address is output as relative to the symbol #, which represents the first address of the subprogram loaded into the area of memory containing "point" register). (the last opened In symbolic address mode, the address may be printed as in floating mode, if a symbol within 100 octal of the address is not found in the symbol table. Likewise, an address to be printed in floating mode will be printed in absolute mode, if it is less than the current value of #. 3.2.7 ASCII Text (Output Only) The locations ~ and .+1 are interpreted as ASCII 5/7 packed data if typed in this mode (e.g., ABCDE is output for 406050, 342212). 3-8 SECTION 4 DEBUGGING WITH DDT All DDT commands and features are described in this section. Refer- ences to earlier sections are made to avoid redundancy. 4.1 LOADING A PROGRAM See SECTION 2.1. 4.2 STARTING A PROGRAM When the Linking Loader has loaded DDT and the user's programs and gives control to DDT, DDT sets the value of the special symbol SA# (start address) equal to the starting address of the main program. To command DDT to start the user~s program at a given location, type: where K is an expression whose IS-bit value is the address to which DDT will Go. In the absence of !, the default argument SA# (start address) is used. To first change the value of SA# and then go there, type: If K is missing, (i.e., i$G), SA# will not change. enter his program any place between P#' and C#. 4.3.2E.) The user may (See Section Any other address will be rejected and DDT will type a question mark. The following two points should be remembered when reading the subsequent section on the ~roceed count" and "proceeding after break- point": 1. 2. The $G command always sets the proceed count to 1. The $p (proceed) command will also start the program when~here has been no breakpoint break from which to proceed. If a started program seems to be malfunctioning and the user wants to go back to DDT, then typing tT (CTRL T) will cause the Monitor to give control to DDT, which will give the go ahead signal (». 4-1 4.3 REGISTER EXAMINATION AND MODIFICATION 4.3.1 Type-Out Mode Commands The type-out mode commands (see Section 2.3 and also Appendix 1, sections B and C) dictate the form in which DDT will print instructions and addresses, unless specifically overridden by the command being executed. When first loaded, DDT assumes $S (symbolic instruction mode) and $R (relative symbolic address mode). The commands to set the type-out modes do not take arguments; if arguments are supplied, they will be ignored. If a supplied argument contains an undefined symbol, DDT will type: -1 > U to indicate that the preceding symbol is undefined and that the command was ignored. The undefined symbol is encountered, in this case, before DDT has a chance to determine that the command requires no argument. This is because DDT does not buffer the command text but, instead, interprets it as it comes in, character by character. This pertains to all command input to DDT. When the type-out mode command has been accepted and executed, DDT will respond by performing a carriage-return, line-feed and typing: > Whenever DDT is expecting command input, the type-out modes may be changed without affecting other DDT operations, e.g., an open register remains open. 4.3.2 Special Symbols and Concepts, Register examination and modification requires the user to carefully coordinate certain basic concepts. A. The single character "point" (.) usually represents the address of the last register to have been opened. "Point" is often used as a default arglli~ent to DDT commands. Under the following conditions, the value of "point" will be modified as indicated: ' 1. Immediately after a breakpoint is reached and control is returned to DDT, the value of "point" will be the address of the register whose contents are typed out after the break (a feature to be discussed later). 2. After tT (CTRL T) has been typed and control has returned to DDT-,-the value of "point" is the address of the instruction that waS to have been executed., The user may determine at what location program execution was suspended simply by typing: or 4-2 which are two forms of retype commands. The user may restart the program at the point where it was interrupted by typing: provided that the program was not interrupted while control was in the Monitor. Device handlers are not loaded with the user program units or DDT. 3. When DDT is started or restarted it prints: DDT > At this time the value of "point" is set from the value of the starting address, SA#, which is initially the starting address of the main program. 4. After one of the search commands (discussed below) has been executed, the value of "point" is set to the address of the last register typed out during the search. If no register was typed out, the value of "point" is not changed. B. The "current location", which is represented by the symbol. in MACRO programs, differs at times from the value of "point" used by DDT. The current location does not have a special symbol associated with it. When a register is opened for examination by any command, except $Z, the current location and the value of IIpoint" are the address just opened. The values of "point" and the current location will differ when the sequencing command ~ is used (see below). C. The areas of core occupied by each user subprogram, including the main program, are defined by the "header" file names which appear in the symbol table built by the Loader and which contain the relocation factors (load addresses) of each subprogram. The free core space which exists immediately above the Loader-built symbol table (see memory map in Appendix 4) is treated as a pseudo-program to which DDT has assigned the file name P#' (recall that the' declares the symbol to be a file name). This symbol represents the first location (relocation factor) of the patch file area (free core). This core area is used to insert additional code at run-time. D. The special symbol # represents the first location of the subprogram which occupies the area of memory containing the address "point". The one exception, which does not change the value of #, is when "point" has been modified following the execution of a search command. The sub-program containing the address "point" will be referred to as the current subprogram. The implications of this are best explained by example, using some of the basic commands described in Section 2. Each line in the example is numbered and the comments are keyed to these line numbers: 4-3 Example ;> 1 2 3 4 5 6 7 8 9 >$F) >PRGA ' =003000 ~-J >PRGB ' =004000 - ~ ~ >PRGB II -.tLAC #+100-1 #=004000 > .=004000~ BEGIN -I >PRGA 1/ -I DAC #+3 ~: #=003000 >. =003000-t • : START >BEGIN/ -I, LAC #+100 #=004000 >. =004000-t T 7 In line 1 the command sets the address mode to floating (#+ number) . In line 2, the value of the file name PRGA ' is 3000 (program PRGA starts at location 3000). In line 3, the value of PRGB ' is 4000 (program PRGB starts at location 4000)-.---On line 4, the register whose address is the same as the value of PRGB ' (register 4000) is opened and its contents are printed as a symbolic instruction with a floating address (#=100). The value of # and. at this point is 4000, which means that the current program is PRGB and that its relocation factor (#) is 4000. Therefor~he LAC instruction, if executed, would load the accumulator with the contents of location 4100. On line 5, . is retyped as the symbol BEGIN. Therefore, PRGB has a local symbol called BEGIN which refers to the first location in that program. Assume for the moment that PRGA and PRGB do not use any identical symbols. On line 6, PRGA ' is opened. This changes the value of . to the va 1 ue-or-PRGAI and makes PRGA ' the current program. Since . is now located in PRGA and no longer in PRGB, the value of # is changed to 3000, the relocation factor of PRGA. On line 7, • is retyped as the symbol START, a local symbol in PRGA:On line 8, the register BEGIN is opened. If BEGIN had been defined locally in PRGA, the value of # would not have changed (since . would still have been located in PRGA). Since BEGIN Is located in PRGB, PRGB is made the current program and! is changed accordingly. When searching the symbol table for the value of a symbol, DDT searches the local symbols of the current program before those of other programs and uses the first match it finds. 4-4 E. DDT will now allow core outside a specified range to be modified by command l . The area that may be modified includes the auto-index registers and the core area between the symbols Pi' and C#. Pi' is the address of the lowest register in the patch area. C# is an address within DDT which contains the two's complement value of the "proceed count ll • Immediately below C# are other special DDT addresses, such as, A# (the address of the saved AC). All the special DDT addresses preceding and including C# may be modified by command to DDT. The core between the patch area and these special DDT registers is where the user's programs are loaded. A breakpoint may be placed anywhere in a user program or in the patch area, but it may not be placed at an autoindex register nor wi thin DDT. When operating in t,he Background/Foreground system,: the user must be aware that the patch area may start below the hardware memory protect bound (whose value is stored in .SCOM+32). Attempting to start a program below the bound will result in .ERR~32 (Memory Protect Violation). F. If a register is opened which is below the patch area, the current program will not change since no file name exists for registers below Pi'. The user may, however, define a file name with a value less than pi' for the purpose of examining lower core. G. The special symbol Q#, which is often used as a default argument to DDT commands, assumes the value of the contents of the most recently opened register or the value of the argument to the last intervening retype command. Example: >LOC/ ~ >.1 .~ 123456 123457 123456 Register LOC is opened and contains 123456. Note that at this point the value of Q# is 123456. Then the contents of register LOC is increased by +1, utilizing Q# to represent its current contents. 4.3.3 ,Register Examinatjon Commands The basic register examination command is L. Typing the command K/, where! is an expression, will open register K and print its contents in the current modes. The default argument is IIpoint" (i.e., L is equivalent to ~. If L is replaced by 1, printout is temporarily forced into octal mode. (If 1 is preceded by ALTMODE (~), then octal becomes the permanent instruction mode.) If L is replaced by 1, printout is temporarily forced into symbolic mode. (If 1 is preceded by ALTMODE, then symbolic becomes the per- manent mode.) lSee section 4.8.7. 4 .... 5 If L is replaced by ~; printing of register contents is omitted until the next occurrence of a carriage return command. (This mode, called "type-in mode'! ,allows for rapid code insertion.) If any register examination command is followed by?), an attempt was made to open a non-existent register. Examples: JMP* SUBR 623115 JMP* SUBR 623115 623115 JMP* SUBR ..r >ADR-l/ >. [ >./ >. $ [ >./ >• ] >. < "+ ADR ADR+l "2 > 4.3.4 (print in current modes) (force octal) (modes haven't changed) (permanent mode change) (mode now octal) (force symbolic) (contents are not printed out until encountered) i Expression Retype Commands Alternative representations of the contents of a register or of an expression may be obtained by using retype commands (see Section 2.4). Where K is an expression, K= means retype K in octal K+ means retype K in symbolic K: means retype K as a transfer vector K? means re type the contents of "point" and the following register as 5/7 ASCII text (~ unused) . In each case above, the value of Q# is set to the value of K. The default argument, if K is missing, is the current value of Q#. Retype commands force a temporary mode change; they do not alter the setting of the type-out modes. 4.3.5 Register Modification Commands The basic register closing and modifying command is carriage return ( ). If K) is typed when a register is open, then the value of K (expression) becomes the contents of the open register and the register is closed (~becomes the value of Q#). ister is closed without modification. If ~ is omitted, the reg- If no register is open, none is modified and K becomes the value of Q#. will type >. The command ~also turns off type-in mode, the tempo- 4-6 Upon completion, DDT rary mode which allows the user to insert code without having to wait for DDT to print the contents of each register. In addition to ) ) there are "sequencing corrunands!!, which behave like in that, if given an argument K, K replaces the old contents of the open register (assuming one is open) and then that register is closed. Then a new register is opened. For every corrunand listed be- low, with the exception of ~, the newly opened register becomes the current register. The significance of this will be explained in the example. K+ (Line Feed). Modify the open register, close it and then open the next register in sequence. Kt Modify the open register, close it and then open the register preceding the one just closed. Modify the open register, close it and then open the register whose address is contained in the address part of K. K is assumed to be a memory reference instructTon. The address part (12 or 13 bits, PDP-1S or PDP-9, respectively) is taken, and that address (in the same memory bank as the now closed register) is opened. If K is missing from the command, the address part of the contents of the closed register is taken. In other words, the argument to $Y is always Q#. This command is identical to $Y with the exception that the newly opened register-is not made current (the current register and the value of . now differ) . $Z is useful for examining literals without breaking program sequence; that is, subsequent use of + or t will refer to the current register, not the one opened by ~. This command is similar to $Y.. It modifies the open register, closes it and then, treating-K as a transfer vector, opens that lS-bit address. - If DDT types a question mark after any of these commands, either the command was not properly received (unlikely) or an attempt was made to alter a location outside the allowable range (autoindex registers and P#' through C#)l. In either case, the command is ignored. Example >LOC/ LOC+l LOC+ 2 ~ LAW - 1 -I LAC LIT12$Z 12 -I + DAC TMP ~~ JMS * TV -l $Y DAC ARG-7~ -: SUBRl -+f $J .:.t 0 -IT - SUBR1+1....( CLL!CLA -t T SUBR1+~ SAD XYZ-2·-~ t >S,(JBR1+l~ CLL1CLA -I ~TL1CLA ) lsee Section 4.8.7. 4-7 Note that the addresses opened by the cowmands $Y, $Z and $J are not printed by DDT. Note that $Y after JMS* TV opened register TV and printed its contents as if it were an instruction. This did not look right, so _ was typed to request reprint as a transfer vector. The use of $Y or ~ following indexed and indirect instructions, such as, LAC* ..... TAB,X$Y will not perform the indexing nor indirection to determine the address of the next register to be examined. In this example, register TAB would be opened. If the user wishes to effectively i~sert code in his program, he must, in general, modify two registers in his program: one to JMP* through a transfer vector and the other to the transfer vector pointing to patch space in free core (which might not be in the same core bank as the user's program). Patch space begins at the register P#' and goes as high as the address stored in register 103 (.SCOM+3). The user should be aware that making patches in locations higher than the value in 103 will overlay the user's program. Besides the method of opening and modifying registers there are special instructions available for initializing memory between limits to a constant and for updating the values of special DDT registers. These commands will be discussed under later headings. 4.4 DEFINING A SYMBOL In addition to the symbols passed on to DDT by the Linking Loader, the user has the option of defining additional symbols at run time. These "DDT-time" symbols are added to the end of DDT's symbol table (see Appendix 4). The symbol S, which must be a unique symbol, is given the value of the expression E. (~) is equivalent to o (S) • The symbol S is given the value of "point". Only these "DDT-time" symbols may be redefined. Symbols may be deleted as follows: (no argument) will !ill (delete) all DDT-time symbols. will Kill all the user's load-time symbols. This would only be done, presumably, to increase the available patch space (P#' will be suitably redefined). 4-8 If the user attempts to define any symbol which is not a DDT-time symbol, DDT will ignore the command and type an X. If he attempts to define a symbol when the DDT-time symbol table is full, DDT will ignore the cOIT~and and type an 0 4.5 (Overflow). SEARCH OPERATIONS There are three search commands, each of which searches inclusively between a lower core limit and an upper core limit for words or parts of words which have or do not have a specified value. The search com- mands use as arguments the values in three special DDT registers: M# search mask LO# lower limit search address HI# upper limit search address Each of these registers may >M#/ LO# R# > ~ --t ~ be individually modified, e.g., 777777 012252 025611 770000+ 14000 + 14400 ) Notice that these registers appear sequentially in memory. (The symbol R# is equal to HI# and will be printed instead of HI#.) The contents of LO# and HI# may be modified directly by command: where A and B are expressions. the value in HI# to B. This sets the value in LO# to A and The default arguments are P#' (beginning of free core patch area) and L# (the address of the saved value of the Link within DDT). A# (the saved AC) is the first register in DDT and L# is the second. LO# is initially set to P#' and HI# to L#. The initial contents of the mask, M#, is 777777 '(all ones). The first command is the Word Search: searches through every core register between the limits set in registers LO# and HI#, inclusively, for words whose values match the value of ~ (an expression) in those bit positions specified by lIs in the corresponding bits in the mask argument M. 4-9 For exa~ple, to search for all words locations , "" .J..VV ')"" &.VV, equal in value to JMP BEG, type: 100i 2 00$L 777777iJMP BEG$W Of course, if LO# already contains 100, HI# contains 200, and M# contains 777777, the user need only type: JMP BEG$W Specifying a mask in the $W command does not cause the contents of M# to be modified. To search for all words between locations 100 and 200 whose Op code parts contain JMP, type: 100i 2 00$L 740000iJMP$W Note that the mask is set so that only the high order 4 bits (the Op-code bits) are tested for a match. To print out the contents of registers 100 through 120, type: 100i120$L Oi$W Zero is used as a mask so that there is no possibility of a mismatch. The second argument is immaterial and was, therefore, not "given. The default arguments for MiK$W are the contents of M# (if M missing) and 0 (if K missing). The second command is the Not Word Search: It is identical to $W except that the search is for words which differ from rather than match K in the masked bit position For example, to print all registers between locations 100 and 200 whose contents are non-O, type: 100i200$L $N 4-10 (Note that 0 is the default value of K. It is assumed, in this ex- ample, that M# contains 777777). The third command is the Effective Address Search: The default arguments for M and K are, as above, the contents of M# and 0, respectively. $E searches core between the limits specified by LO# and HI# for all memory reference instructions which directly or indirectly reference the address ~ (an expression), testing for a match only in those bit positions specified by lis in the mask. (Bits 0-2 are disregarded.) The following example gives a good indication of the usefulness of this command. It is desired to know all the registers between loca- tions 1000 and 2000 which reference auto-index registers: 1000i2000$L 777770ilO$E To search for all references to ADR+l, provided that the mask and limits contain the desired values, one need only type: ADR+l$E Since a PDP-15 has a hardware index register (whose value is saved in and restored from XR#) , an effective address search which encounters indexed instructions will use the value in XR# as the index. During any of the three search operations whenever a condition is met (match or no match), DDT prints the octal address of the memory word which satisfies the search constraints, prints a tab, prints the contents of that memory location in the prevailing type-out modes and types a carriage return. limit is exceeded. The search then continues until the upper At the end of the search, the value of "point" is set to the address of the last register printed in the search map (the current register remains unchanged). "Point" remains unchanged if no printout occurred. 4.6 4.6.1 BREAKPOINTS Definition A "breakpoint" is a pre-selected point in a program where the flow of the program is broken to allow the user to perform DDT functions. 4-11 Whenever it is about to give control to the user's program, DDT saves the instruction at each breakpoint and replaces it with a JMS* 17 inl struction. DDT also stores a return pointer to itself in auto-index register 17. Thus, whenever a breakpoint is reached, control is trans- ferred to DDT to allow the user. to examine and alter registers, search, etc. When the user signals DDT to continue execution of his program ($P), the instruction that was originally at the breakpoint location is simulated and then DDT transfers control to the register following the breakpoint. Needless to say, the user's program must not modify the auto-index register that DDT uses for breakpoint returns. Up to four breakpoints may be set to facilitate debugging when there is uncertainty as to which path a program will follow. 4.6.2 Setting Breakpoints Initially, all four breakpoints are cleared (unassigned). The general form of the breakpoint command is: where N is a breakpoint number (1 to 4) and ~ is an expression evaluated to a IS-bit address. N This causes DDT to assign (set) breakpoint at location A (provided that the value of A is non-Oi see below) . For example, to set breakpoint 2 at location ADR, type: 2 iADR$B It is possible to reset a breakpoint to some other address without first deassigning that breakpoint, e.g., if breakpoint 2 had been set at location XYZ, the preceding command would supersede the earlier assignment. If the argument A is missing, the default argument is "point". For example: This sets breakpoint ~ at location ADR because "point" has the value of register ADR. (3i$B is equivalent to 3i.$B~) lA command exists to tell DDT to use some other auto-index register for breakpoints (discussed later). 4-12 If the user does not care which breakpoint number is used when assigning a breakpoint, he can, simply by leaving out the first argument ~, request DDT to assign an unused breakpoint number. suming all four breakpoints For instance, as- to set a breakpoint at location ~, type: X$B DDT, finding breakpoint 1 unused, then types a 1 to indicate which number it selected, i.e., If all four breakpoints are already in use; DDT types: and ignores the command. If register X is outside the legal range of registers which may have breakpoints (P#' to C#) ,1 DDT types: X$Bl? indicating breakpoint 1 is free but X is illegal, and then ignores the command. In addition to assigning and reassigning breakpoints, the user may remove (clear) them. This is signified by a value of 0 for the argu- ment A. The input removes breakpoint N (1 to 4). If N is absent, the input removes all breakpoints. When a breakpoint is set at a given location, the contents of that location are not changed, e.g., >X/ >X/ LAC LAC TMP TMP The swapping of the contents of X with a JMS* 17 occurs only when DDT gives control to the user program. 1 See Section 4.8.7. 4-13 4.6.3 Breakpoint Restrictions It has already been mentioned that DDT will not allow breakpoints to be set at locations outside the range P#' to C#.l The user must not set a breakpoint at locations containing: a) instructions which are program modified b) instructions which are used as constants (operands of other instructions). This is because the actual instruction in a breakpoint location' is changed by DDT, prior to program execution, to a JMS* 17 (or some other autoindex register). If a breakpoint is set on a CAL or XCT instruction and a break at such a location occurs, DDT remembers this fact. If the command is then given to proceed with program execution where it left off, the breakpoint is removed and replaced by the original CAL or XCT. This is done because DDT cannot simulate the CAL (which has a variable number of arguments following it) out of place. The XCT cannot be simulated out of place since XCT can execute a CAL instruction. How- ever, should control return to DDT via some other breakpoint, the breakpoint on the CAL or XCT will then be reinstated. Should the user wish to place a breakpoint on a CAL instruction, the following practice will always ensure that the breakpoint remains set on the CAL. Example: CAL 3 12 LAC BUFF (set breakpoint 1) (set breakpoint 2) The CAL used above is the macro expansion of the'Monitor call: .WAIT 3 Placing a second breakpoint on the register immediately following the CAL and its arguments (the return point) at the CAL will always be reinstated. ensures that the breakpoint An additional feature in the breakpoint logic, which is explained later, allows the user to specify breakpoint 2 (above) so that it never causes a break (breaks and then immediately continues). This makes breakpoint 2 "transparent" or "invisible". Isee Section 4.8.7. 4-14 4.6.4 Flow of Control at Breakpoints When execution of the user's program reaches a breakpoint, control is returned to DDT. At this point, DDT executes what is called a "con- ditional break instruction." If this instruction does not cause a skip (e.g., NaP), which is the usual case, then DDT decrements the "proceed count". If this causes the proceed count to be equal to zero, a break occurs. If not, DDT will simulate the instruction which was replaced at the breakpoint (by a JMS* 17) and then return control to the user's program at the address following the breakpoint register. In other words, the break does not take place. There is only one proceed count for all four breakpoints. As the name suggests, the proceed count is a value specified by the user indicating how many times breakpoints are to be reached before a break is to occur. It is particularly suited for specifying the number of times a loop should be executede The proceed count will be discussed later on. If the conditional break instruction causes one register to be skipped (e.g., SKP or SPA with the AC positive) the program continues without a break and without decrementing the proceed count. This is the "invisible" breakpoint discussed in section 4.6.3. If the conditional break instruction causes two registers to be skipped (explained below) DDT will always break, without altering the proceed count. Each breakpoint ~ has its own conditional break instruction, which the user may examine and modify directly by opening register I#+N (N = 1 to 4). Initially, when a breakpoint is set with the $B com- mand, the contents of the associated conditional break instruction register, I#+N, is set to Nap. Nap does not skip, so the break will be determined by decrementing the proceed count. After the $B com- mand, one may modify I#+N to contain any instruction one likes CLA!SNL or LAC* 10 or JMS* V#+N). (e.g., The first of these will decrement the proceed count only when the Link is zero and continue otherwise. The second always decrements the proceed count but, in addition, effectively inserts one instruction prior to the breakpoint. The third allows the user to call one of his own subroutines when the breakpoint is reached. The subroutine, when it returns, can decide whether to skip two, skip one, or not skip, simply by incrementing its entry point twice, once, or not at all. V#+N, shown in the last of the three examples, is a register for breakpoint N set aside by DDT specifically to be used to store the transfer vector for a conditional 4-15 break instruction which needs to make an indrect memory reference. So, for example, if the user wants to call subroutine TEST, when breakpoint 2 is reached, he types: 1#+2< ....j JMS* ~ TESTl V#+2$Z.J - (Recall that when opening a register using < as a command, DDT does not type out the contents of that register.) The user is warned not to insert JMP .+3 in a conditional break register, expecting a double skip. "Point" will not have the correct value to be able to do this. One may set the conditional break instruction directly, without having to open 1#+N, by using the command: where N = 1, 2, 3 or 4 to indicate the breakpoint number. This com- mand also takes a second argument, but it is immaterial to this discussion. (with argument! missing) sets 1#+N to NOP (no skip) sets 1#+N to SKP (skip 1) sets 1#+N to skip 2 locations Only the last bit in argument X is used to determine what is placed in 1#+N. The effective flow chart for the break/no break decision is as follows: 4-16 EXECUTE CONDITIONAL BREAK INSTRUCTION: XCT I#+N 1 o 2 SINGLE SKIP NOSKIP DOUBLE SKIP DECREMENT I I YES ~BlAKI I I NO_ _ _ _ _ _ _ 1I $p COMMAND (PROCEED) CONTINUE USER PROGRAM Flow Chart, Break/No Break Decision 4-17 What Happens on a Break 4.6.5 When a break occurs, DDT makes three checks: a) If the break comes from a location not known to be a breakpoint (if the user's program accidentally executes a JMS* 17), DDT reinitia~izes itself and types: DDT > It is not possible to proceed from such a breakpoint. b) If the break comes from a known breakpoint but PI (program interrupt) is disabled, the same action as above will take place. Therefore, breakpoints should not be placed in routines which operate with PI off. c) Also, if API is active when the break occurs, EaT will type the contents of the API status register: AP I -4 4XXXXX One may not proceed from such a breakpoint. Any other command is valid, including a command to delete this breakpoint. The tests for PIon and API inactive are not made in the Background/ Foreground environment, since the Background job (DDT and the user's 1 programs) cannot execute lOT's. If a valid break occurs, DDT will type the breakpoint number N followed by a tab and the contents of a register (specified by the address in R#+N) in the prevailing typeout modes, e.g., 1 -4 776403) R#+N (N = 1 to 4) is a special register associated with breakpoint N (as are I#+N and V#+N). Initially, when a breakpoint is set with the $B command, R#+N contains the address of Ai (the stored AC). There- fore, if'the user does not alter R#+N, the contents of the AC will be printed when a break occurs. The user may change the address in R#+N in either of two ways: one is to open and modify the register,e.g., l~~,~"- S ect '~on 4 . 8 . 7 . 4-18 the second is by using the command: The first argument ~, changes the contents of I#+N (N = 1 to 4) as discussed in section 4.6.4. Argument ~ specifies the address whose contents are to be printed when a break occurs at breakpoint N. This address is stored in R#+N. For example, 0;4004$1 will set the conditional break instruction in 1#+1 to skip a location when executed. Since this means a break will never occur, the second argument is unimportant. 1;4004$1 will set 1#+1 so that a break will always occur and print: 1 ~ contents of 4004 The default argument for ~ is A#. If 0 is stored in R#+N, when the break takes place only the breakpoint number will be typed. When breaks occur, DDT saves the contents of the AC, Link, MQ, Index Register, and Limit Register in the special DDT locations addressed by the symbols A#, L#, MQ#, Xi, and LR#, respectively. The MQ, of course, is not saved on a machine which does not have EAE. The Index and Limit registers are saved only on PDP-IS. Once DDT has stopped typing after a break, the user is free to type commands. Typically he would examine certain program registers, perform searches, set and reset breakpoints and make program corrections. Then he may continue program execution at the point where the break occurred by typing: This comnland places the value of the expression ~ in the proceed count (the default value is 1) and proceeds by simulating the instruction at the breakpoint (the one saved. and replaced by JMS*17) and gives control to the user program at the location immediately following the breakpoint. If control returns to DDT because the user types 4-19 l! (CTRL T), $P may be used to continue progr~u execution from where i t was interrupted. Normally, when no breakpoint has been reached, the $p command will not be accepted since there is no address from which to proceed. However, after DDT has initially been loaded or restarted and has printed: DDT > The command $P (as $G) starts the user program at the location specified in SA# (the start address). Recall that the $G command always sets the proceed count to 1. For convenience, the symbols Bl#, B2#, B3#, and B4# are defined as the addresses of the breakpoints. will be defined as 0). (If breakpoint ~ is not set, BN# DDT never uses these symbols on output, but the user may use them on input to DDT. If breakpoint 1 is set at register 4000, which contains instruction CLA, then the following commands yield the indicated results: Bl#/ -ICLA Bl#=004000 As already mentioned, DDT initially assumes the use of auto-index register 17 for breakpoint returns. The command: where A is an expression which must evaluate to 10 thru 17, commands DDT to use auto index register A for its breakpoint return. For example: will change the breakpoint instruction to JMS* 11. of the argument A i~ 4.6.6 i7 (~is The default value equivalent to 17$0). The Execute Command Built into the DDT breakpoint processor is the facility to allow execution of single instructions. By giving the command: the user may execute the instruction I CLA!CLL$X LAC ....SUM$X 4-20 (an expression). For example, The first example will clear registers A# and L# (the saved AC and Link in DDT). DDT will type ? and ignore the command if an attempt is made to execute a CAL instruction, an XCT instruction or an EAE instruction which requires a memory reference to pick up an argument (e.g., MUL). The default instruction, in the absence of !, is the instruction at location "point" executed as if it were located at "pointH. The reason for this is that if i t is a memory reference instruction, it must be executed in the proper memory bank. If the executed instruction causes a skip, DDT indicates this by typing an extra carriage return. to return to after a break. However, i t does not alter the address For example; assume that breakpoint 1 was set as indicated in the following code and that a break at that location has occurred: A B LAC (1 DAC TMP (breakpoint 1 set here) TAD ADR The break occurs after LAC (1 has been executed and before DAC is executed. T~~ If the user now types: SKP$X $P program execution returns to location B after the DAC TMP is simulated. The SKP does not cause a skip. One may execute a call to a subroutine: JMS SUBR$X provided that SUBR does not expect to pick up arguments following the JMS nor skip more than one location on return. In the Background of the Background/Foreground system, one cannot execute IOT'S,l HLT, or an operate instruction microcoded with OAS. These will cause a trap to the Monitor, which will treat these instructions as errors. Return to DDT after the error message .ERR 032 must be done by typing tT (CTRL T). lsee section 4.8.7. 4-21 4.7 PATCH FILE INPUT AND OUTPUT 4.7.1 Mass Storage Dump If the DDT user has a system operated from bulk storage (Keyboard or Background/Foreground Monitor Systems) he may save his work from session to session by means of a tQ (CTRL Q) dump, which dumps all of core onto a specified area of the system device. The reader should refer to the Advanced Software Systems Monitors manual (DEC-9A-MADO-D) for a complete explanation of the Monitor commands associated with tQ dump. In the Background/Foreground System it is not possible to reload such a core dump. In the Keyboard Monitor system, the Monitor command~, (where n is some unit on the system device) will reload core from the control Q area on that unit. Typing tT (CTRL T) after the transfer is complete will return control to DDT, which will respond by typing In a Keyboard Monitor environment, after DDT and the user's programs have been initially loaded, i t is recommended that the user dump core using tQ. Then, if his program goes awry and "clobbers" core, he may return to the Monitor by typing tc and quickly recall the dumped code. 4.7.2 Paper Tape Patch Files In a paper-tape-only system (Basic Monitor) a program must be link loaded e~ch session at the computer. It is possible, however, to save patches from session to session and all DDT-time symbols defined. The format of the patch tape produced is given in appendix 3. The following patch file commands exist: outputs the contents of register K (the default argument is "point"). outputs the contents of every register inclusively between the limits ~ and ~ (expressions). The default value of H is zero. The default value of L is the value of ~, i.e., dump only one register. will dump (save) all the DDT-time defined symbols. 4-22 After all patch file output has been accomplished, the user must type: to close the patch file. At the beginning of a new session, after loading DDT and his programs, the user may type to ~nput (read) the patch file tape. Because of the patch file's format, it may be loaded only by DDT and only to the same version of DDT in the same amount of core as was used to punch it. If a read error occurs during input, DDT types a question mark. Data up to the point of error is correctly stored in memory. The user may reposi- tion the tape by moving it back one block so that typing ~ at this point causes DDT to reread that block and, if no error, to continue reading the patch tape. 4.8 MISCELLANEOUS FEATURES 4.8.1 Operate Link and AC The command: will set the Link (L#) from bit 17 of the value of the expression M and the AC (A#) from the value of N. The default values of both arguments is 0, so that $U will clear the Link and AC (equivalent to CLA!CLL$X) . 4.8.2 Make Subprogram Current (Header Command) The header command is used primarily to make a p~rticular subprogram current, thus giving preference to its local symbols when DDT performs a symbol table search. The form is: The argument ~ is usually a filename (e.g., PRGl'), but it may be any unique address symbol. This command makes address A the current location, sets the value of "point" equal to A and makes the program containing that address the current program. 4-23 4.8.3 Initialize Memory The command where N is an expression, will change the contents of all memory words between the limits in LO# and HI# to the value of N. fault argument is 4.8.4 The de- o. Loading DDT without a Program DDT can be used to create programs on-line and it is not necessary to load any user programs when DDT is called in. This is done by typing tT (CTRL T) when the Linking Loader has typed: LOADER > or BGLOAD > When DDT is started, core has been cleared between P#' and C#, and no load-time nor DDT-time symbols exist. 4.8.S Restarting DDT The use of tT (CTRL T) to interrupt a user program and return con- trol to DDT has been previously explained. tT may also be used to abort a search operation which is in progress. 4.8.6 Typing Mistakes If the user discovers that he has made a typing error while inputting a command, he may type tu (CTRL U) or rubout, both of which are echoed as @, to delete the entire command. 4.8.7 Protect Mode Commands In order to avoid serious errors, a subroutine in DDT is used to validate addresses before certain commands are executed. The following commands are protected: a. Proceed ($P) following a tT b. Go ($G) c. All register modifying commands d. Breakpoint ($B) Except for references to the autoindex registers in register modification commands, addresses used by these protected commands must fall the range P#' to C# (excluding the bootstrap in a 12K,20K, or 28K PDP-IS). This restriction prevents the user from altering the Monitor, DDT's symbol table, or DDT itself. 4-24 The following two commands affect the protect mode: ~ Disables the protection feature, thereby allowing the user to modify and transfer to any location in core. Nonexistent memory references will still be detected. To be effective in the Background/Foreground System, the Monitor command $MPOFF must also have been typed. @ Reenables the protection feature. 4.9 ERROR RECOVERY Sections 2.11, 4.8.5 and 4.8.6 explain how to correct typing errors and how to stop a runaway program. The following DDT-generated error messages are not fatal: U X o ? API (undefined symbol) (illegal symbol definition) (DDT-time symbol table overflow) (general error message) (breakpoint reached with API level active) Commands which cause these errors are ignored. The "API" error mes- sage signifies that one may not proceed from such a break. Errors which are caught by the Monitor (.IOPSXX or .ERR XXX) mayor may not be fatal. In any event, in the Background/Foreground system control may be returned to DDT, after the error message is printed, by typing tT; in the Advanced and Basic Monitor Systems, control re- turns to DDT automatically. If an error is trapped by the Object Time System (OTS) , which prints .OTS XX, it will exit to the Monitor. that point. 4 .... 25 No recovery is possible at APPENDIX A SUMMARY OF DDT COMMANDS A. EXPRESSION OPERATORS Logical inclusive or. & Logical and. "- Logical exclusive or. + Two's complement sum. Two's complement (unary minus) or subtract. (Space) Two's complement sum, but prohibit change of top 6 bits in this and remaining operations in the expression. * B. C. Two's complement sum and exclusive or indirect bit (20000) to value. INSTRUCTION MODE CO~wmNDS $S (Symbolic) Print symbolic instructions. $0 (Octal) Print instruction as six unsigned octal digits. $V (Vector) Print bits 3-17 as a transfer vector in the current address mode. $T (Text) Consider registers "point" and "pointplus-one" as 5/7 packed ASCII and print the corresponding five characters. ADDRESS MODE COMMANDS (Relevant to instruction modes $S and $V and also to tag printouts) . D. $R (Relative) Print addresses relative to the nearest tagged (labelled) location. $A (Absolute) Print addresses as absolute IS-bit octal numbers. $F (Floating) Print addresses relative to #. # is the relocation constant for the current program. SPECIAL ADDRESSES IN DDT A# Where the AC is stored on breaks. L# Where the link is stored (bit 17) on breaks. MQ# Where the MQ is stored on breaks. LR# (PDP-IS) Where the limit register is stored on breaks. X# (PDP-IS) breaks. Where the index register is stored on M# Where the default mask for searches is stored. LO# Where the lower limit address of search operations is stored. HI# Where the upper limit address of search operations is stored. Al-l R#+N Where the register to be printed on breaking at breakpoint N is stored. I#+N Contains the instruction to be executed on reaching breakpoint N. V#+N Reserved for the transfer vector possibly used by the instruction in I#+N. C# E. Contains the 2's complement of the proceed count. SPECIAL ADDRESSES IN USER'S PROGRAM (NOT SEARCHED ON OUTPUT) # Address of the first word in the current program (same as pi' when patch area is current). Address of the last opened register. F. Pi' Address of the first word in the patch area (Pseudo file name) SA# Address of the starting location of the first program loaded (originally). Bl# Address of breakpoint 1 instruction. B2# Address of breakpoint 2 instruction. B3# Address of breakpoint 3 instruction. B4# Address of breakpoint 4 instruction. CONTENTS OF SPECIAL USER LOCATIONS Q# G. Represents the contents of the most recently opened storage word (never used on output) or value of last intervening retype command argument. DEFINING A SYMBOL E(S) H. Symbol S given value E (expression). as~, same as ~). S) Symbol S defined $K Kill DDT-time user defined symbols. O$K Kill load-time user symbols. STARTING A PROGRAM AD$G Start at address AD (expression). $G Start at address SA#. ;AD$G Set SA#=AD and start there. I. BREAKPOINT COMMANDS K$B Put lowest available breakpoint at address K (must be non-zero; default: .) DDT types breakpoint number after the B. O$B Remove all breakpoints. N;K$B Set breakpoint N (default: 4) at address K (must be non-zero; default: .). N;O$B Remove ?reakpoint N (Default: MiK$N Type out register K (default: A#) when breaking at breakpoint N (1 to 4) (N is part of command and may not be omitted.) If M; is missing, normal procedure will be followed at breakpoint. If M bit 17 is 0, breakpoint will never break. If M bit 17 is 1, breakpoint will always break. Al-2 4). J. E$O Use auto-index register E (10-17; default: 17) for breakpoint instructions. M$P Proceed from breakpoint and put M (default: 1) in proceed count. REGISTER EXAMINATION AND MODIFICATION ) Close any open register, depositing its argument in that register. If no argument is given, the register is unchanged. I Close any open register and open another. If an argument is given, it is taken as the 15 bit address of the next register to be opened and made current. If not, the register "point" is opened. LINE FEED Behaves like ) except that it opens the register following the current register and makes the new register current. t Behaves like ) except that it opens the register preceding the current register and makes the new register current. $Y Behaves like ) except that Q# is taken as the 12 bit address of a location which is opened and made current. $J Behaves like ) except that Q# is taken as the 15 bit address of a location which is opened and made current. $Z Behaves like $Y except that the new open register is not made current. Behaves like I, but forces the printout to be in numeric mode. Behaves like I, but forces the printout to be in symbolic mode. < Behaves like I except that the printing of register contents is omitted until ) is used to close a register (type-in mode) . Print argument (default: ? K. Q#) as an octal number. Behaves like but causes symbolic printouts. Behaves like fer vectors. but retypes expressions as trans- Prints out contents of . and .+1 interpreted as 5/7 packed ASCII text. WORD SEARCHES M;N$L Set the contents of LO# to M (default: pi') and HI# to N (default: L#). M;D$W Search from address in LO# through address in HI# (? if lower·than address in LO#) for words which are the same as D (default: 0) in all _.c 1\wlL\ J.'J.1t J • contents U.I.. bits that are 1 in M (default; Al-3 L. M. Mi D$N Search as in $W f MiD$E Search as in $W and $N for memory reference instructions effect~vely addressing (directly or indirectly) an address which is identical to D (default; 0) in every bit which is I in M (default: contents of M#). PATCH FILE COMMANDS (I/O MONITOR SYSTEM ONLY) LiH$Q Output contents of locations between address L (lower limit) and H (upper inclusive limit) into the patch' file. Default conditions for these arguments are meaningless. K$Q Output contents of location K (default: "point") into the patch file. $D Dump DDT-time defined symbols. $C Close patch file. $I Input patch file (from paper tape reader). OTHER DDT COMMANDS I$X Execute instruction I (default: contents of "point" as if located at address "point"). tu Wipe out current command. RUBOUT N. but print unequal words. Same as tu. C$H Make the address C (e.g., FILE') current, but do not open it. (Default: SAil. MiN$U Update contents of L# to M (default: 0) and the contents of A# to N (default: 0). N$M Initialize memory from address in LO# through address in HI# to N (default: 0). tT Interrupt -- transfer control to DDT. Used to stop a runaway program or to abort a long search operation. @ Enable Protect mode. $@ Disable protect mode. Allow modifications of and transfer to any location in core. ERROR MESSAGES ? General error indication. X Symbol definition command attempted to redefine a non-DDT-time symbol. Command ignored. U Symbol just used is undefined. API A breakpoint has been reached with API active (cannot proceed). o Symbol table capacity has been exceeded by symbol definition command. Command ignored. AI-4 Command ignored. Command ignored. O. SPECIAL DDT SYMBOLS First argument delimiter for commands with two arguments. Same as ; when used with symbol definition commands. $ Indicates that the following symbol is a command (used primarily with letters and numbers, which ordinarily comprise expression syllables) . ALTMODE Same as $ and echoes as $. » Indicates that the corr~and has been performed by DDT. Same as Indicates that the preceding symbol is a file name (must be used with file names for correct operation) . II Indicates that the preceding symbol is an address (omit searching the instruction mnemonic symbol table). * Sets the indirect bit of an argument (20000). ,x (PDP-IS) Sets the index bit of an argument (10000) . Same as ,X. Al-S APPENDIX B MNEMONIC INSTRUCTION TABLE OPERATE CLASS MEMORY REFERENCE CAL DAC JMS DZM LAC XOR ADD TAD XCT ISZ AND SAD JMP NOP OPR CMA CML RAL RAR IAC** SMA SZA SNL SKP SPA SNA SZL RTL RTR SWHA** CLL STL RCL RCR CLA CLC GLK LAW 000000 040000 100000 140000 200000 240000 300000 340000 400000 440000 500000 540000 600000 EAE GROUP EAE 640000 INPUT/OUTPUT lOT 700000 740000* 740000 740001 740002 740010 740020 740030 740100 740200 740400 741000 741100 741200 741010 742010 742020 742030 744000 744002 744010 744020 750000 750001 750010 760000 PDP-15 AAS PAX PAL AAC PXA AXS PXL PLA PLX CLX CLLR AXR 720000 721000 722000 723000 724000 725000 726000 730000 731000 735000 736000 737000 * DDT interprets 740000 as NOP. ** PDP-15 A2-1 APPENDIX C PATCH FILE FORMAT DDT outputs the patch file in four-word blocks (including the twoword block header used by the lOPS system) with blank tape showing between the blocks. Each block carries the address and the contents of one memory word. (See figure below). The dump DDT-time symbols command ($D) punches the additional symbol table area in the same manner. The $C command punches an lOPS end-of-·file block. WD 0 WORD PAIR COUNT AND MODE WD 1 CHECKSUM WD 2 l ) lOPS BLOCK HEADER ADDRESS OF PATCH WD 3 CONTENTS OF PATCH As many files as desired may be produced by using the following sequence of commands: LliHl$Q (as many as desired) LMiHM$Q $D $C (optional) A3-l APPENDIX D DDT MEMORY LOAD MAPS 'rOP OF CORE - r DDT ! t DDT SYMBOL TABLE t C#..:.::,;r A#~ i "" I "T"''1\.T T"'\ I I THIS AREA PLUS THE AUTO-INDEX RRGTC::'T'RRS -MAY BE MODIFIED · • scni+ 3---./ PATCH AREA SYMBOLS SUBPROGRAM N SYMBOLS · · SYMBOLS f i ..... ~ SUBPROGRru-1 N f LOAD-TIME I/O MONITOR ONLY START HERE, UNLESS INSTRUCTIONS BYPASSED "'" P#'~ I CONTINUE HERE SA# -Y~. __-=PSUBPROGRAM .:;. ;:U\.~J.~l\l~.I:':. . .:R~V:. =\.:J. : ; RAM. ; . . . ;1;:. l-----l USER PROGRAMS FREE CORE * BOOTSTRAP REMAINDER OF DDT DDT-TIME SYMBOLS SPECIAL DDT SYMBOLS INSTRUCTION MNEMONICS SPECIAL DDT REGISTERS ORDER FOR SYMBOL TABLE SEARCH .............. .-..o...J_. I ! , il\ · FINAL SEARCH HERE 4 I 1 SUBPROGRAM 1 SYMBOLS !~MAIN PROGRAM HAS 3 INITIAL PRECEDENCE MAIN PROGRAM (CURRENT PROGRAM) I/O HANDLERS PPA. AND PRA. FOR DDT PATCH FILES RESIDENT MONITOR BOTTOM OF CORE *On a PDP-IS with 12K, 20K or 28K or core, the bootstrap is located at the top of the next to highest 4K page. A4-1 DDT IN BACKGROUND/FOREGROUND TOP OF CORE DDTI r USER PROGRAMS BACKGROUND JOB'S CORE .SCOM+3 ____________~~~ FREE CORE 3 .SCOM+32-----------.. - - - - - - - .L 2 4 Hardware ' LOAD TIME Prot ect SYMBOLS Boun d ... . SCOM+31----------~~~ Software USER'S I/O Prote ct HANDLERS Boun d .SCOM+25----------~~~ FOREGROUND PROGRAMS RESIDENT MONITOR BOTTOM OF CORE NOTES: 1. In Background/Foreground, DDT is loaded to the top of core (overlaying the bootstrap). 2. Memory references below the hardware protect bound cause an interrupt. The Monitor screens all such references to determine which are legal and which are not. 3. Free core may dip below the hardware protect bound. The area below the bound may be used for data storage but not for executable program code. 4. If the Monitor command MPOFF was issued in the Foreground, the hardware protect bound is set at register zero. If the command $@ is given to DDT, the use~ may then issue 'IOT I S in the Background and modify and transfer to any location in core. A4-2 HOW TO OBTAIN SOFTWARE INFORMATION Announcements for new and revised software, as well as programming notes, software problems, and documentation corrections are published by Software Information Service in the following newsletters. Digital Software News for the PDP-8 & PDP-12 Digital Software News for the PDP-II Digital Software News for the PDP-9/15 Family l - r .. , T'-'ese O'\ewslI'WII .... ~~e I.. s -"" .... ~a:I I....I :I I...I Ic~ .. m ... ~:~ ... "'p_I: __ L..I_ "0 -or.&... .. ,... .. - - •. -:I-b IC l l om III ~VIII VI I UIIVII U tJll~UJJIC I ;) IIVV""IC UVUIIU II Digitalis Program Library, Articles in Digita I Software News update the cumulative Software Performance Summary which is contained in each basic kit of system software for new computers. To assure that the monthly Digital Software News is sent to the appropriate software contact at your insta lIation, please check with the Software Specialist or Sales Engineer at your nearest D igita I office. Questions or problems concerning Digitalis Software should be reported to the Software Specialist. In cases where no Software Specialist is available, please send a Software Performance Report form with details of the problem to: Software Information Service Digital Equipment Corporation 146 Main Street, Bldg. 3-5 Maynard, Massachusetts 01754 These forms which are provided in the software kit should be fully filled out and accompanied by teletype output as well as listings or tapes of the user program to facilitate a complete investigation. An answer will be sent to the individual and appropriate topics of general interest will be printed in the newsletter. Orders for new and revised software and manuals, additional Software Performance Report forms, and software price lists should be directed to the nearest Digital Field office or representative. U.S.A. customers may order directly from the Pro~r(]m Library in Maynard. When ordering, include the code number and a brief description of the software requested. Digital Equipment Computer Users Society (DECUS) maintains a user library and publishes a catalog of programs as well as the DECUSCOPE magazine for its m-embers and non-members who request it. For further information please write to: DECUS Digital Equipment Corporation 146 Main Street, Bldg. 3-5 Maynard! Massachusetts 01754 READER'S COMME NTS Digital Equipment Corporation maintains a continuous effort to improve the quality and usefulness of its publications. To do this effectively we need user feedback -- your critical evaluation of th is manua I. Please comment on this manual's completeness, accuracy, organization, usability and readability. Did you find errors in this manual? If so, specify by page. How can this manual be improved? Other comments? Please state your position. --------------------------------------- Date: ------------Name: Organization: ----------------------------------------------------------Street: Department: -------------------------------------------------------------. City: ----------------------- State: --------------------- Zip or Country------------ -------------------------------------------------------------Fold lIere------------------------------------------------------------ .---------------------------------------------.- Do Not Tear - Fold lIere and Staple ----------------------------------------------- FIRST CLASS PERMIT NO. 33 MAYNARD, MASS. BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATES Postage will be paid by: Software Communications P. O. Box F Maynard, Massachusetts 01754
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies