Digital PDFs
Documents
Guest
Register
Log In
XX-76894-A7
August 1970
60 pages
Original
2.0MB
view
download
OCR Version
2.0MB
view
download
Document:
05 ddt
Order Number:
XX-76894-A7
Revision:
0
Pages:
60
Original Filename:
05_ddt.pdf
OCR Text
-363- DEC-10-CDDE-D DDT-10 PROGRAMMER'S REFERENCE MANUAL DIGITAL EQUIPMENT CORPORATION ¢ MAYNARD, MASSACHUSETTS DDT -864Ist Printing January 1968 2nd Printing (Rev) April 1969 3rd Printing (Rev) June 1969 4th Printing (Rev) November 1969 5th Printing (Rev) August 1970 Copyright © 1968, 1969, 1970 by Digital Equipment Corporation The material in this manual is for information 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 DDT -865CONTENTS Page CHAPTER 1 IN'_I'RODUCTIQN Loading Procedure’ 869 Learning to Use DDT 869 871 Type-Out Modes 871 X Mcodifying Storage Words 872 Type-In Modes 873 Symbols 873 Expressions 874 Breakpoints 874 - NI T Examining Storage Words N CHAPTER 2 BASIC DDT COMMANDS ~ Setting Breakpoints 875 7.2 Breakpoint Restrictions 875 7.3 Breakpoint Type~Outs 875 7.4 Removing and Reassigning Breakpoints 876 7.5 Proceeding From a Breakpoint 876 Starting the Program 876 Deleting Typing Errors 876 10 Error Messages 877 1 Summary 877 CHAPTER 3 DDT COMMANDS Examining the Contents of a Program Storage Word 879 Changing the Contents of a Word 880 Inserting a Change, and Examining the Contents of the Last Typed Address 881 Starting the Program . 883 One-Time Typeouts 883 Type-Out Numeric 883 3.5.2 Type-Out Symbolic 883 3.5.3 Type=Out in Current Mode 883 DDT -866CONTENTS (Cont) Page 3.6 Symbols 3.7 Typing In 3.7.1 883 884 | Typing In Symbolic Instructions 885 3.7.2 Typing In Numbers 885 3.7.3 Typing In Text Characters 885 3.7.4 Arithmetic Expressions 886 886 3.8 Delete 3.9 Error Messages 3.10 Upper and Lower Case (Teletype Model 37) 886 887 CHAPTER 4 MORE DDT-10 COMMANDS 4.1 Changing the Output Radix 889 4.2 Type-Out Modes 889 4.2.1 4.3 890 Primary Type-Out Modes 891 Breakpoints 4.3.1 Setting Breakpoints 891 4.3.2 Removing Breakpoints 891 4.3.3 Restrictions for Breakpoints 892 4.3.4 Restarting After a Breakpoint Stop 892 4.3.5 Automatic Restarts from Breakpoints 892 4.3.6 Checking Breakpoint Status 893 4.3.7 Conditional Breakpoints 893 4.3.7.1 Using the Proceed Counter 894 4.3.7.2 Using the Conditional Break Instruction 894 4.3.8 Entering DDT from a Breakpoint 895 895 4.4 Searches 4.5 Miscellaneous Commands 897 CHAPTER § SYMBOLS AND DDT ASSEMBLY 5.1 Defining Symbols 899 5.2 Deleting Symbols 200 5.3 DDT Assembly 900 DDT -867~ CONTENTS (Cont) Page 5.4 Field Separators 901 5.5 Expression Evaluation 902 5.6 Special Symbbls | 902 5.6.1 Order of Symbol Table Search 902 5.6.2 Order of Symbol Table Search for Symbol Education 903 5.7 Special Symbols 903 5.8 Binary Value Interpretation 903 CHAPTER 6 PAPER TAPE Paper Tape Control 905 907 Address Modes 907 Radix Change %07 Prevailing vs. Temporary Modes 907 Storage Words 908 Related Storage Word 908 N ‘One=Time Only Typeouts 909 Typing In 909 Symbols 210 Special DDT Symbols 910 Arithmetic Operators 211 Field Delimiters in Symbolic Type-Ins 211 Breakpoints 1 Conditional Breakpoints 912 Starting the Program 912 N o T3 IsaEs s =5 oL >>>>>>>>>?>?>'>???}>§>> EWN TYpe-Ouf Modes VW o APPENDIX A SUMMARY OF DDT FUNCTIONS - Searching 912 Unused Functions 9213 Zeroing Memory 913 Special Characters 913 Paper Tape Commands 914 DDT -863CONTENTS (Cont) Page APPENDIX B ’ EXECUTIVE MODE DEBUGGING (EDDT) 915 APPENDIX C STORAGE MAP FOR USER MODE DDT N7 APPENDIX D OPERATING ENVIRONMENT D.1 Entering and Leaving DDT 9219 D.2 Loading and Saving DDT 920 D.3 Explanation 921 ILLUSTRATIONS RIM10B Block Format 9206 TABLES 3-1 Special Character Functions 882 vi _869- DDT CHAPTER 1 INTRODUCTION DDT-10 (for Dynamic Debugging Technique)* is used for on-line checkout and testing of MACRO-10 and FORTRAN programs and on-line program composition in all PDP-10 software systems. After the user's source program has been assembled or compiled, the user's binary object program (with its symbol table) may be loaded along with DDT. DDT occupies about 2K of core. By typing commands to DDT, the user may set breakpoints where DDT will suspend execution of his program and await further commands. section. This allows the user to check out his program section by Either before starting execution or during breakpoint stops, the user may examine and modify the contents of any location. Inserfions and deletions may be done in symbolic source language or in various numeric and text modes at the user's option. DDT also performs searches, gives conditional dumps, and calls user-coded debugging subroutines at breakpoints. Symbolic on-line debugging with DDT provides a means for rapid checkout of new programs. If a bug is detected, the programmer makes changes quickly and easily and may then immedfafely execute the corrected section of his program. 1.1 1 LOADING PROCEDURE The user loads the program to be debugged and DDT with the Linking Loader. (The /D switch commands the Loader to load DDT.) To transfer control to DDT, the user types the monitor command, } DDT | After DDT responds by skipping two lines, the user may begin typing commands to DDT. 1.2 LEARNING TO USE DDT This manual is designed to make DDT easy to use. A survey was made of several program- mers who use DDT frequently, and it was learned that most debugging is done with a limited set of commands. These basic commands are described in the next chapter. When learning DDT, it is re- commended that the reader concentrate on learning to use the commands in Chapter 2. If more de- tailed information is required, skip ahead to later chapters. 1-1 DDT -870- After reading Chapter 2, practice debugging, using the basic commands. This may be all that will ever be needed. Read the following chapters which describe the entire command set in detail; this should be read when the basic commands are understood. After learning the sysi'enl\, the Summary of Commands, listed by function in Appendix A, will be useful for quickly finding any DDT command. DDT -871- CHAPTER 2 BASIC DDT COMMANDS The DDT commands most frequently used by programm s are described in this chapter. Many programs are debugged successfully using only these basic commands. This chapter introduces the main features of DDT to the uninitiated user. Later chapters describe in detail these basic commands, less frequently used commands and other more complex options. 2.1 EXAMINING STORAGE WORDS By using DDT, a programméf may examine the contents of any sforagé word by typing the address of the desired word followed immediately by a slash (/). For example, to type out the contents of a location whose symbolic address is CAT, the user types, caT/ DDT now types out the contents (preceded and followed by tabs) on the same |inel . CAT/ MOVEM AC.,DOG+21 The word labeled CAT is now considered to be opened, and DDT has set its location pointer to point to this address. 2.2 - TYPE-OUT MODES ‘The preceding example showed DDT typing out the contents of location CAT as a symbolic insfrucfionj with its address field also relative to a symbol. This is the type-out mode in which DDT is initialized. It is also initialized to type all numbers in the octal radix. The user may ask DDT to re- type the preceding qficmfify, as a number in the current radix by typing an equal sign (=). For examplez, CAT/ MOVEM AC:DOG+21 = 202400526736 DDT has numerous commands which reset the type-out mode permanently, temporarily, or for only one typeout. The modes that can be selected include numeric constants, floating point numbers, ASCII and SIXBIT text modes, and half-word format. Absolute or relative addressing and different radixes may similarly be selected. For example, to change the current type-out mode to ASCII text, the user types the_commcmd3 T ]ln this manual information typed out by DDT is underlined to distinguish DDT output from user~typed input. The two commas indicate that 202400 is in the left half of CAT, and 6736 is in the right half. ' The Teletype keys ALTMODE (ALT), PREFIX (PREFIX), or ESCAPE (ESC) are all equivalent and echo as $. 2-1 DDT -872- or, to change the current type-out mode to half-word format, he types $H or, to select decimal numbers in his typeouts, he types $10R Using these commands (and others described in Chapter 3), a programmer may examine any location in the mode most appropriate to the information stored there. DDT to retype the preceding quantity in the current mode. A semicolon (;) commands Combining this command with a mode change gives results such as the following: CAT/ MOVEM AC,DOG+21 $18R3 MOVEM or CAT/ MOVEM ACsDOG+21 $H3 202400, 5D0G+21 or TEXT/ ANDM 2.3 1,342212(18) 3$T3 AC,DOG+17 ABCDE MODIFYING STORAGE WORDS Once a word has been opened, its contents may be changed by typing the desired new contents immediately following the typeout produced by DDT. make the indicated modification and close the word. CAT/ MOVEM AC,DOG+21 A carriage retum will command DDT to For example, MOVNM AC2,D0G+21 ) The carriage return simply closes the previously examined register without opening cmo’rherl . The line feed (4) may also be used to close a word after examining (and optionally modifying) it. The line feed commands DDT to (1) echo a carriage return, (2) close the current word (making a modification if one was typed), (3) add one to DDT's location pointer, and (4) type out the new pointer value and the contents of that address. Thus, if a line feed had been used in the previous example, the result would be: CAT/ CAT+1/ MOVEM AC,DOG+21 AOBJN MOVNM AC2,D0G+21) XR6,LOO0OPS Location CAT+1 is now open and may be modified if desired. The vertical arrow (1) is similar to the line feed command except that the location counter is decremented by one. Therefore, if the user continued the previous example by typing t the result would be CAT+1/ CAT/ AOBJN MOVNM XR6, LOOPS? AC2,D0G+21 The carriage return command has the additional property of causing temporary type-out modes to revert to permanent mode. DT _873- example. Location CAT is thus depla'yed and shows the result of the modific‘oi‘idn made in the previous | ' The tab ( -}) and Bqéks|ash (\) bofh*closé the current register and open the address last typed (whether typed by DDT or the user). However, tab sets DDT's location pofnfer (.) to this new address while backslash leaves it unaltered. A more complex example may clarify the usefulness of these commands. CAT+1/ AOBJUN XR6,LOOPS —| LOOPS+1/ JUMPL AGC3,FAULT JUMPL AC2sFAULT —| LOOPS/ JRST 45FAULT FAULT/ 2.4 CAMGE AC2,TABL(XR6) CAMG AC2,TABL+1 (XR6)\ SETZI 0=4Zl@@fl::fl{ TYPE-IN MODES The examples in the preceding secfi.o'n showed modifications made as symbolic instructions in a form identical to MACRO-10 machine language. It is also possible to enter various numbers | forms of text. and Octal values may be typed in as octal integers with no decimal poihf. To be interpreted as a decimal number, an integer must be followed by a decimal point. Numeric strings with numbers following the decimal point imply decimal floating-point numbers. The E-notation may also be used on floating-point numbers. Some examples are: Octal: 1234 Decimal integers: 6789. Floating-point numbers: 78.1 76E+2 Incorrect formats: 777777777777 99999999. -6 -25. -4.00E+20 0.249876E-10 76.E+2 (instead write 76 .0E+2) 0.0 To enter ASCII text (up to five characters, left justified in a word), type a double quote (") followed by any printing character fo serve as a delimiter, then type the one to five ASCII characters and repeat the delimiter. For example: "“/ABCDE/ (/ is the delimiter) “ABCDA (A is the delimiter) Note that the mode of a quantity typed in is determined by the user's input format and is | unaffected by any type-out mode seftings. 2.5 SYMBOLS The user's symbol tables are loaded by the Linking Loader when it loads programs and DDT. However, initially DDT is set to treat ohly global symbols (created by INTERNAL and ENTRY pseudoops in MACRO-10) as being defined. This means that only globdl symbols will be used for relative Version 34 DDT 2-3 June 1973 DDT -874- address typeouts and, likewise, only these globals can be referenced when typing tions. in symbolic modifica- In order to make the local symbols within a particul ar program available to DDT, the user types the program name (this comes from the MACRO =10 TITLE statement or the FORTRAN IV SUBROU TINE or FUNCTION statement) followed by ALTMODE and a colon ($:). For example, the command ARCTANS : will unlock the local symbols in the program named ARCTAN . debug several related subroutines simultaneously and This provision in DDT permits the user to reference the local symbol table of each indepen- dently without fear of multiply~defined local symbols. If the user's program is not titled, the command MAIN.$: will unlock the local symbol table. ' NOTE DDT is not quite so stringent on the use of local sym-= bols as indicated above (see Section 5.6). However, the user is advised to unlock symbols with $: until he is fairly familiar with DDT. The user may also insert symbols into the symbol table. value, type the value, followed by a left angle bracket ples are TOT<CONS: 27<S: Some exam- 12.1E+<NUMB: ADR+12<ADRX: To assign a symbol with a value equal to DDT's location lowed by a colon. To insert a symbol with a particular (<), the symbol, and a colon (:). pointer, simply type the symbol fol- For example, XREF +4/ JRST @ TABL(3) BRNCH ¢ will cause BRNCH to be defined with the value XFER+4. 2.6 EXPRESSIONS DDT permits the user to combine symbols and numeric quantities into expréssions by using the following characters to indicate arithmetic operator s . + The plus sign indicates 2's complement addition - The minus sign indicates 2's complement subtraction * The asterisk indicates integer multiplication ' The single quote or apostrophe indicates integer division (remainde slash cannot be used to indicate division since it has another As usual in arithmetic expressions, the evaluation proceeds tion and division performed before addition and 2.7 r discarded)-- use in DDT. from left to right with multiplica- subtraction. BREAKPOINTS The breakpoint facility in DDT provides a means of suspendi ng program operation at any de- sired point to examine partial results and thus debug a program section by section. 2-4 The simpler facts ~DDT -875- about breakpoints are presented next; the use and control of conditional breakpoints is deferred to Para~ graph 4.2, 2.7.1 Setting Breakpoints The programmer can automatically stop his program at strategic points by setting as many as eight breakpoints. Breakpoints may be set before the debugging run is started, or during another break~ point stop. To set a breakpoint, the programmer types the symbolic or absolute address of the word at the location point in which he wants the program to stop, followed by $B. For example, to stop when location 6004 is reached, he types, 600488 | | Breakpoint numbers are normally assigned by DDT in sequence from 1 to 8. The user may instead assign breakpoint numbers himself when he sets a breakpoint by typing, $NB ' when n is the breakpoint number (1<n<8), for example, CAT+3%4B DOG+1%7B 60804%8EB When the programmer sets up a breakpoint he may request that the contents of a specified word be typed out when the breakpoint is reached. To do this, the address of the word to be examined is inserted, followed by two commas, before the breakpoint address. Some examples are DOGs»CATS3B ACI »s»LOOP+28B X, 6004588 2.7.2 Breakpoint Restrictions o Q0 T Q The locations where breakpoints are set may not 2,73 . be modified by the program be used as data or literals be used as part of an indirect addressing chain contain the user mode monitor command INIT be accumulator 0. Breakpoint Type-Outs When the breakpoint location is reached, DDT suspends program execution without executing the instruction at the breakpoint location. DDT then types the breakpoint number and the Program Counter value at the time the breakpoint is reached (this value will differ from the typed=in breakpoint address if the breakpoint is executed by an XCT instruction elsewhere in the program). The format of this typeout is as shown in the following examples: $4B »>> CAT+3 $7B »>»> DOG;I $8B >> 6004 ' If the user requested that a specified address be examined at that breakpoint, it will be opened; for example, $3B >> CAT DOG/ SOJGE 3,GOAT+6 2-5 DDT 2.7.4 . -876- Removing and Reassigning Breakpoints The user may remove a breakpoint by typing, PENB where n is the number of the breakpoint to be removed. For example, %28 removes the second breakpoint. All assigned breakpoints are removed by typing £B The user may reassign a breakpoint without formally removing it. Thus, if he has set breakpoint No. 2 at location ADR (via the command ADR$2B) he may reassign No. 2 to LOC+6 by typing LOC+6$2B. 2.7.5 Proceeding From a Breakpoint Program execution may be resumed (in sequence) following a breakpoint stop by typing the proceed command, $P. If the user does not wish to stop until the nth time that this breakfioint is encountered he types, NSP Then this breakpoint will be passed n=1 times before a break occurs. 2.8 STARTING THE PROGRAM The program is started by typing 56 . This starts the program at the previously specified starting address in location JOBSA. (Typically this is the address from the MACRO=-10 END statement.) The programmer may start at any other location by typing that address followed by $G. For example, 400%G starts the program at the instruction stored at location 4000. BEGINS$G starts the program at the sym- bolic location BEGIN. The start command may also be used to restart from a breakpoint stop when it is not desired to continue in sequence from the point where program execution was suspended. 2.9 DELETING TYPING ERRORS Any partially typed command may be deleted by pressing the RUB OUT key. DDT to ignore any preceding (unexecuted) partial command, and DDT types XXX. mand may then be retyped. This causes The correct com- -8772.10 DDT ERROR MESSAGES If the user types an undefined symbol which cannot be interpreted by DDT, U is typed back. If an illegal DDT command is typed, or a location outside the user's assigned memory area is referenced ? is typed back. 2.1 SUMMARY As was said in the beginning, these basic commands are sufficient for debugging many programs. Complete descriptions of all DDT commands are explained in the following chapters. -879- DDT CHAPTER 3 DDT COMMANDS When DDT is initialized, it is set to type out in the symbolic instruction format with relative addresses, and to type out numbers in octal radix. 3.1 EXAMINING THE CONTENTS OF A PROGRAM STORAGE WORD To type out the contents of c; storage word, the programmer types the address, followed immediately by a slash (/) For example, to examine the contents of a word whose symbolic address is ADR, the user types, | ADR/ DDT types out the contents on the same line. In this manual, information typed out by DDT is under- lined. " ADR/ MOVE A,CC1 The word labeled ADR is now considered to be opened, and DDT continues to point to this address. The point, or period, character (.) represents DDT's location pointer, and may be used to type out its contents, as in the following command. «/ -MOVE A, CCl1 Since we did not change the contents, they are the same, but we used the location pointer to reexamine the currently opened word. Similarly, the programmer may use the period (.) as an arithmetic expression component, such as «+5/ SOJGE 2sADR+3 DDT's location pointer is set to a new value by the / command when immediately preceded by an address. For example, 201/ 0 sets the location pointer to 201, If the user types / without typing an address, the contents of the loca- tion addressed in the last typeout are typed. 667/ MOVE 1,6 o/ MOVE / 0 1.6 Location 667 contains the instruction MOVE lator 6, which is zero. 1,6. The second slash displays the contents of Accumu=~ This does not change the location pointer, which is still pointing to location 667. ADR/ MOVE A,CC1 / ADD 2,5UM+7 It should also be noted that the spaces, which occur after DDT completes the typing of the con- tents of ADR, are aufomcnfit:aily produced by DDT, not the user. -880- DDT The left square bracket ([)] has the same effect as the slash, (the address immediately preceding the [ will be opened). However, [ forces the typeout to be in numbers of the current radix. ADRL 11 ADR] 9. (OCTAL) | (DECIMAL) The right bracket (1] )l has the same effect as the slash except that it forces the typeout to be in symbolic instructions. ADR+231] MOVE 15,LIST+2 The exclamation point (1) works like the slash except that it suppresses type out of contents of locations until either /, [, or ] is typed by the user. The LINE FEED () commands DDT to type out the contents of ADR+1. ADR! (1) MOVE AC,555} (2) ADR+11 ) ADR/ (3) MOVE AC,555 Thus, in step (1) of the example the contents of ADR are not typed out, but the address is opened to modification and MOVE AC, 555 has been typed in by the user. Step (2) of the example shows that the location pointer has been incremented by one and the contents of ADR+1 are not typed out. This is because the exclamation point is still in effect and will continue to take effect until /, [, or 1 is typed in by the user. In this case, the slash terminates the effect of the exclamation point. Step (3) shows that the modification (MOVE AC,555) of ADR typed in Step (1) has been accomplished. 3.2 CHANGING THE CONTENTS OF A WORD After a word is opened, its contents can be changed by typing the new contents following the type out by DDT, followed by a carriage return. For example, ADR/ MOVE A-CC1 MOVE A-CCZ ) The carriage return closes the open word, but does not move the location pointer. A LINE FEED (}) command could also be used to make this modification. A LINE FEED causes a carriage return, adds ]On Teletype Models 33 and 35 the left square bracket ([) is produced by holding the SHIFT key down and striking the K key. The right square bracket (1), is produced by holding the SHIFT key down and striking the M key. -881- DDT one to DDT's location counter (moves the pointer), types out the resulting address and the contents of the new address. Thus, if we conclude our last example with a LINE FEED ADR/ MOVE A»CC1 MOVE A.CC24 ADR+1/ ADD | 3,CC3 ADR+1 is now open, and may be modified by the user. The vertical arrow (1)] works similarly, except that one is subtracted from the location pointer. The open word is closed (modified if a change is given) and the new address and contents are typed out. " | ADR+1/ ADD 3,CC31 ADR/ MOVE A,CC2 Since the vertical arrow subtracts one from the pointer, the resulting address is ADR, and the contents now show the change made in the previous example. 3.3 INSERTING A CHANGE, AND EXAMINING THE CONTENTS OF THE LAST TYPED ADDRESS The horizontal tab (-) causes a carriage=-return line feed, then sets the location pointer to the last address typed (the new address if modification was made) of the instruction in the register just closed. Then DDT types this new address, followed by a slash and the contents of that location, as shown below. ADR5/ JRST ADR1 ADR/ MOVEM cc2/ 666 JRST ADR - B,CC2 - ) The backslash ()2 opens the word af the last address typed and types out the contents. However, backslash does not change the location pointer. The backslash closes the previously opened word and causes it to be modified if a new quantity has been typed in. ADR/ _MOVE AsCC2 JRST The use of the backslash accomplishes two things. X\ MOVE | ' AC,3 First it changes ADR by replacing its contents with JRST X. Second, the backslash causes DDT to type out the contents of X, namely, MOVE AC,3. The location pointer continues to point to ADR, but now location X is open and may be modified if desired. ] t is produced by SHIFT=N on Teletype Models 33 and 35. The backspace key may be used instead of t on Teletype Model 37. 2\ is produced by SHIFT-L on Teletype Models 33 and 35. 3-3 DDT -882If the line-feed control character and the vertical arrow were used in conjunction with the backslash, the results would be as follows. ADR / MOVEM B,CC2 ADR+1/ MOVE A,C ADR/ MOVE A,CC1 MOVE A,CC1\ 105776 |} t N\ 185776 The following is a summary in table form of these special control characters and their cor= responding functions. For example, the chart shows that the forward slash (/) will examine the ¢on- tents of an address, type out in the current mode, open the address, change the location pointer to the address just opened, but it does not cause a new quantity to be inserted in that address. Table 3-1 Special Character Functions Command Character Type Out Contents Mode / Yes Current [ Yes Numeric ] Yes Symbolic | No None \ TAB () t or backspace Line=feed (}) Y«tas2 Yes2 Ye‘s.2 Yes2 Current Current Current Current Carriage No None return ( )) Address Opened Change " Location Poi ointer Insert New Qty If New Qty Has Been . Typed A > Ves Yesl No Yes Yes Yes Yes No Yes Yes (.-1) Yes (.+1) Yes Yes Yes Yes No No Yes - (closes) A ? typed by DDT when examining a location indicates that the address of the location is outside the user's assigned memory area. A ? typed when depositing indicates that the location cannot be written in, because it is either outside the assigned memory area or inside a write-protected memory segment. ;If a user-typed quantity preceded. If | haos not suppressed typeout. -8833.4 DDT STARTING THE PROGRAM The program is started by typing 86 This starts the program with the instruction beginning at the user's previously specified starting taken from location JOBSA. that instruction followed by $G. 4000%G For example, OR. ADR+5%G starts the program at the instruction stored at location 4000 or, in the second part, at the address ADR+5. address The programmer may start at any other instruction by typing fhe address of symbolic The start command may also be used to restart from breakpoints when the user does not wish to proceed to the next instruction. 3.5 ONE-TIME TYPEOQUTS These commands cause a single typeout of the opened word in the mode indicated. 3.5.1 Type Out Numeric Although DDT is initialized to type out in symbolic mode, it is often useful to change numeric typeout. When the programmer types the equal sign (=), the last expression typed DDT in the current radix (initially octal). is retyped by This is useful when a symbolic typeout is meaningless. this usually indicates that numeric data is stored in that word, the user can verify to Since this by typing = and checking the value. 3.5.2 Type Out Symbolic If a typeoutis numeric, and the user wants to examine it in symbolic mode, arrow (+). The last typed quantity is retyped as a symbolic instruction. he i‘ypes the left The address modeis determined by $A or $R. 3.5.3 Type Out in Current Mode To retype a fypeout in the current mode, the user types a semicolon (;). for example, if the user has changed the typeout mode. TEXT/ 3.6 _ANDM 1,342212 (19) This may be used, For example, $Ts ABCDE SYMBOLS Before DDT commands can be used to reference local symbols in the program Symbol Table, the user should type the program name as specified in the MACRO~10 TITLE statement, or the 3=5 FORTRAN IV DDT -884- SUBROUTINE or FUNCTION statement, followed by an ALTMODE and a colon. For example, MAING: makes the local symbols in the program called MAIN available. Since the user can debug several related subroutines simultaneously, reference to several independent symbol tables is permitted, each of which may use the same local symbols with differeni values. DDT allows the user to reference unique local symbols in other programs without respecifying the program name with $: (see Section 5.6.2). However, to access a local symbol that is used in several programs, the user must specify the program name to remove the ambiguity . Global symbols, such as those sfiecified in MACRO=-10 INTERNAL statements, may always be referenced. The user may insert (or redefine) a symbol in the symbol table by typing the symbol, followed by a colon. The symbol will have a value equal to the address of the location pointer (. ). X/ ADD1 3sN TAG: causes TAG to be defined wifh the same value as X. All user defined symbols are global. The user may also directly assign a value to a symbol by typing the value, a left angle bracket (<) and the symbol, terminated by a colon. This is the equivalent of a MACRO-10 direct assignment statement. Some examples are, 787<CONS: 27<X? 3.7 12.1E+2<NUMB: 101 <MIL: TYPING IN To change or modify the contents of a word, the user may type symbolic instructions, num- bers, and text characters. Type-ins are interpreted by DDT in context. That is, DDT tests the data typed in to determine whether it is to be interpreted as an instruction, a number (octal or decimal), or text. Typeout mode settings, such as $S, $C, and $nR, do not affect typed input. The user may type the following: a. Symbolic Instructions b. Numbers (1) (2) (3) c. Floating=point decimal mixed numbers Text (1) (2) Up to five PDP-10 ASCII characters, left justified in a word Up to six SIXBIT characters, left justified in a word (4) A single SIXBIT character, right justified in a word (3) d. Octal integers Fixed=-point decimal integers A single PDP-10 ASCII character, right justified in a word Symbols Anything that is not a number or text is interpreted by DDT as a symbol. -8853.7.1 - , DDT Typing In Symbolic Instructions In general, a symbolic instruction is written for insertion by DDT, in the same way the in- struction is written as @ MACRO=10 source program statement. For-example, X/ AC1,DATE _@_ ADD where a space terminates the operation field, and a comma terminates the accumulator field. For example: (1) In DDT, the operation code determines the interpretation of the accumulator field. If an 1/O instruction is used, DDT inserts the 1/0 device number in the correct place, and (2) indirect and indexed addresses are written, as in MACRO-10 statements, where @ precedes the address to set the indirect bit, and the index register specified follows in parentheses. ' X/@0 ADD 4,eNUMC1T) To type in two 18-bit halfwords, the left and right expressions are separated by two commas. ' For example, X/ @ AssB This is similar to the MACRO-10 statement XWD 3.7.2 | A»B Typing In Numbers A typed=in number is interpreted by DDT as octal if it does not contain a decimal point. ' The fbllowing examples are octal type=ins: 1234 -10101 772 1771777777777 Fixed-point decimal integers must contain a decimal point with no digits following. 1234, =-99. 1011 12345 817. Floating=point numbers may be written in two formats. With a decimal point and a digit following the decimal point: 999.0 =-2.71828 Or as in MACRO-10, with E indicating exponentiation: 12.0E+2 3.7.3 TT+0E+5 12.34E2 31.4159E-1 Typing In Text Characters To type in up to five PDP=10 ASCII characters, left justified in an opened word, the user types a quotation mark, followed by any printing delimiting character, then the text characters, and terminated by the delimiting character. The following examples are legal: "/TEXT/ '"ABCDEFA In these cases, / and A are the delimiting characters DDT -886- To type in up to six SIXBIT characters, left justified in an opened word, the user types ALTMODE quo- tation mark ($"), followed by any delimiting character, then the text characters, and terminated peating the delimiting character. Lower case letters are converted to upper case. by re- Characters outside the SIXBIT set are illegal, and DDT types a question mark. The two examples below are SIXBIT type ins. $'/DIVIDE/ S$"EXXXXXXE To type in a single PDP-10 ASCII character, right justified in an opened word, the user types a quotation mark, followed by a single ASCII text character, then by an ALTMODE. Q8 /% 7% To type in a single SIXBIT character, right justified in an opened word, the user types an ALTMODE, followed by a quotation mark, a single SIXBIT text character and terminated by an ALT- MODE. ' $'0% 3.7.4 S"MH $"$S Arithmetic Expressions Numbers and symbols may be combined into expressions using the following characters to indicate arithmetic operations. , + The plus sign means 2's complement integer addition. = The minus sign means 2's complement integer subtraction. * The asterisk means integer multiplication. ' The single quote means integer division with any remainder discarded. another function.) Symbols and numbers are combined by +, -, *, ' to form expressions. (The slash has Examples: 6+2 S'2 51 +BASE 2%3 +1 3.8 DELETE Any partially typed command may be deleted by pressing the RUB OUT or DELete key. causes DDT to ignore any preceding (unexecuted) partial command and DDT types XXX. This The correct command may then be retyped. 3.9 ERROR MESSAGES If the user types an undefined symbol which cannot be interpreted by DDT, U is typed back. If an illegal DDT command is typed, ? is typed back. Examining or depositing into o location outside the user's assigned memory area causes DDT to type a ?. segment also results in a ? typeout. Depositing in a write-protected high memory -8873.10 | DDT UPPER AND LOWER CASE (TELETYPE MODEL 37) DDT will accept alphabetic input in either upper or lower case. Lower case letters are in- ternally converted to upper case, ‘except when inputting text where they are taken literally as explained in Section 3.7.3. DDT output is in upper case ,. except for text which is taken literally. -889- DDT CHAPTER 4 MORE DDT-10 COMMANDS | This chapter describes other type-out modes, conditional breakpoints, searches and addition- al features. Commands are available to change modes from the initial settings so that numeric data can be typed out in a radix chosen by the user, in floating=point format, in RADIX50 (two uddresses) and as bytes of any size. format ; as halfwords The contents of o storage word may also be typed out as 7-bit PDP-10 ASCII text, or SIXBIT text characters. (See MACRO-10 Manual, Appendix E.) Searches can be made in any part of the program for any word, not-word (inequality), fective address. The user specifies the instruction or data to be searched for and the limits of or ef- the search. Breakpoints can be set conditionally, so that a program stop occurs if the condition is satis~ fied. In addition, a counter can be set up allowing the user to specify the number of times a breakpoint is passed before a program stop occurs. 4.1 CHANGING THE OUTPUT RADIX Any radix (>2) maly be set by typing $nR, where n is the radix for the next typeout only, and n is interpreted by DDT as a decimal value. The radix is permanently changed when the double ALT- MODE is used in the command $$rR. To change the type=out radix permanently to decimal, the user typés, | $510R When the output radix is decimal, DDT follows all numbers with a point. 4.2 TYPE-OUT MODES When DDT-10 is loaded, the type-out modes are initialized to produce symbolic instructions with addresses relative to symbolic locations. For numeric typeouts, the radix is initially set to octal . These modes may be changed by the user. The duration, or lasting effect of a type-out mode change is also set by the user. Prevoiling modes, which are semipermanent, are preceded by two ALTMODEs. Tempdrary modes are preceded by a single ALTMODE. In addition, some mode changes ef- fect only one typeout, such as the equal sigh, which causes DDT to retype the last typed quantity in numeric mode. ‘ In general, prevailing modes are changed by replacing them with another prevailing mode or by reinitializing the sysfém. Temporary modes remain in effect until the user types a corriage return () ), or re=enters DDT. One-time modes apply only to a single typeout . 4-1 -890- DDT 4.2 Primary Type~out Modes $S (OR $%5) Type out symbolic instructions. The address part interpretation is set by $R or $A. $A (OR 3$%A) AC1,TABLE+3 ADD $S ADR/ Type out the address parts of symbolic instructions, and both addresses when the mode is halfword, as absolute numbers in the current radix. _ADD _ 40082 ADR/ $A $R (OR 3$3R) Type out addresses as relative addresses. $C (OR 3%%C) Type out constants, i.e., as numbers in the current radix. $C 254111.,54050 ABLE/ If the output radix is octal and the left half is not 0, the word will be divided into halves separated by commas. SF (OR 3$%F) Type out the contents of storage words as floating-point numbers. $F $T (OR $$T) Del7516230E-45 X/ Unnormalized numbers are typed out as signed decimal integers. Type out as 7-bit ASCII text characters. Left-justified characters are assumed unless the leftmost character is null. If the leftmost character is null, then right-justified characters are assumed . $T $6T (OR $56T) ' REX/ Type out as SIXBIT text characters. $6T $5T $%5T) (OR ABCDE HEX/ ABCDEF Type out symbols in radix 50 mode. (See MACRO-10 Manual, Appendix 6.) $5T $H SNO (OR $%H) (OR $$NO) 4 CREF = 400835,261550 13774/ This command causes the typeout to be in halfwords, the left holf separated from the right half by double commas. The address mode interpretation is determined by $R or $A. A $H Z/ 4503224502 $R S$H Z/ TABL+14,,TABL+13 Type out in n=bit bytes, where n is decimal. (Use the letter O, not zero). $60 BYTS/ 22,23, 1s 73, S51s 46 As in all DDT typeouts, leading zeros are suppressed. 4-2 -8914.3 BREAKPOINTS 4.3.1 Setting Breakpoints DDT The programmer can automatically stop his program at strategic points by setting up to eight breakpoints. Breakpoints may be set before the debugging run is started, or during another breakpoint stop. To sef a breakpoint, the programmer types the symbolic or absolute address of the word at the location whrch he wants the program to stop, followed by $B. For example, to stop when |ocahon 4002is reached, he types, 4002%8 If qll eight breakpoints are in use, DDT will type a question mark. The user may assign breakpoint numbers when he sets a breakpoint by typing ADR $nB, where n is the breakpoint number (1<n<8). For exc;rnple ' SYM$3B ADRSTB If n is not entered DDT will assign 1 through 8 in sequence. In the previous example, when ADR is reached, DDT types, $7B »>> | ADR indicating that the break has occurred ot location ADR, and breakpoint No. 7 was encountered. The break always occurs_lg_e_fgr_e_fhe instruction at the breakpoint address is executed. If the instruction at the breakpoint location is executed by an XCT instruction, the typeout will show the address of the XCT instruction, not the location of the breakpoint. The program stops at each breakpoint address, and the programmer can then type other commands to examine and debug his program--. 4 | | When the programmer sets a breakpoint, he may request that the contents of a word be typed out when a breakpom’ris reached To do this, the address of the word to be examinedis inserted, followed by two commas, before the breakpoint address. . X»,400282B When address 4002 is reached, DDT types out, | | $2B>>4002 X/ ADD__AC,Y+2 where ADD AC, Y+2 is the contents of X. Location X is l_eft open at this point. Location 0 may not be typed out in this way because a zero argument implies no typeout. 4.3.2 Removing Breakpoints The user mdy remove a breakpoint by typing, O5NB 4-3 DDT -892- where n is the number of the breakpoint to be removed. Therefore, n$2B removes the second breakpoint. All assigned breakpoints are removed by typing B The user may reassign a breakpoint. If he has set breakpoint No. 2 at location ADR (ADR$2B), he may reassign No. 2 fo ADR+1 by typing ADR+1$2B, 4.3.3 Restrictions for Breakpoints Breakpoints may not be set on instructions that are Modified by the program Used as data or literals c. Used as part of an indirect addressing chain d. The user mode monitor command, INIT A bredkpoint at any other monitor command will operate correctly, except that if the monitor command is in error, the monitor will type out an error and the Program Counter, but the Program Counter will be internal to DDT and meaningless to the user. e. 4.3.4 A breakpoint may not be assigned to accumulator 0. Restarting After a Breakpoint Stop To resume the program offer stopping at a breakpoint, the user types the proceed command, $P The program is restarted by executing the instruction at the location where the break occurred. user types n$P, this breakpoint will be passed n~1 times before a break can occur; the break the nth time. If n is not specified, it is assumed to be one. If the will occur If the user proceeds by typing $$P (or n$$P), the program will proceed automatically when the program breaks again. If DDT encounters an XCT. loop or the monitor command INIT when proceeding, a question mark will be typed. Alternatively, the user may restart ot any location by typing the start command, ADRS$G where ADR is any program address, or $G, which restarts at the previously specified starting address in location JOBSA. 4.3.5 | Automatic Restarts from Breakpoints If the user requests DDT to type out the contents of a word and then continue program execution without stopping, he types two ALTMODES when specifying the breakpoint address. AC, »ADRSSB 4-4 _893- | DOT When ADR is encountered, the contents of AC are typed out and program execution contin= ves. To get out of the automatic proceed mode, type any Teletype key during the typeout, and then re= move the breakpoint or reassign it with a single ALTMODE. It may be necessary touse ¢ C and DDT ) to get back to DDT to remove or reassign the breakpoint. 4.3.6 Checking Breakpoint Status The user may determine the status of a breakpoint by examining locations $nB, $nB+1, and $nB+2. $nB contains the address of the breakpoint in the right half and the address of the location to be examined in the left half. If both halves equal zero, the breakpoint is not in use. $nB+1 contains the conditional breakpoint instruction. (See Paragraph 4.3.7.) $nB+2 contains the proceed count. 4.3.7 Conditional Breakpoints Breakpoints may be set up conditionally in two ways. The user may provide his own instruc- tion or subroutine to determine whether or not to stop, or he may set a préceed counter which must be equal to or less than zero in order for a break to occur. When a breakpoint location is reached, DDT enters its breakpoint analysis routine consisting of five instructions. SKIPE ENB +1 XCT 50SG $NB+1 SNB+2 JRST break routine JRST praceed routine ; Is the conditional break instruction 07 ; No, execute conditional break instruction ; Decrement and test the proceed counter If the contents of $nB+1 are zero (indicating that there is no conditional instruction), the proceed counter at $nB+2 is decremented and tested. If it is less than or equal to zero, a break occurs; if it is greater than zero the execution of the user's program proceeds with the instruction where the break occurred. If the conditional break instruction is not zero, it is executed. If the instruction (or the closed subroutine) does not cause a program counter skip, the proceed counter is decremented and tested as above. If a program counter skip does occur, a break occurs. If the conditional instruction is a call to a closed subroutine which returns skipping over two instructions, execution of the user's program proceeds. DDT | -894- If the user wishes a break to occur based only on the conditional instructio n, he should set the proceed counter to a large positive number so that the proceed counter 4.3.7.1 will never reach zero. Using the Proceed Counter - If the user wishes to proceed past a breakpoin t a specified number of times, and then stop, he inserts the number of passes in $nB+2, which contains the proceed count. The proceed counter may be set in two ways. The first way is by direct insertion. For example, SNB+2/ sets the counter to 20. @ 20 The second method is as follows. After stopping at a breakpoint, the proceed count may be set (or reset) by typing the count before the proceed command : 20%P ($P will proceed from the interrupted instruction sequence even if the breakpoint has been removed or reassigned.) 4.3.7.2 Using the Conditional Break Instruction = The user inserts a conditiona l instruction, or a call to a closed subroutine at $nB+1. For example, $3B+1/7 @ CAIGE ACC,15) $4B+1/ B Jsa 16, or TEST) When the breakpoint is reached, this instruction or subroutine is executed. If the instruction does not skip or the subroutine returns to the next sequential location, the proceed counter is decremented and tested, as explained in Paragraph 4.2.7. one instruction, the program brecks. If the instruction skips or the subroutine returns skipping If the subroutine causes a double skip return, the program over pro- ceeds with the instruction at the breakpoint address. Examples of Conditional Breakp ints If address 6700 is reached and DDT's No. 4 breakpoint registers $4B/ AC1.:,6700 $4B+1/ CAIE $4B+2/ 200 are as follows: AC1.100 AC1 contains 100, and DDT types $4B>6700 AC1~/ 190 Since AC1 contains 100, the compare instruction skips and the program breaks. If AC1 did not contain 100, $4B+2 would be decremented by one and the user's program 4-6 would continue running. ~895- | DDT If the conditional break instruction transfers to a subroutine which, ofter the subroutine is executed, returns fo the calling location +3, a break will never occur regardless of the proceed counter. Example: If the internal DDT breakpoint registers ($2B and $2B-+1) have the following contents, a break would not occur unless accumulator 3 contains 100. $2B/ ADR_ $2B+1/ IS8 TEST TEST/ o (contains PC when JSR to subroutine , TEST is made) TEST+1/ A0S TEST TEST+2/ CAIE TEST+3/ A0S TEST TEST+4/ JRST 3,100 @ TEST The subroutine TEST causes a double skip (the return is to the third instruction after the call) in DDT if accumulator 3 does not equal 100. A break will never occur at address ADR (regardless of the proceed counter) unless accumulator 3 contains 100, 4.3.8 Entering DDT from a Breakpoint When a break occurs, the state of the user's program is saved, the JSR breakpoint instructions are removed , and the programmer's original instructions are restored to the breakpoinf locations. DDT types out the number of the breakpoint and a symbol indicating the reason for the break, >for the con- ditional break instruction, >>for the proceed counter and the address in the user's program where the break occurred. | Example: If address ADR is reached in the user's program and DDT's bredkpoiin't registers contain: $2B/ ADR $2B+1/ 2 $2B+2/ 2 , (proceed counter contains zero) DDT stops the program and types, $2B>>ADR 4.4 SEARCHES There are three types of searches: the word search, the not-word search, and the effective address search. Searches can be done between limits. a<b >c$ The format of the search command is, w Word search_ N Not=word search E Effective address search DDT -896- HE*] where: Is the lower limit of the search; 0 is assumed if this argument and its delimiter are not present . b Is the upper limit of the search. The lower numbered end of the symbol table is assumed if this argument and its delimiter are not present. ¢ Is the quantity searched for. The effective address search (E) will find and type out all locations where the effective address, following all indirect and index-register chains to a maximum depth of 6410 levels, equals the address being searched for. Examples: 4517 <5002 >X3E INPUT <5000>700SE Examples of DDT output, when searching for X in the above example, are as follows. 4517/ SETZM X 4721/ MOVE 2,X SVB/ MOVE 3, @ 4721 (indirectly addresses X through address 4721) The word search (W) and the not-word search (N) compare each storage word with the word being searched for in those bit positions where the mask, located at $M, has ones. tains all ones unless otherwise set by the user. The mask word con- If the comparison shows an equality, the word search types out the address and the contents of the register; if the comparison results in an inequality, the word search will type out nothing. The not-word search types nothing if an equality is reached. It types the contents of the register when the comparison is an inequality . Examples: INPT<INPT+10>NUMSW INPT<INPT+108>08N $M/ This command types out the contents of the mask register, which is then open. The contents of the mask register are ordinarily all ones unless changed by the user. NSM Inserts n into the mask register. osM FIRST<LAST>@%W 4-8 Lists a block of locations by setting the MASK to zero then performing a word search for zero. June 1973 -897- 4.5 DDT MISCELLANEOUS COMMANDS $Q This command represents the value of the last quantity typed. ADR/1005,200 sV $Q 3 puts backin ADR the quantity 100,200. $Q+1) puts back in ADR the quantity 100,201, $Q/ displays the contents of location 200. $Gr+1/displays the contents of location 201. This command reverses the two halves of the word and then represents the value of the last quantity typed. ADR/100.,,200 $V 3 puts backin ADR the quantity 200, 100. $V+1) puts backin ADR the quantity 200,101, $V/ displays the contents of location 100, $V+1/displays the contents of location 101. inst$X This command causes the instruction inst to be executed. JRST ADRS$X starts the user's program ot ADR. FIRST<LAST$$Z This command zeros the memory locations between the indicated FIRST and LAST address inclusively. If the first address is not present, location O is assumed. If the last addressis not present, the location before the low- numbered end of the symbol tableis assumed. and the symbol table are not zeroed. $Y Locations 20-137, DDT, This command causes a command file to be read and executed. the default name for the command file is DSK: PATCH.DDT. In user mode, The command string $"/NAME/$Y causes the file DSK:NAME.DDT to be interpreted. In exec mode, the command reads a command file from the paper tape reader. When DDT is reading a command file, rubouts and the character immediately following a carriage return (assumed to be a linefeed) are ignored. Any sequence of DDT commands including $X, $G is legal. The ? error message is given if (1) a lookup failure occurs on the command file, or (2) this command is not implemented. Revision 1 DDT 4-9 February 1971 -899- DDT CHAPTER 5 SYMBOLS AND DDT ASSEMBLY A symbol is defined in DDT as a string of up to six letters and numbers including the special characters period (. ), percent sigh (%), and dollar sigfi ($). Characters after the sixth are ignored. A symbol must contain at least one letter. If a symbol contains numerals and only one letter, that letter must not be a B, D, or an E. These letters are reserved for binary~=shifted and floating-point numbers. Certain symbols can be referenced in one program from another. These symbols are called "global". Those which can only be referenced from within the same program are called "local" or "internal". Any symbol which has been defined as global by MACRO=-10 (using the INTERNAL or ENTRY statements) will be considered as global by DDT-10 when it is referenced. FORTRAN subroutine entry points and COMMON block names are globals. All symbols Which the user defines via DDT are defined or redefined as global symbols. The user may want to reference a local symbol within a particular program. In order to do this he should first fypé the program name followed by $:. Thus, if a user wishes to use a symbol local to program MIN, he types the command, | ' MIND:? This command unlocks the symbol table associated with MIN. DDT allows the user to reference unique local symbols in other programs without respecifying the program name with $: (see Section 5.6.2). However, to access a local symbol that is used in several programs, the user must specify the brogrom name to remove the ambiguity. The program name is that specified in the MACRO-10 TITLE statement. In FORTRAN, the program name is either MAIN., the name from the SUBROUTINE or FUNCTION statement, or DAT. for BLOCK DATA subprograms. 5.1 DEFINING SYMBOLS There are two ways to assign a value to a symbol. NUMERIC VALUE <SYMBOL: This command pufs SYMBOL into DDT-10's symbol table with a value equal to the specified NUMERIC VALUE. SYMBOL is any legal symbol defined or undefined. Example: 3D5<XVAR? XVAR has now been defined to have the value 305. TAG: This command puts TAG into DDT=10's symbol table with a value equal to the address of the location pointer. DDT | -900Example: ADD 2, 400 / X3 120812 This puts the symbolic tag X into DDT-10's symbol table and sets X equal to 400, the address of the last register opened. 5.2 ~ DELETING SYMBOLS There are times when the user will want to restrict or eliminate the use of a certain few defined symbols. The following three ways give the user of DDT~10 these capabilities. SYMBOL $$K SYMBOL is killed (removed) in the user's symbol table. SYMBOL can no longer be used for input or output. Example: K X8 This command removes the symbol X from the symbol table. SYMBOL $K This command prevents DDT from using this symbol for typeout; it can still be used for typein. For example, the user may have set the same numeric value to several different symbols. However, he does not wish certain symbol(s) to be typed out as addresses or accumulators. X/ MOVE J» SAV J$K « MOVE N, SAV N$K « MOVE AC»SAV Since the user does not wish J to be typed out as an accumulator, he types in J$K, followed by a left arrow to type out the contents of X again and MOVE N,SAYV is typed out. He then repeats the above pro= cess until the desired result, namely AC, is typed out. Any further symbolic typeouts with the same number in the accumulator field of the instruction will type out as AC. $D The last symbol typed out by DDT has $K performed on it. The value of the last quantity output is then retyped automatically. For example, A/ 5.3 MOVE AC,LOC $D MOVE AC,ABC+! DDT ASSEMBLY When improvising a program on=line to the PDP-10 on a Teletype, the user will want to use symbois in his instructions in making up the program. In this and in other situations, undefined symbols may be used by following the symbol with the number sign (#). The symbol will be remembered by DDT from then on. Until the symbol is specifically defined by the use of a colon, the value of the symbol is taken to be zero. Successive use of the undefined symbol causes DDT to type out #. Appending # to all subsequent uses of the symbol enables the user to readily identify undefined (not yet defined by a colon) symbols. When an undefined symbol is finally defined, all previously tagged (¥ ) occurrences of the symbol will be filled in. -901- - DDT Example: MOVE 2,VALUE# VALUE is now remembered by DDT and may be used further without the user appending the #. If subse- quent _insrruétions are given involving VALUE, DDT appends a # automatically to that symbol. Thus VALUE will always appear as VALUE followed by the # (until VALUE is defined). Example: START! MOVE 2,VALUE#} START+1! ADDI START+2! MOVEM 2, # (user types the ¥) 2, 50} VALUE | ' (DDT types ¥) START+3! JRST VALUE+#1} ' 2TART >4l ! (DDT types # after the plus sign because only at that point does DDT realize the symbol VALUE is complete.) Undefined symbols can be used only in operations involving addition or subtraction. The undefined symbols may be used only in the address field. Example: | MOVEI 2,3*%UNDEF# This is an illegal operation = multiplication with a symbolic tag (UNDEF) which has not previously been defined. The question mark (?) is a command to DDT to list all undefined symbols that have been used in DDT up to that point in the program. Example: ? VALUE UNDEF 5.4 FIELD SEPARATORS The storage word is considered by DDT to consist of three fields: the 36-bit wholeword field; the accumulator or I/O device field; and the address field. Expressions are combined into these three fields by two operators: Space The space adds the expression immediately preceding it (normally an op code) into the storage word being formed. It also sets a flag so that the expression going into the address field is truncated to the rightmost 18 bits. DDT ~902Single Comma The comma does three things: the left half of the expression is added into the storage word; the right half is shifted left 23 bits (into the accumulator field) and added into the storage word. If the leftmost three bits of the storage word are ones, the comma shifts the right half expression left one more.place (I/O instructions thus shift device numbers into the device field). ma also sets the flag to truncate addresses to 18 bits. Double Comma The com- Double commas are used to separate the left and right halves of a word with contents expressed in halfword mode. The address field expression is terminated by any word termination command or character. 5.5 EXPRESSION EVALUATION Parentheses are used to denote an index field or to interchange the left and right halves of the expression inside the parentheses. DDT handles this by the following generalized procedure. A left parenthesis stores the status of the storage~word assembler on the pushdown list and reinitializes the assembler to form a new storage word. A right parenthesis terminates the storage word and swaps its two halves to form the result inside the parentheses. This tesult is treated in one of two ways: a. If+, -, "', or * immediately precede the left parenthesis, the expression is treated as a term in the larger expression being assembled and therefore may be truncated to 18 bits if part of the address field. ' b. If+, -, ', or *did not immediately precede the left parenthesis, this swapped quantity is added into the storage word. Parentheses may be nested to form subexpressions, to specify the left half of an expression, or to swap the left half of an expression into the right half. 5.6 SYMBOL EVALUATION 5.6.1 Order of Symbol Table Search DDT references two symbol tables: (1) o built-in operation table containing the machine language instructions and monitor UUOs (e.g., MOVE, JRST, and INIT) and (2) a symbol table con- structed by LOADER during the loading process, containing all the user-defined symbols. When a user types into DDT a symbol, which must be converted into a binary value, DDT has two places to look for the symbol. If the expression (see Section 5.5) constructed has a zero value (the normal case when typing in the operation code of an instruction such as the JRST part of a JRST ADDRESS instruction), DDT looks for the symbol first in its internal operation table, and then, if the symbol is not found, in the LOADER constructed symbol table. If the expression constructed is non-zero, DDT searches the LOADER constructed table first, and then the internal operation table. 5-4 This method of searching the | -903- ' DDT tables allows instructions such as JRST JRST to work correctly (the first JRST is an operation code, and the second JRST is a user-defined address location). 5.6.2 Order of Symbol Table Search for Symbol Evaluation When DDT searches the LOADER constructed symbol table to evaluate a symbol typed in, it begins the search by looking through the symbols specified by <program name >$: (see Section 2.5). DDT searches the table in the following order: 1. Looks for the symbol as a local or global symbol in the currently unlocked (by $:) program symbols. Looks for the syrhbol as a global symbol anywhere in the symbol table. 3. Looks for the symbol as a local symbol in the symboi table of one and only one program. Looks for the symbol asa local symbol that appears in the symbol table of more than one program, but with the same valuein each table. (If the symbol appears with different valuesin different tables, it will not be recogmzed as defined because thereis no way to resolve the ambiguity.) 5. If all the above fail, the symbél is undefined unless it appears in the internal operation table of the DDT. Fortunately, the searching is accomplished with a single pass over the symbol table. If one of the several identical local symbols (in step 4) is redefined, it becomes a global, and the symbol is then found at either step 1. or step 2. This procedure relaxes the requirement of Sections 2.5, 3.6, and the beginning of Chapter 5 on the use of $: to unlock local symbols. 5.7 SPECIAL SYMBOLS The @ sign sets the indirect bit in the storage word being formed. Example: MOVE 5.8 AC.,@X BINARY VALUE INTERPRETATION ‘When DDT is typing the symbolic equivalent of a binary word or address, it looks for the symbol with a value that best matches the binary. DDT looks through the symbol values in the following order: 1. 2. Searches the symbols of the currently unlocked (by $:) program for a local or global sym= bol with a value that exactly matches the binary to be interpreted. Searches for a global symbol outside the currently unlocked program with a value that exactly matches the binary to be interpreted. DD | 3. -904- Searches all the other local symbol tables for one or more entries with values that match the binary to be interpreted. [If more than one symbolic equivalent is found, the DDT does not use any of them but goes on to step 4. If exactly one symbolic equivalent is found (this includes the case of the same symbol with the same value in more than one local symbol table), then this symbol is used. However, the symbol has a # appended to it to warn the user that this symbol might have a different value in some other local sym- bol table. 4. Searches the currently unlocked program symbols for a local symbol, and searches the entire symbol table for a global symbol, with the value closest to but less than the binary to be interpreted, The closest symbol is then used for typeout if it is not more than 64 smaller than the binary being interpreted. If a usable symbol is not found in any of the above steps, the binary is typed out as an integer in the current output radix. The purpose of this complicated procedure is to output the best symbol without forcing the user to continually respecify the program symbol table names by using $:. DDT -905CHAPTER 6 PAPER TAPE‘I 6.1 PAPER TAPE CONTROL The following commands are used in paper tape control: $L This command causes DDT to punch a RIM10B loader on paper tape RIM10B lodder. (See MACRO=10 Manual, Chapter 6.) Thus, if the user wishes to punch out a program on paper tape he gives a $L command firstin order to get a loader punched on the same tape as the program. Later when the user wishes to readin the program from the paper tape, the hardware READ-IN feature will load the RIM10B loader into the accumulators and then the program will be loaded by the RIM10B loader. FIRST<LAST 2 (See Figure 6~1.) This command punches out checksummed blocks in RIM10B format on paper tape from consecutive locations between FIRST and LAST address inclusively. For example, this command will punch out‘a program existing in core memory in its present sfafe of check-out for later use. ExamEIe 4D00 <20000 ‘ FIRST<LAST $ This command is similar to the preceding command, except that locations whose contents are zero are not punched out whenever more than two consecutive zeroes are detected. ADRS$J This command punches a 2-word block that causes a transfer to address ADR after the preceding program has been loaded from paper tape. If ADR is not present, a JRST 4, DDT is punched as the first word. The following succession of steps will punch a program on paper tape ready to be used as an independent entity. a. sL . b. S000<20000 2 c. 1 2 60808%J (Transfer to address 6000 after program is loaded.) The paper tape functions are not availablein the timesharing user mode version of DDT. is a single control key on.the Teletype, and is identical to t R (control-R). 6-1 DDT -906- ~— Beginning of Tape tape feed Typed in: RIM10B $L LOADER tape feed | FA-1 -WC DATA CHECKSUM FIRST ADDRESS < LAST ADDRESS(TAPE tape feed Checksum includes pointer word WC = word count DATA BLOCK DATA BLOCK tape feed SASJ JRST SA 0 tape feed L/\M Figure 6~-1 RIM10B Block Format 6-2 transfer block SA = starting address -907- ' DT APPENDIX A SUMMARY OF DDT FUNCTIONS A.l TYPE-OUT MODES The following are used to set the type~out mode: Sample Oufpfif (s) T)"Pé Symbolic instructions $5 ADD 4, TAG+1 ADD Numeric, in current radix 3C 4, appe 69. o 185 Floating point $F 7-=bit ASCII text $T SIXBIT text $6T RADIX50 $5T 4 DDTEND $H 40025 » 4005 Halfwords, two addresses ' 0.125E-3 PQRST ~ TSR@PO X+looX+4 Bytes (of n bits each) $NO $80 COULD YIELD 0»214,237,123,0 A.2 ADDRESS MODES The following are used to set the address made for fypeouf of symbolic instructions and half~ words (see examples above): A.3 Relative to symbolic address SR TAG+1 Absolute numeric address $A 4005 RADIX CHANGE The following 1s used to change the radix of numeric fype-oufs' to n (for n>2): . SNR. '$2R COULD YIELD 11010112000001000000000001110010 109 1 A.4 PREVAILING VS. TEMPORARY MODES The following are used in prevailing vs. fémfiorary n"lodes:‘ To set a temporary type-out or address mode or a temporary radix as shown in the commands above, type $ $C . $10R June 1973 -908- DDT Sample Output(s) Type To set a prevailing type-out or address mode on a prevailing radix, in the commands $3C ¢ above, substitute $$10R To terminate temporary modes and revert to prevailing modes, type a carriage return Initial prevailing (and temporary) modes are $%5 $ER $58R A.5 STORAGE WORDS The following are used to examine storage words: To open and examine the contents of any address in current LOC/ type out of contents adr! LOC! To open and examine a word as a number in the current radix adr [ LoC( 254020223454 To open and examine a word as a symbolic instruction adr] LOC] JRST %603 25:40:2@;@@:34’54 $6T3 5%6 To open a word, but inhibit the To retype the last quantity typed (particularly used after changing the current type-out mode) A.6 254020 » DDTEND adr/ type~-out mode RELATED STORAGE WORD The following are used to examine related storage words: To close the current open word (making any modification typed in) and to open the following related words, examining them in the current type-out mode: To examine ADR+1 To examine ADR-1 { (line feed) t (or backspace, on the Teletype Model 37) @DDTEND <L DDT -909Type To examine the contents of the location specified by the address of the last quantity typed, and to set the location pointer to this address ~| (TAB) To examine the contents of address of last quantity typed, but not change the location pointer \ (backslash) Sample Output(s) To close the currently open word, without opening a new word, and revert to ) permanent type-ouft modes A7 (carriage return) ONE-TIME ONLY TYPEOUTS The following typeouts occur only one time: To repeat the last typeout as a number in the current radix To repeat the last typeout as a symbolic instruction (the address part is determined by $A or $R) To type out, in the current type-out mode, the contents of the location spe=- cified by the address in the open in— struction word, and to open that loca=tion, but not move the location pointer To type out, as a number, the contents of the location specified by the open instruction word and to open that location, but not move the location pointer To type out, as a symbolic instruction, the contents of the location specified by the open instruction word, and to open that word, but not move the location pointer A.8 TYPING IN Current type-out modes do not affect typing in; instead, the following are performed: To type in a symbolic instruction ADD To type in half words, separate the left and right halves by two commas 402 55403 To type in octal values 1234 To type in a fixed=point decimal integer 99 A-3 AC1.,eDATEC(C17) DDT -910Type To type in a floating=point number Sample Output(s) i81.11 To type in up to five 7=bit PDP-10 ASCII characters, left justified, delim= ited by any printing character *"/ABCDE/ (/ is delimiter) To type in one PDP-10 ASCII character, right justified "AS ($ must be ALTMODE) character $"ABCDEFGA (A is delimiter) To type in one SIXBIT character, right justified 3"us ($ must be ALTMODE) within a program titled name name$: MAIN.S: To insert or redefine a symbol in the symbol table and give it the value n n<symbol: 14<TABL3: to the location pointer (.) symbol: Sym: To delete a symbol from the symbol table symbol $$K LPCT$$K To kill a symbol for typeouts (but still permit it to be used for typing in) symbol $K TBITS$K To type in up to six SIXBIT characters, left justified, delimited by any printing A.9 SYMBOLS The following are DDT symbols: To permit reference to local symbols To insert or redefine a symbol in the symbol table, and give it a value equal To perform $K on the last symbol typed out and then to retype the last quantity $D To declare a symbol whose value is to be defined later symbol# To type out a list of all undefined sym- bols (which were created by #) A.10 ? SPECIAL DDT SYMBOLS The following are special DDT symbols: To represent the address of the location pointer . (point) To represent the last quantity typed $Q JRST AJAX# DDT -911Type To represent the last quantity typed, $v | To read and execute a command file Y To represent the indirect address bit @ To represent the address of the search $M halves reversed I Sample Output(s) mask register To represent the address of the saved $1 To represent the pointers associated with the nth breakpoint $nB flags, etc. A.11 (see Appendix D) ARITHMETIC OPERATORS The following arithmetic operators are permitted in forming expressions: A.12 Two's complement addition + Two's complémenf subtraction - Integer mulfipficafion * Integer division (remainder discarded) ' (apostrophe) FIELD DELIMITERS IN SYMBOLIC TYPE-INS The following are field delimiters: A.13 To delimit op-code name one or more spaces To delimit accumulator field , (comma) To delimit two halfwords left, ,right To delimit index register () To indicate indirect addressing @ JRST SUBRTE ~65sBEGIN=-1 BREAKPOINTS The following are used for breakpoints: -To set a specific breakpoint n(1<n<8) To set the next unused breakpoint ~ To set a breakpoint with automatic pro=ceed ~ adr$nB CARSS8B adr$B 303$B adr$$nB CAR$$8B adr$$B 303538 x, ;adr$nB AC3,,Z+635B x, ,adr$B X, ,adr$$nB AC4s sABLESB AC3,,2+635%5B To set a breakpoint which will automatically open and examine a specified ad=dress, x x, ,adr$$B Version 34 DDT A-5 AC4» sABLESSB June 1973 -912- DDT Sample Output(s) To remove a specific breakpoint 0$8B To remove all breakpoints $B To check the status of breakpoint n - To proceed from a breakpoint n$P To set the proceed count and proceed To proceed from a breakpoint and thereafter proceed automatically $$P n$$P A.14 $P 25%P s5P 258%P CONDITIONAL BREAKPOINTS The following are used for conditional breakpoints: To insert a conditional instruction (INST), or call a conditional routine, when breakpoint n is reached $nB+1/ $2B+1/0 INST CAIE 3,100 If the conditional instruction does not cause a skip, the proceed counter is decremented and checked. If the proceed count <0, a break occurs If the conditional instruction or subrou= tine causes one skip, a break occurs. If the conditional instruction or subroutine causes two skips, execution of the program proceeds. A.15 STARTING THE PROGRAM The following commands are used to start the program: To start at the starting address in JOBSA $5G $G dress adr$G LOC$G To execute an instruction inst$X To start, or continue, at a specified adJRST 2, eJOBOPCSEX returns to program after tC and DDT commands SEARCHING The following commands are used for searching: To set a lower limit (a), an upper limit (b), a word to be searched for (c), and search for that word A-6 a<b>c$W 200<250>0%W ~913- DDT Type Sample Oufpuf (s) a<B>c$N 351<731>06N a<b>c$E 401 <471 >L0C +6S$E (initially contains all ones) M/ $M7 To insert another quantity n in the mask n$M 71700077777 7%M To set limits and search for a not-word To set limits and search for an effective address To examine the mask used in searches A.17 =1 UNUSED FUNCTIONS The following is unused: $U A.18 ZEROING MEMORY The following are used for zeroing memory: To zero memory, except DDT, loca- $$Z tions 20~137, and the symbol table To zero memory locations FIRST through LAST inclusive A.19 FIRST<LAST $$Z SPECIAL CHARACTERS The folllowing special characters are used in DDT typeouts: Breakpoint stops Break caused by conditional break instruction > Break because proceed counter <0 >5 Undefined symbol cannot be assembied u Half-word type-outs left, ,right 49 5 5 1 402 Unnormalized floating=point number #1.234E+27 #1.234E+27 To indicate an integer is decimal. decimal point is printed $10R 77=63. The Il .e'gal command ? If all eight breakpoints have been assigned RUBOUT echo Revision 1 DDT XXX A=7 February 1971 -914- DDT A.20 PAPER TAPE COMMANDS The following commands are available only in EDDT: Type $L To punch a RIM10B loader To punch checksummed data blocks where ADR]1 is the first, and ADR2 is the last location of the data ADR1 <ADR2 To punch data as above, except that f‘< ATDR';Z $ A more than two consecutive locations s containing zeros are not punched. To punch a one-word block to cause a transfer to adr after the preceding pro- gram has been loaded from paper tape Version 34 DDT Sample Output(s) A-8 adr$J June 1973 -915- DDT | APPENDIX B EXECUTIVE MODE DEBUGGING (EDDT) A special version of DDT, called EDDT, is available for debugging programs in the executive mode of the PDP-10. EDDT also runs in user mode under the monitor and performs the same debugging functions as user-mode DDT. EDDT requires somewhat more memory space than DDT; therefore, it is normally used only with hardware diagnostics and the monitor. All of the paper tape commands are available in EDDT (those in DDT are marked by an 6si'erisk in Chapter 5). The paper tape 1/O routines in EDDT are optional at assembly time. EDDT is used to débug monitor programs, diagnostic programs, and other executive (or privileged) programs. EDDT performs its own I/O on a Teletype and controls the Priority Interrupt system. It does not check JOBREL for boundary limits as DDT does. In EDDT the symbol table pointer is in location 36 and the undefined-symbol table painter is in location 32. If the .NXM STOP switch is ON, the machine will hang up if nonexistent memory is referenced. If this happens, EDDT may be restarted by pressing START, or the CONTINUE switch may be pressed. Stand-alone programs should initialize EDDT by placing the contents of . JBSYM (116) into location 36, and .JBUSY (117) into location 32. The first address of EDDT is DDT; the last is DDTEND. The $$Z command will nof zero locations 20 through 37. (In the user mode version, $$Z does not zero locations 20 through 137. Version 34 DDT See Section 4.5.) B-l June 1973 DDT -917APPENDIX C STORAGE MAP FOR USER MODE DDT See Figure C~1. The permanent symbol table, which contains all PDP-10 instructions and monitor UUOs, is an integral part of DDT. If the user's symbol table is overwritten DDT can still interpret all instructions and UUOs. It will not interpret I/O device mnemonics, internal $ symbols (§M, $I, $1B through $8B), DDT and DDTEND or the following: JOV JEN HALT 0 . - JOBREL (points to highest location in user area) JOBDDT (XWD DDTEND, DDT) JOBSYM (XWD =~ WC, 1st address of symbol table) < 1st address is DDT < Last address is DDTEND < Ist address of symbol table - Highest location in low segment - - DDT e rea - (low. seg- _ ment) L User's Symbol Table 400000 high segment (optional) © Figure C-1 Storage Map for User Mode DDT C-1 June 1973 -919- DDT APPENDIX D OPERATING ENVIRONMENT D.1 ENTERING AND LEAVING DDT When control is transferred to DDT, the state of the machine is saved inside DDT: a. The accumulators are saved. | of a CONI PI, $1) is stored in the result (the system interrupt b;l The status of the priority right half of register $I. c. The central processor flags are saved in the left half of register $I. d .] The PI chdnnels are turned off (by a CONO PI, @$1+1) if they have a bit in register $1+1. e.] The Teletype PI channel is saved in the right half of register $I+2. The Teletype buffer is saved in the left half of $I+2 but can never be restored. The character in the output buffer will have been typed on the Telefype; f. | If DDT was entered via 1C1C and the monitor DDT command, the old program counter word is saved in location JOBOPC. When execution of a program is restarted, the following happens: a. The accumulators are restored. b.] Those PI channels which were on (when DDT was entered) and which have a bit equal to 1 in register $I+1 are turned on. ' (C($I)R/\C ($1+1 )R) V2000~+PI SYSTEM (logical AND (A), logical OR (V)) c.] The Teletype PI chclmnel is restored. 0 - TTIDONE - TTIBUSY - TTO BUSY TTO done is set to 1 if either TTO busy or TTO done was on when DDT was entered. Otherwise 0 - TTO done. d. The processor flags are restored from the left half of register $1. e. To return to a program interrupted by 1C, the user types: JRST 2, @ JOBOPCS$X to restore the PC and flags. ] Functions not available in the timesharing user mode. D-1 DDT D.2 -920LOADING AND SAVING DDT Load and save DDT.SAV in 2K of core in the following manner: ExamB|e]_ Instructions (1) Load DDT. «R LOADER *DSK:DDT$ LCADER EXIT L +ST 140 $3H JOBSYM/ AND2 1777) + 2000 into right half of 6. 6! 5666s,3666 (8) Perform a block transfer stopping at 3777. BLT 6,3777%X (6) Open JOBSYM; leave the left half as is (2) Enter DDT. (3) Type out, in halfword mode, the contents =-112,,5666 of JOBSYM. (4) Open register 6, and put (JOBSYM)RH into left half of 6; put ((JOBSYM)RH and change the right half to (7) (8) (JOBSYM)pyy AND? 1777) + 2000. JOBSYM/ Zero memory, except for DDT. $%82 ~112,+3666 Start over at 140 to initialize the new symbol table. (?) =112555666 140 %G Open JOBSA and put DDTEND in the left half and DDT in the right half. JOBSA! (10) Change back to symbol type-out mode. £35S (11) Return to monitor. 1C (12) Reduce core to 2K. +CORE (13) Reenter DDT. (14) Check that JOBREL is 2K. JOBREL/ (15) Return to monitor. tC (16) Save DDT. (17) Check start address. DDTEND,»»DDT 2 <DDT +SAVE 3777 DSK DDT +START -/ 3777 ]ALTMODE is indicated by $. 2Logitc:«':nl AND. D-2 Version 34 DDT -921D.3 DDT EXPLANATION T!fi\e DDT saved file must be saved in 2K (minimum amount of core needed). Also, a starting address must be set up for DDT as |o§atfon- 140. To get DDT into 2K, the DDT symbol table must be moved down to the uppef end of the Fh";if 2K of core. Any unused Ilocafions in DDT should be set to zero ($$Z) and JOBSYM should be set to the new location of the start of the DDT symbol table. Before saving the resulfin‘g filé, a CORE 2 ru_e,quest should Ve given to the monitor to ensure that DDT is saved as a 2K core image.
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies