LIBRARY OF THE UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN 510.8 XX(or no. 547-5 5 Z cop- 2. beiow v efore the ife? * mi £*"'* to 2 7996 aae *teid 0w Digitized by the Internet Archive in 2013 http://archive.org/details/etsstudentsguide547davi 5/a w (ML uiucDc;s-R-72-5 1 t-T THE LIBRARY GB THE OCT 2 6 1972 UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN ETS STUDENT'S GUIDE by Al Davis Jim Hart Don Oxley Keith Phillips July 1972 y UIUCDCS-R -72-5^7 ETS STUDENT'S GUIDE hy Al Davis Jim Hart Don Oxley Keith Phillips July, 1972 Department of Computer Science University of Illinois at Urb ana-Champaign Urbana, Illinois x This work was supported in part by the National Science Foundation under Grant No. US NSF GJ-812. 3 M 1 PS Sfl- St 2- TABLE OF CONTENTS Page 1. INTRODUCTION 1 2. PUPETS 5 3 . EDETS 11 h . ASSETS 17 5. DEBETS 19 6. GIZMO 38 ETS Student's Guide -1- July 1972 1. INTRODUCTION 1.1 What is ETS? Educational Timesharing System, commonly called ETS, is a multi-user, conversational timesharing system designed for use Toy students who are not acquainted with the use of a computer. The basic system consists of a monitor, a file system, an input/output system and a command string interpreter. It runs on the PDP-11. 1.2 What is timesharing? Timesharing is the property of an operating system that enables it to give multiple users the illusion of being exclusive users. Under a timesharing system a user can sit down at a console and in one or more sessions write, debug, assemble, and run his program, all in an interactive mode . 1.3 What facilities does ETS provide? ETS keeps in its filing system, a number of useful systems programs which may assist you in your programming. These include an editor (EDETS), to add, delete, or alter segments of your source program; an assembler (ASSETS), to assemble your source program written in PAL-11 into a machine language module; a peripheral device handler (PUPETS), to enable you to input or output your programs; and a complete debugging package (DEBETS) for you to use in getting those nasty little bugs out of your code. l.h How do you talk to ETS? 1A.1 Command Mode Command Mode can be recognized by the presence of a period at the 11 Lnnin of the line on the teletype. This is the signal by the monitor that he is ready to accept a command from you. ETS Student's Guide -2- July 1972 The folio-wing are valid commands: 1.4.1.1 .HEnm XXXXXX This is the "hello" or login command which tells the monitor that you want to be a user. You must login only if the monitor tells you to: LOGIN PLEASE In the above statement, n and m are code numbers and XXXXXX is a code word which you must obtain from a T.A. or staff member. 1.4.1.2 ^SI n This is the "size" command which asks the monitor to reserve for you a certain amount of core. If you do not give the monitor this command, he will automatically reserve IK (1024 words). In the above statement n is an integer between and 5 inclusive. The units are IX words. 1.4.1.3 iME n This is the "message" command which asks the monitor to print out for you the error message designated by number n. It is not necessary for you to use this command unless you receive an error message. 1.4.1.4 ^RU XXXXXX This is the "RUN" command which requests the monitor to execute a program located in the filing system. XXXXXX is the name of requested program. For example, ^RU ASSETS vail start the execution of the assembler. This command, if successful, will take you out of command mode, and put you into the hands of the executing program. 1.4.1.5 j_BY This is the "BYE" command which requests that the monitor cancel your login command. That is, after this command, you will not be logged in as a valid user of the system. ETS Student's Guide -3- July 1972 1.4.2 Other Modes When not in command mode, you will probably be talking basically to an individual systems program. Each of these has its own special character which informs you of who you are talking to and what that program expects from you. See the following sections of this manual for details of these particular programs. 1.4.3 Special Characters 1.4.3.1 Carriage return [the key on the teletype marked "return"] is used as a terminator or "break" character. That is, it is used at the end of any input message from the teletype. For example, to ask the system to give you a core size of 4K, you would type the characters .81 4 and then type the "return" key to inform the system that you have completed the message. 1.4.3.2 Line Feed is used as a terminator or "break" character also but should only be used within certain systems programs when specifically requested in this manual. 1.4.3 -3 Control B [push both the CNTL key and the B key simultaneously] can be used to inhibit echo. If for example a program asks you for a code word you should first hit Control B, then the code word, and then another Control B to return to echo mode. This will simply suppress the printing of the code word on the teletype paper. 1.4.3.4 Control V [push both the CNTL key and the V key simultaneously] means cancel the present instruction. The particular uses of this will be explained later within each systems program manual. ETS Student's Guide -4- July 1972 1.4.3.5 Control Q [push both the CNTL key and the 0, key simultaneously] means "Quit this program." When Control Q is typed, the character string tQUIT will he printed on the teletype, the present executing program will be cancelled and you will be returned to command mode with the monitor again. 1.4.3.6 Control [push both the CNTL key and the key simultaneously] means "Cancel the output." That is, if any program is printing a message of any kind to you and you don't want to wait for it to complete, just type Control and the printout will be cancelled. 1.4.3.7 Control U [push both the CNTL key and the U key simultaneously] means "Cancel this input string." This should be used to cancel anything you type on the teletype since your last carriage return or line feed. Thus if you make many mistakes in typing a line, don' t type return. You should type Control U and then start your line again. 1.4.3«8 Rubout on the teletype is equivalent to back space on a conventional typewriter. To backspace n characters [i.e., cancel last n characters] simply type rubout n times. Typing rubout will cause the teletype to retype the characters that you are cancelling delimited by slashes. Thus if you spell EDETS wrong by typing P instead of T and immediately rubout and then type correctly, your teletype paper would look like: ^RU EDEP\P\TS The \P\ indicates that the P has been cancelled. ETS Student's Guide -5- July 1972 2. Peripheral Utility Package for ETS 2.1 PUPETS is a generalized file utility package "with which you can manage your files. It is invoked by typing RUN PUPETS PUPETS will then identify itself and type a hash mark (#) to indicate that it is ready to accept a command string. 2.2 A command string consists of up to six file strings. Separated by commas. A file string consists of a file name and a switch list separated by a slash. 2.2.1 A file name consists of three fields: 1. A device name 2. A file label 3. A project programmer number 2.2.1.1 The names of the devices are: CDR Card Reader LPT Line Printer I'l'i; Paper Tape Reader PTP Paper Tape Punch DSK Disk KBD User's Teletype TTY Any Teletype DTA DEC Tape TTY and DTA require a device number after the name. TTYO is the same as KBD. The device name is not necessary for disk files since disk will be assumed if no device name appears. Device names are terminated by a colon ( : ) . 2.2.1.2 The file label consists of up to six characters plus an extension of up to three characters set off by a period. Characters may be alphabetic, numeric, or the dollar sign. The file label is optional for devices other than disk and DECtape. ETS Student's Guide -6- July 1972 2.2.1.3 The project programmer number is enclosed in square brackets and consists of two numbers separated by a comma. If no project programmer number appears, yours will be assumed. 2.2.1.4- The following are valid file names: 1. CDR: 2. TTY3: 3. PROGRM.BIN[15,3] 4. FILEA 2.2.2 A switch list consists of an arbitrary number of switch strings separated by semi-colons (;). Switch strings consist of one switch followed by parameters separated from each other and from the switch by colons (:). 2.2.2.1 The following are the switches presently defined: OP Open the file. CL Close the file. RE Rename the file . PR Change the protection on the file. DE Delete the file from the UFD. 2.2.2.1.1 Open: If no parameters are present, it will give an error if the file does not exist. The following parameters will cause the file to be created: CN Create if file does not exist. Otherwise, just open it. EE Create if file does not exist. If file already exists, flag an error. 2.2.2.1.2 Close: Close the file. 2.2.2.1.3 Rename: Parameter is the new name for the file and must be last in the switch string. You must be the owner of the file to rename it. 2.2.2.1.4 Protect: Parameter is new protection code for the file. You must be the owner of the file to change protection. ETS Student's Guide -7- July 1972 2.2.2.1.5 Delete: Remove the file from the UFD. You must be the owner of the file to delete it. 2.2.2.2 If no switches are found, OP and CL will be assumed with no parameters. 2.2.3 The following are examples of valid command strings: 1. FILEA/OP: CN; PR: 6; CL, CDR: 2. FILEB/RE: FILEC.EXT, FILED/DE 2.3 PUPETS may also be used to transfer data between files by typing a transfer string between the object files (files into which data will be transferred) and the source files (files from which data will be taken). The transfer string is of the form ', then returns to command mode without typing the standard colon. The location is now 'open' and may be modified. The following inputs in particular are of use while it is open: 5.1.1 Typing a line feed causes DEBETS to open and dump the next sequential location. If an octal number was typed before the , this is inserted into the word or byte presently open before the next is opened. 5.1.2 Typing causes DEBETS to insert any number typed into the presently open location, 'close* it, and return to normal command mode with a colon. 5.1.3 Typing 't ' (shift-N) causes DEBETS to insert any number typed into the presently open location, and open the immediately preceding location. (DEBETS decrements or adds 1 or 2 depending on whether the first location opened is a byte or a word. ) ETS Student's Guide -21- July 1972 5.1.4 If a word is open, typing '©' causes DEBETS to take the ASCII character following the quote mark and insert it into the presently open location. If a word is open, the high byte becomes zero. This can be used for changing individual bytes of a character string. 5.2 ASCII Insertion DEBETS allows the user to change an entire character string at will. Typing '
;A' causes DEBETS to input a new line from the user to be placed in core starting at
. Every byte of the line is placed in core except the terminal character of the line (CR, LF, or ALTMODE). DEBETS then opens the byte immediately following the st ing in core and awaits new commands. In this way the user can add, if he wishes, some special terminal to the end of the string. 5.3 Dumping Core Core may be dumped in three modes — word, byte, or ASCII. In word mode, k words are dumped per line, in k 6-character strings followed by the ASCII representation of those 8 bytes. In byte mode, 8 bytes are dumped per line, in 8 3 -character strings, followed by the ASCII representation (which is delimited by asterisks). In ASCII mode, l6 bytes are dumped in ASCII per line, with non-printing characters printed as '.'. A dump may be specified in one of two ways: (1) By typing '; D' followed by 'W, 'B', or 'A' to indicate the mode, or (2) By typing ' ;D' followed by 'W, 'B', or 'A' followed by N dots ('.'), to produce N+l lines of output. ETS Student's Guide -22- July 1972 When the dump is complete, DEBETS returns to scanning the original input string, so that multiple dump commands may be given in the same line of input. Examples : '100;200DW *)' to dump words from 100 to 200. '20;30DA^ ' to dump ASCII from 20 to 30. ';1006DB. .. f ) ' to dump bytes in k- lines starting at 1006. or several at once: ' 100 ; 200DW 20 ; 30DA ; 1006DB . . . ^ * 5»b- Disassemblies If the user wishes to check some instruction patches he has made, he can do so by typing t
;D' . DEBETS then takes the word at
(provided
is even), parses it, and prints a mnemonic if it is a valid opcode, or else prints the message 'JIMK'. It then waits for the user to type a line feed to disassemble the next instruction. If line feed is not typed, DEBETS returns to command mode. 5.5 Loading a Program - Changing Size 5« 5*1 To load a program the user types 'KCK>', DEBETS responds by first typing the size at which it is running (this is forced to 3 when DEBETS starts executing). The user may alter the size by typing 3, k, or 5, or type a terminal to bypass this and keep the same size. The size at which DEBETS is running controls the amount of storage the user may access. At size 3, the highest address he can reference is about 2000 (octal); at size k, about 6000; at size 5> about 12000. (The user may quickly ascertain his highest referenceable address by typing '.H' when in normal command mode.) ETS Student's Guide -23- July 1972 5.5.2 Next DEBETS requests the name of a load file. If a terminal is typed in response, DEBETS returns to command mode. Otherwise, DEBETS inputs the name (which must be terminated by a , , or , not a hundred blanks! ), and attempts to open the file. If it fails, a message is typed and DEBETS again requests the file name. When it finally gets a valid file open, it requests a load offset. Normally this will be zero, but a nonzero offset causes the program to be loaded starting at address . Thus, location 1000 in the assembler listing corresponds to location 1000+ of the user's area. This facility is useful for testing relocatability of a program. 5.5.3 Finally, when the load file is open and the offset is determined or it defaults to 0, DEBETS attempts to load the program. If an error occurs, a message is typed, and DEBETS requests a load-file name again; otherwise, DEBETS types 'LOADED O.K.', then requests a file name. 5.6 Setting Breakpoints, Executing a Program, Error Messages, I/O Conventions 5.6.1 Breakpoints A 'breakpoint' is any (word) location specified as such by the user. When the user's program is executing and it arrives at a breakpoint location, a message of the form ! Bnnn:
'is typed and DEBETS returns to command mode. The 'nnn' in the message is the number of the breakpoint, of which there may be a maximum of 30 fi , numbered to 27q. The user may create or delete breakpoints as follows: Create: '
;B' to make
the first available breakpoint in the breakpoint table. Delete: ';B' to delete all breakpoints. ' ;nB' to delete breakpoint number n. ETS Student's Guide -2k - July 1972 To be more specific: when the user starts his program executing, all the locations he has specified as breakpoints are saved and replaced by HALT instructions. Before DEBETS executes any instruction, it checks to see if it is HALT. If it is, DEBETS checks to see if the HALT is at the address of a breakpoint. If it is, DEBETS decrements a repeat count for that breakpoint. If the count becomes zero, DEBETS types the message 'Bnnn:
', restores the original contents of all breakpoint locations, and returns to command mode. (The repeat count is normally 1 — see section VII on how to change it, under '.B'.) If the HALT is not at a breakpoint address, DEBETS types 'BE :
', restores breakpoint locations, and returns to command mode. (The 'BE' is for 'Bad Entry' or maybe 'Breakpoint Error' . ) 5.6.2 Program Execution Commands Program execution may be started in two possible ways. In brief, the calling sequences are: 'P' or '
;G' . 5.6.2.1 The first is a 'Proceed' and is to be used mainly in conjunction with breakpoints. DEBETS takes whatever address is in the user's program counter, and attempts to start execution at that address. If it is the address of a breakpoint, the breakpoint is ignored and the normal instruction there is executed. After execution leaves this point, the breakpoint is activated. THIS IS PECULIAR TO PROCEED, and is designed for situations when execution has been stopped at a breakpoint, so that it can PROCEED normally when a P-command is typed. The meaning of is explained below. ETS Student's Guide -25- July 1972 5.6.2.2 The G-command is used to start execution at the address
typed by the user. Provided
is even and within bounds, it is loaded into the user's program counter and execution begins. In this case, if
is a breakpoint, there will be an immediate breakpoint interruption and no instructions will have been executed. As for the other parameters : 5.6.2.2.1 -^instruction limit> is the maximum number of instructions DEBETS will execute before typing a message of some kind. If this number is N, then, after executing N instructions, and assuming no breakpoints or fatal errors occurred along the way, DEBETS types the address of the last instruction executed, followed by a '?' to inquire if the user wants to go on. At this point the user can type in an optional new . DEBETS then executes N more instructions. If instruction limit> is not typed, it defaults to 100 (decimal). 5.6.2.2.2 is any octal number. If it is present at all, is ignored (except in the special case when is a negative number — then DEBETS acts as if it weren't present, i.e., no and negative are treated alike). The print mode is used to control diagnostic output for each instruction executed. In the present release of DEBETS, this is anything but fancy: If the print mode is even, DEBETS prints the PC, opcode, and mnemonic for each instruction. In either case, when the print is performed, DEBETS then waits for a user response. The following alternative exist: (a) If the first character typed is '/', DEBETS continues executing the program in the same manner. ETS Student's Guide -26- July 1972 (b) If a number is typed, DEBETS takes it for a new print mode and continues executing the program. (c) If , or is typed, DEBETS continues executing the program with no print for each instruction, using whatever instruction limit was last specified in a G~command, or the default of 100 1Q . (d) If control-V or control-Q, is typed, DEBETS returns to command mode. ' as a response. > It is possible to completely remove the limit on number of instruction executed — see under '.S/' in section VII. ETS Student's Guide -27- July 1972 5.6.3 I/O Conventions, Dynamic Core and Register Dumps At present, DEBETS supports only teletype I/O for the user's program. This is done as follows: 5.6.3.1 Input: EMT 0, followed by a buffer address. This causes DEBETS to read a line from the user and store it in the designated buffer. The terminal character (, , or ) is counted as part of the input. (in particular, if is the terminal, is tacked on, too. ) 5. 6.3 . 2 Output: EMT 1, followed by a buffer to be typed, which must end in a zero byte . No <.CR> or is added on; the user must put these in himself if he wants them. The output buffer may not exceed 200 characters. (in point of fact, any even EMT causes input, and any odd EMT causes output, with the exceptions below, but since DEBETS plans using other EMT's for special purposes later, it's best to restrict oneself to EMT and EMT 1.) The user can get core dumps under program control by using one of the following three special EMT's. In each case, the EMT must be followed by 2 words giving the low and high addresses for the dump: EMT 375 - dump in word mode EMT 376 - dump in byte mode EMT 377 - dump in ASCII mode The user can selectively dump registers during program execution by using the TBAP instruction. In this case, the low byte of the instruction (the trap number) is scanned right-to-left, and registers corresponding to 1-bit s are dumped. For example, ETS Student's Guide -28- July 1972 TRAP 1 dumps RO TRAP 200 dumps RT TRAP 2^5 dumps RO, R2, R5, RT TRAP 377 dumps all 8 registers. TRAP is a special exception. When the user executes this, his program is given control of the TRAP instruction, and may use it as described in the PDP-11 handbook. Another TRAP returns TRAP to its register dumping function. (Then another TRAP gives the user control of TRAP, and so on. . . ) 5.6.4 Error Messages As DEBETS executes a user program, it checks for a variety of errors, such as addresses out of range or attempts to access words at odd addresses. When DEBETS finds an error, it stops execution of the program, prints out the PC, opcode and mnemonic for the instruction in error, plus an explanatory error message, and returns to command mode. Following is a list of possible error messages. The lack of continuity in the numbers is the programmer's fault, not DEBETS' s. #1: JUNK The user tried to execute a non-opcode. #2: RESERVED OP. The user tried to execute WAIT, RESET, or RALT. (Usually DEBETS does not actually execute HALT'S, since they're used as breakpoint flags. However, if the user does a proceed from a HALT, DEBETS attempts to execute it and flags error #2 . ) ETS Student's Guide -29- July 1972 #3: ODD REG IN MODE 3- In address mode 3, the register is supposed to contain the address of a pointer, so this address must be even. jfh. ODD PTR IN MODE 7. In address mode 7> "the register contents are added to an index word to get the address of a pointer. This address must be even. #5: ODD ADDR IN WORD OP. The user tried to access a word at an odd address. #6: ODD REG IN MODE 5. This is similar to #3 — the register, after being decremented, must contain the address of a pointer, so this address must be even. #8: ADDR TOO BIG. The user tried to access out of his area. Because DEBETS uses unsigned comparisons, an address of -1, say, looks too big to it. #10: BUFFER OUT OF RANGE. On an I/O instruction, the buffer address following the instruction was too large. #11: 1"ST BYTE OF BUFFER=0. On an output instruction, the trailer byte came a bit too soon. #12: BUFFER LENGTH >200. DEBETS does not permit outputting more than 200 characters with one instruction. This is to protect against the user's forgetting the trailer byte on the buffer and then outputting some large chunk of his program. ETS Student's Guide -30- July 1972 #13: BAD PC. The user executed an instruction which changed the PC to something odd or out of bounds. This can happen if the user is doing arithmetic on the PC, or if he executes an interrupt and the interrupt vector contains a bad value for the PC. #1)+: BAD STACK PTR. The user executed an instruction which uses the stack pointer, and the latter was found to be odd or out of bounds. For instance, JSR pushes one word onto the stack. If the stack pointer is at the time, an error will result, #15: STOP! The user typed control-Q or control-V during the course of program execution. This is the way to exit from tediously long loops or just a way to get back to command mode. The user should be careful using this, since, once DEBETS is back in command mode, typing control-Q returns the user to ETS. #16: LO DUMP ADDR TOO BIG. The user has requested a dump with EMT 375, 376 or 377, and the low address is out of bounds. #17: HI DUMP ADDR TOO BIG. A dump was requested and the high limit was too large. #18: LO DUMP ADDR NOT < HI ADDR. The low address for a dump should be less than (or equal) to the high address. ETS Student's Guide -31- July 1972 5.7.1 1 ./' ' .\ ! 5.7.2 •.R' 5.7.3 '.N' 5.7 Special Routines There are a number of special little routines --among them the routines for opening register—which are called by typing '.' (dot) plus some letter or number. These are described below under the calling string. open register ; must be between and 7. dumps all registers, four to a line. dumps the instruction count. Recall that DEBETS counts the number of instructions the user program executes. When the user returns to command mode, this number can be dumped. Note, however, that the instruction count is set to by each P- or G- command, and that it is reset before each instruction executed in a non-'null' print mode and after an instruction limit interruption. dumps the "PC stack'. As the user program executes, DEBETS keeps an 8-word stack containing the most recent 8 values of the user's PC. The 1 .P' command dumps these 8-values, with the most recent one first. 5.7.^ .P' 5.7.5 '.C 5.7.6 '.c/' 5.7.7 '.S/' dumps the current value of the user's condition code in the format 'CVZN=nnnn' — in which, for instance, the value of the C-bit is the first or 1 to the right of the equal sign. dumps the user's condition code as above, then opens the user's program status register. opens the 'print register'. This word is normally non-zero. If the user alters it to zero, he thereby disables the instruction limit on executing his program. Then, when he gives a P- or G- command, and provided he omits the print mode (print mode is 'null'); DEBETS types the message 'PRINT BOMBED. OKAY?'. If the user responds with 'Y', DEBETS begins execution with no limit on the number of instructions executed. If DEBETS encounters no breakpoints, HALT'S, or fatal errors, it will continue executing the user program until the user types control-Q or control-V. ETS Student's Guide -32- July 1972 5.7.8 '.B/' causes DEBETS to type the numbers of the breakpoints which are currently set. 5.7.9 '.B , -where is an octal number from to 27n, starts an examination of the breakpoint table, with breakpoint number n. If n is absent and there is no slash after ' B T , the examination begins with breakpoint 0. Whereever the examination begins, DEBETS scans the table until it finds a breakpoint that is set . Then it dumps the breakpoint number and the address of the breakpoint, in the format ' Bnnn=mmmmmm' . Following this, it dumps the repeat count for that breakpoint and waits to allow the user to change it. Whether the user types a number or not, if the user then types line feed, DEBETS continues scanning the breakpoint table until it hits the next breakpoint that is set, or, failing this, returns to command mode. If the user does not type line feed, DEBETS returns to command mode. ' allows convenient changing of the repetition factor for breakpoint $n on one line of print. > 5.7*10 ' .H T causes DEBETS to type the highest address currently available to the user. 5.8 Dynamic Symbol Table Ideally, a debugging package should allow its user to reference core locations using the same symbols the user has defined in his assembly listing. Unfortunately, this is at present not possible with DEBETS; the problems of passing a symbol table from ASSETS to DEBETS, and the high overhead involved in doing multiple disk accesses to get at symbols make it infeasible for the time being. However, DEBETS does keep a small table with space for (at present) ^0 1Q symbols. There are commands for defining symbols, re-defining them, deleting them, and for clearing the entire table. These commands are described below. The user-defined symbols are used in the following ways: 5.8.1 Commands 5.8.1.1 If a breakpoint interrupt occurs at location , DEBETS searches the symbol table for a symbol with value . If it finds ETS Student's Guide -33- July 1972 such a symbol it types the symbol as part of the breakpoint message. If, for example, a breakpoint interrupt occurs at location 123^4- and symbol XYZ has value 123^-, the message will look like 'BnrXYZ = 123 1 *-'. If DEBETS finds no symbol with the required value, it merely dumps the address, as already described. This feature makes identification of breakpoints much easier. 5.8.1.2 When DEBETS dumps the 'PC stack' (see section 5-7, under '.P') it dumps a symbol for each value of the PC if it finds a symbol with that value. 5.8.1-3 When DEBETS dumps the address of an instruction in disassemblies, it dumps a symbol if there is one whose value is the address. 5.8.1.U The mini -assembler (see section 5*10) allows symbolic referencing in an instruction patch. . Commands to the symbol table handler consist of the letter 'S' followed by a series of 'fields' specifying operations to be performed. These fields may be optionally separated by slashes ('/'). The slashes are used for error recovery: if a field looks bad or unintelligible to DEBETS, it scans the input until it finds a slash, then resumes processing of fields. The following are the formats of valid fields: 5.8.2 Field Formats 5.8.2.1 Symbol definition: = defines a symbol with a given value, e.g., ABC = 12^56. =! defines a symbol with a given value; if the symbol has already been defined, it is to be re-defined. E.g«, if A has already been defined to have value 111, then A = !222 redefines it to have value 222. Just A = 222 results in an error message telling that A is already defined. ETS Student's Guide -■5k- July 1972 =;nB or =!;hB defines a symbol with a given value, then sets a breakpoint at address . E.g., A = 1000 ;B defines A to have value 1000, then sets the location 1000. Similarly, A = 1000; 2B defines A to have value 1000, then sets breakpoint 2 at 1000. 5.8.2.2 Symbol deletion: - Symbols longer than 6 characters deletes from the table. E.g., -XYZ deletes XYZ. These may be strung together, e.g., -A-B-FGH-J to delete A,B,FGH, and J. -;B 5.8.2.3 5.8.2A 5.8.2.5 ? < deltes from the symbol table. If a breakpoint is set at location , it is deleted. E.g., if A = 1000 and a breakpoint is set at 1000, then ' S-A;B' deletes the symbol A and the breakpoint at 1000. deletes all symbols from the table. types out all symbols with a given value . dumps all the symbols presently defined. returns DEBETS to normal scanning immediately following '<' . For instance, suppose in one command a symbol and breakpoint are defined: A = 1000 ;2B. Later, the user decides to get rid of A and the breakpoint. He can do so with 'S-A<;2B' . This deletes A, returns to normal scanning, then deletes breakpoint 2. This may of course also be done with 'S-A;B'. ETS Student's Guide -35- July 1972 5.9 Storing and Later Retrieval of DEBETS Command Strings The commands typed to DEBETS are received as strings of ASCII characters which DEBETS scans for certain characters which represent operations to be performed. It is possible for DEBETS to get such a string from anywhere in core. In particular, the user can place an ASCII string somewhere in his area, then tell DEBETS to use it as the next command string. There are three ways to do this: 5.9.1 In tells DEBETS to find its next command string at breakpoint n. E.g., if breakpoint 20 is set at 123k, 120 causes DEBETS to process the string at 123^ • 5.9.2 F causes DEBETS to process the string at address . E.g., 'FLOP' causes DEBETS to look up 'LOP' in the symbol table. If it doesn't find 'LOP', it flags an error. Otherwise, if, say, 'LOP' = 123^, DEBETS processes the command string at user location 123^ • 5«9«3 F
causes DEBETS to process the string at 5.10 Symbolic Program Patching — the Mini -Assembler If the user wishes to insert an instruction in a certain location, he can do so by typing l
:* . DEBETS then assembles the instruction, inserts it at
(provided
is even), and prints out the location following the last word inserted followed by a colon. The instruction to be assembled may be virtually any valid instruction or a single symbol. The user should use registers R6 and R7, not the symbols SP and PC. DEBETS will consider SP and PC as user defined symbols. If the instruction contains a symbol that is not in ETS Student's Guide -%- July 1972 the dynamic symbol table, it will print out the undefined symbol, followed by a question mark. The user may then define the symbol by typing its value, followed by a . The user may return to command mode by typing a without giving any value. DEBETS checks for a variety of errors, such as addresses out of range or attempts to assemble instructions at odd locations. Usually when an error is detected, an error message is printed, and DEBETS prints out the original location number (if valid), followed by a colon, so the user may enter the corrected instruction. Following is a list of possible error messages. #1: ATTEMPT TO ASSEMBLE AT ODD LOCATION The location given was odd. DEBETS increments it and prints it followed by a colon, so the instruction may be reinserted. fd: ADDR TOO BIG The location given was outside the user's area. DEBETS returns to command mode. For the following errors, DEBETS prints the error message and allows the user to insert a corrected instruction in the original location. #3: BRANCH OFFSET SIZE ERROR The location to be branched to is out of range of the branch instruction. #<■: TOO MANY OPERANDS The user has typed an instruction with more than two operands. ETS Student's Guide -37- July 1972 #5: INVALID OPERAND This includes errors in usage such as RTS @7fLABEL as well as syntactical errors like TST -(R^)+. #6: INVALID MNEMONIC The mnemonic given was invalid. Symbols to be inserted have no operands, e.g., 1020: SYMBOL is a valid insertion, whereas 1020: SYMBOL will flag error #6. ETS Student's Guide -38- July 1972 6 . GIZMO GIZMO was designed to aid CS 201 students in learning basic assembly language concepts. It is very easy to use. 6.1 GIZMO is invoked by typing RIM STUD "when in monitor command mode. GIZMO will then ask you to identify yourself. Please type your name followed by a return. GIZMO will then ask for a lesson name. Please type the name of the lesson that your T.A. has indicated. 6.2 GIZMO will ask you a series of questions. Answer each one and terminate each response with a carriage return. If you're correct, GIZMO will usually say "very good." Otherwise, it will attempt to give you some helpful hints. If you are sure your answer is correct, and GIZMO says you're not, please call your T.A. for assistance. 6.3 If you have no idea what the correct answer is, you may ask for help hy typing HELP. If you want to give up, type GIVE-UP. 6.1+ The lesson has been completed when GIZMO asks you to identify yourself again . IBLIOGRAPHIC DATA