PDP-1 COMPUTER ELECTRICAL ENGINEERING DEPARTMENT PDP-23 INVISIBLE DEBUGGER (ID) 1976 February 25 >>13<>40<<>40<<<3) to start the file system on tape unit n (See memo PDP-42, Microtape File System). When the user runs any program (either his own program or a system program such as Expensive Typewriter), his ID is inactive. It will be restarted if the program executes any illegal instruction or the console's "call" button is pressed (see the section on breakpoints). After a normal assembly, ID is started in a special way by the assembler (see description of mta 5). ID loads the program and obtains its symbols. Typing P will begin execution of the program at the address specified to the assembler in the "start" pseudo-instruction. For the sake of accuracy, descriptions of commands include their effect, if any, on programs with several processes. The user unfamiliar with multiprocessing should assume that only one process exists. >>13<<>>56<< Fields ID allows operations to be carried out on the core fields of the user, or of spheres owned by the user, or on drum fields or files owned by the user, or absolute drum fields, by making the field involved the "current field". Initially ID is set up so that the user's core 0 is the current field. This is the usual state. The current field is normally specified by the underbar command. Typing>>40<<. x>>40<< causes field x to become the current field. ? is typed by ID if the field does not exist, i.e. the user does not own the corresponding core or drum field. Typing underbar (>>40<< ) alone will cause the current field to be printed out. The "field" assignment is as follows>>40<<. 0-5 core fields 100-177 drum fields assigned to user 200-377 absolute drum fields (read only) 1MNN core field M of sphere owned by user at index NN 1MMNN field MM of file on user index NN This numbering is used for commands H, O, S, U, V, and Z (explained later) as well as underbar (>>40<< ). For example, typing>>40<<. 224V verifies the current field against absolute drum field 24. In this memo, "field" always refers to this numbering unless "drum field" or "core field" is explicitly stated. The "current location" is the 12-bit address of the last register opened by a command other than one of those few that open a register without changing the current location. The character point (.) , when not part of a symbol or number, has the value of the current location. The character Q has the value of the last quantity typed by ID or the user. >>13<<9 Register Examination Commands Command Action / When preceded by an argument, slash opens the register in the current field whose address is specified by the low 12 bits of the argument, sets the current location to that address, and (unless in type-in mode) types the contents of the regis- ter according to the current type-out mode. When not preceded by an argument, slash (/) behaves just like Q/, except that it does not change the current location. | Similar to slash (/), but uses a 15-bit address. In particular, when preceded by an argument, it changes the current field to the core field specified in bits 3-5 of the argument, then does what slash does. Without an argument, it behaves like slash (/) except that the field specified in bits 3-5 of Q will be used, rather than the current field. The current field is not changed. [ Similar to slash (/), but types the contents of the register as a positive number, regardless of the current type-out mode. Does not change the type-out mode. ] Similar to [, but types the contents of the register as an instruction. ( Similar to slash (/),but causes ID to enter type- in mode. In this mode, contents of registers are not typed out at all. Type-in mode is left when a carriage return is typed in or out, except that commands ^, backspace and tab keep ID in type-in mode. Type-in mode is useful for typing short programs directly into core. >>13<>40<<. whenever carriage return is typed by ID (after certain commands), any open register becomes closed>>40<<, however the register is not modified. backspace Same action as carriage return, and in addition opens the next register the way .+1/ does. This command types a carriage return, the current field (unless zero), the address (in the address type- out mode), a slash (/), tab, and (unless in the type-in mode) the contents of the register (in the current type-out mode) and another tab. Note that if . was 7777, location 0 of the current field will be opened. ^ Like backspace except that it opens .-1 tab Same action as carriage return, and in addition opens a register the way slash (/) does. That is, the low 12-bits of the argument to the tab (or, if no argument, Q) will be used as an address in the current field. The address is typed as for back- space. > Without argument, same as slash (/). With an argument, deposits the argument in the currently open register (if any), then does what slash (/) does except that the current location (.) is not changed. >>13<<9 Type-out Mode Command Action S Without argument, sets the type-out mode to sym- bolic mode. This is its initial state. The con- tents of registers will be typed as symbolic instructions unless the mode is overridden with [, ], =, ~, or >>20<<. Numbers in the range 777700 to 777777 are typed as negative numbers. C Without argument, sets the type-out mode to con- stants mode. The contents of registers will be typed as unsigned numbers, unless the mode is overridden. T Without argument, sets the type-out mode to text mode. The contents of the registers will be typed out as flexo code characters unless the mode is overridden. >>20<< Types the argument (if none, Q) as a symbolic instruction, regardless of the type-out mode. Neither opens, closes, nor modifies any register. = Types the argument (if none, Q) as an unsigned number. Neither opens, closes, nor modifies any register. ~ Types the argument (if none, Q) as flexo code characters. Neither opens, closes, nor modifies any register. R Without argument, sets the address type-out mode to symbolic (Relative) mode. This is its initial state. Addresses (printed by commands backspace, tab, ^, etc.,) will be typed symbolically. O Without argument, sets the address type-out mode to octal mode. Addresses will be typed out as numbers. numR Sets the radix to num. Num is interpreted as a decimal number, regardless of the previous radix. The radix is initially 8. H (Hoctal) Without argument, same as 8R U (Unoctal) Without argument, same as 10R >>13<>13<>40<<. 00100| first address of symbol table 00101| last address of symbol table 00102| number of symbols fH (Hoard) Saves ID's symbol table (except initial symbols) on field f. ID prints the lowest address occupied by the symbol table, which extends from there to 7777 on field f. fO (Obtain) Kills all symbols like K, then reads the symbol table stored on field f by an "H" command. x>13<<>>60<< val sym) Defines symbol sym with value val. sym, Defines symbol sym with the current value of the current location counter (.). sym>>04<< Defines the symbol sym with the value equal to the low 12 bits of Q. symK (Kill) Deletes symbol sym from the symbol table. K With no argument, deletes all symbols except the PDP-1 instruction mnemonics. If these were rede- fined, the original value is restored. symC (Calm) Half kills the symbol sym. ID will recog- nize it when typed in, but will not type it out. symL (Loud) Undoes the effect of symC, so ID will type out the symbol in symbolic instructions. >>13<>40<<. 'SXX> If an undefined symbol is typed, ID types "U" and ignores everything typed since the last tab or carriage return. Command Action ? Typing a question mark (?) causes ID to ignore everything typed since the last tab or carriage return. This is the usual method for correcting typing errors. " Causes the previous 1, 2, or 3 characters to be taken as their flexo code value. ' Causes the previous 1, 2, or 3 characters to be taken as their squoze code value. The following connectives are performed in left-to- right order. space Same as + + 18 bit addition in current aritmetic mode - 18 bit subtraction in current mode. Unary - is negation, so -0=777777 in 1's and 0 in 2's. >>06<< Logical and >>05<< Logical or >>13<>40<<. A/ The following registers appear to be consecutive>>40<<, i.e., backspace, ^, and expressions like .+3 will work for them the way they do for ordinary registers. These special registers refer to the current user process (see centerdot (>>40<< ) command). A Accumulator I In-Out Register X Index Register F Flag Register (see below) G Program Counter, bit 0 contains overflow, bit 1, extend mode bit 2, twos complement mode W W Register, (used for communication with the supervisor) The flag register contains the following. 0 1 2 3 4 5 . . . . . . . 12 13 14 15 16 17 Program Flags AMD AEF AAL SBM SBH PRL 1 2 3 4 5 6 bits 0-1 are decoded as the address mode 00 nam normal mode 01 bam base mode 10 iam index mode 11 dam defer mode >>13<>40<<. only the low 12 bits of M+1 and M+2 are used. B Breakpoint locations B+1 B+2 B+3 When preceded by an argument, the commands A, I, X, and M deposit the argument in the corresponding register. The command x>40<<. M>>56<< Resets M, M+1, and M+2 to their initial contents. B>>56<< Resets all breakpoint registers. >>13<>40<<, ID as- sumes that instructions are executed in normal mode and not under aam's with at most one defer. An E search never prints skp, sft, law, iot, ivk, or opr instuctions. This command is of limited value if the program being debugged does any indexed addressing. For the commands W, N, E, S, U, V, and Z>>40<<, if the current field (or either field f or the current field in the case of fS, fU, fV, or fZ) is a PRL protected field (core 0 of a sphere with PRL on), the lower limit actually used is the maximum of 100 and the lower limit specified in M+1 or an argument to the command. In other words, these commands avoid trying to reference C-lists. >>13<>40<<, j/ contents of current field, contents of field f, location j location j+x >>13<>56<>56<>13<<7 Process Control The user's processes are numbered starting with 1. Registers A, I, X, F, G, and W always refer to the current process. Command Action >>40<< (Centerdot) Types the current process number. Types 0 if no process exists. x>>40<< Makes process x current. >>04<>04<>13<>56<< (which clears all breakpoints), or by commands E or nF (see below). CAUTION>>40<<. Breakpoints should not be placed at locations which are examined or modified by the program, since ID saves their contents and substitutes the trap instruction bpt. The command P (Proceed) is used to resume execution after a breakpoint has been reached. The instruction at the breakpoint will be executed once, and the user's process will continue running. If the breakpoint is reached again it will trap again. xP will proceed through the breakpoint x times before trapping to ID. If a different breakpoint is reached, during a multiple proceed, it will trap immediately regardless of the proceed count. The P command may be used even when no breakpoint has been reached (e.g. when ID is entered by hitting the call button). In this case, ID simply starts all processes running, giving control of the typewriter to the user. >>13<<4 The command -nP starts the user running so that after n instructions have been executed by the current process the program traps to ID as though a breakpoint had been reached. This command is used to closely follow the progress of a program. The command xx (x-"cross") may be used to execute single instructions or subroutine calls. ID places the instruction x in the current field (which must be a user core field) at the address specified by the low 12 bits of the x register, puts that address in the program counter of the current process, and starts all processes (usually this is the only process). When the user's program counter becomes equal to the original program counter incremented by one or two, ID resumes control. The program counter is restored to the contents that it had before the x command. The effect is to execute the instruction x, but if x is a call to a subroutine, the entire subroutine is executed. If the program counter was incremented by one, ID types two carriage returns after the x>>40<<, if the program counter was incremented by two, (i.e., the instruction skipped), three carriage returns are typed. y>13<<5 Mnemonic Commands All commands in this group have the following format>>40<<. >>04<>04<<" is followed by a descriptive command name, which may be abbreviated down to the point of ambiguity. Each command may take zero, one, or two parameters. These are the i and n fields of the command. These parameters are always taken as octal numbers, regard- less of the current radix. The parameter i is always a capability index. If this parameter is required and is missing or zero, the first free capability index will be assumed. If the parameter n is required and is missing, 0 will be assumed. For a discussion of the objects mentioned below, see memo PDP-35, Instruction Manual, Parts 4 and 5. Command Action >>04<>34<>04<>04<>04<>04<>04<>40<<. Reverse grant the capability on the spheres c-list index 14, delete the trapping sphere (ID), subjugate the capability reverse-granted (failure of this >>13<<3 ivk, per se, is not however sufficient grounds for deletion of the capability), and finally enable the capability. Should the AR encounter any difficulty in executing the above se- quence, or should the computation thus enabled fault to the AR for any reason, it will be deleted. >>04<