Digital PDFs
Documents
Guest
Register
Log In
DEC-12-SE2D-D
December 1970
87 pages
Original
1.6MB
view
download
Document:
LAP6-DIAL
Order Number:
DEC-12-SE2D-D
Revision:
Pages:
87
Original Filename:
https://svn.so-much-stuff.com/svn/trunk/pdp8/src/dec/dec-12-se2/dec-12-se2d-d.pdf
OCR Text
Digital Equipment Corporation l\4aynard, IVIassachusetts PDP-12 LAP6-DIAL PDP-12 LAP6-DIAL PROGRAMMER'S REFERENCE MANUAL For addiMonal copies of this documenl-, order No. Digital Equipment Corporation, DIGITAL EQUIPMENT Maynard, Mass. CORPORATION DEC-12-SE2D-D from Program Library 01754 • Price: $2.00 MAYNARD, MASSACHUSETTS 1st- Edition February 1970 2nd Printing (Rev) August 1970 Copyright © 1970 by Digital Equipment Corporation The material in tliis 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 COMPUTER LAB DIGITAL LAP6-DIAL is an Editor, filing system, and Assembler for use with the PDP-12 computer. The Editor and filing portion are derived from the basic LINC program LAP6 by Mary Allen Wilkes of Washington University. The assembly portion is derived from several programs used for the PDP-8 computer including PAL-D 2 . The Digital Equipment Corporation (DEC) wishes to express to the author, Mary Allen Wilkes (Clark), and the Computer Research Laboratory of Washington University, St. Louis, Missouri, its appreciation for the develop- ment set forth in LAP6, as well as its thanks for permission to use parts of the LAP6 program. M. A. Wilkes, LAP6 Handbook, Computer Research Laboratory Tech. Rep. No. 2, Washington University, St. Louis, 2 May 1, 1967. PAL-D Assembler Programmer's Reference Manual DEC-D8-ASAA-D. CONTENTS Page CHAPTER! USING DIAL 1.1 introducHon 1.2 Sysf-em 1.3 Source Programs 1-2 1.4 Binary Programs 1-3 1.5 Current Line 1-3 1.6 Line Calls 1-3 1.7 Files 1-4 1.8 Monitor Commands 1-4 1.9 Error Recovery 1-6 OperaHon 1-1 1-2 CHAPTER 2 THE EDITOR 2.1 Text and Command Mode 2-1 2.2 Using the Editor Cursor 2-1 2.3 Character Editing 2-2 2.4 Line Insertion 2-3 2.5 Current Line Deletion 2-3 2.6 Large Section Deletion 2-4 2.7 Current Line Formatting 2-5 2.8 Handling Large Programs 2-6 2.9 Overlapped I/O 2-6 2.10 Use of EXIT 2-7 2.11 Leftmost Cursor Position 2-7 CHAPTERS ASSEMBLY LANGUAGE 3.1 Statement Syntax 3-1 3.1.1 Tags 3-1 3.1.2 Operators 3-1 3.1.3 Operands 3-2 3.1.4 Comments 3-2 3.2 Symbols 3-2 3.2.1 Types of Symbols 3-2 3.2.2 Use of Symbols 3-4 CONTENTS (Cont) Page 3.3 Numbers 3-4 3.4 Expressions 3-5 3.5 Address Assignments 3-5 3.5.1 Legal Characters 3-6 3.5.2 Illegal Characters 3-7 3.6 Pseudo-operators 3-7 3.6.1 PMODE 3-7 3.6.2 LMODE 3-8 3.6.3 SEGMNTn 3-8 3.6.4 FIELD n 3-8 3.6.5 PAGEn 3-8 3.6.6 LISTAPE n 3-8 3.6.7 DECIMAL 3-9 3.6.8 OCTAL 3-9 3.6.9 NOLIST 3-9 3.6.10 LIST 3-9 3.6.11 TEXT 3-9 3.6.12 EJECT 3-10 3.6.13 ASMIFxn 3-10 3.6.14 ASMSKPn 3-11 3.6.15 SAVSYM n 3-11 3.6.16 LODSYM 3-12 CHAPTER 4 DIAL MONITOR COMMANDS 4.1 Assemble Program 4-1 4.2 Assemble and List Program 4-1 4.3 Assemble and Quick List Program 4-2 4.4 Save Binary 4-4 4.5 Load Binary 4-5 4.6 Add Binary 4-5 4.7 Zero 4-7 4.8 Save Program 4-8 4.9 Add Program 4-8 VI CONTENTS (Cont) Page 4.10 Clear Working Area 4-9 4.11 Display Index 4-9 4.12 Print index 4-10 4.13 Print Source 4-11 4.14 Exit 4-11 4.15 User's Monitor Command 4-11 CHAPTER 5 PERIPHERAL INTERCHANGE PROGRAM (PIP) 5.1 Initializing PIP 5-1 5.2 Control Commands 5-1 5.3 AAode Options 5-2 5.4 Binary or Source Input 5-2 5.5 Binary or Source Output 5-4 5.6 Auxiliary Mode 5-6 5.7 Errors 5-7 5.8 Recovery 5-7 5.9 PIP Examples 5-8 APPENDICES APPENDIX A DIAL-V2 vs. DIAL-MS A.l Features A-1 A. 2 System Build for DIAL-MS A-1 A. 3 System Initialization A-2 A. 4 System Startup A-3 APPENDIX B ASSEMBLY ERROR MESSAGES -B-l APPENDIX C SUMMARIES C.l Command C-1 C,2 Pseudo-operators C-2 VII APPENDICES (Cont) Page LODSYM, and LISTAPE C.2.1 Assembling Lorge Programs with SAVSYM, C.3 Character Set C-6 C.4 Instructions C-7 C.4.1 PDP-8 Symbols C-7 C.4. 2 LINC Symbols C-9 C.5 Operators and Special Characters C-10 C.6 LAP6-DIAL Tape Allocation during Assembly C-1 C.6.1 Allocotion of LAP6-DIAL Area C-12 C.6.2 DIAL-MS Disk Allocation C-12 C.7 Sample Program C-12 APPENDIX D C-3 I/O ROUTINES FOR DIAL-MS D.I Calling fhe Routines D-I D.2 READ and WRITE D-1 D.3 MOVE D-2 D.4 Bootstrap Routine D-3 INDEX ATTENTION The LAP6-DIAL tapes distributed by the Digital Equipment Corporation Progrom Library contain two versions of DIAL: DIAL-V2, for 4K tape systems, and DIAL-MS, for 8K and larger systems, porticularly those using disks. Users may decide to use one or both systems. See Appendix AJ for differences between the two systems. The system In the system area (blocks 300-345, 350-367) of the distributed tapes is DIAL-V2. Therefore, any user who wants this system may use It immediately via the startup procedure in Appendix A, 4. DIAL-MS is distributed as four binary files, with a program (GENASYS) for combining them Into a DIAL-MS system. Appendix A. describes the procedure for Initially building o Inltiolization procedure, DIAL-MS system on tape. Appendix A. 3 describes the DIAL-MS which must be performed on a DIAL-MS tape whenever: a. The tape Is used with a new configuration b. The disk Is overwritten c. A non-DIAL disk is In the drive (RK08 only). Note that the GENASYS procedure must always be followed by the initialization procedure. GENASYS will allow the user to perform the initialization automatically If the DIAL-MS tape built by GENASYS Is on unit 0. LAP6-DIAL is referred to as DIAL In this manual. Chapter 1 Using DIAL 1.1 INTRODUCTION DIAL provides the PDP-12 user with a keyboard operating system that includes editing, assembling, and file handling capabilities. An interactive CRT display permits quick user response; a file index and peripheral device interchange program facilitate file manipulation. TTie minimum hardware configuration for using DIAL-V2 is a PDP-12B system, composed of: a. 4096-word, 12-bit, 1.6 usee core memory b. TC12 LINCtape automatic control c. Two TU55 magnetic tape transports d. VC12 LINCscope control and character buffer e. VR12 7 in. X 9 in. CRT display (scope) f. ASR33 Teletype® Note that the DIAL character Editor is designed to be operated with an AD12 Analog-to-Dlgital Converter and Multiplexer. DIAL-MS requires 8K of core memory and will support the additional hardware: Tlie a. One or two DF32 disks (32K to 64K words) b. One to four RS08 disks (256K to IM words) and RF08 controller c. One RK08 disk (800K words) PDP-12 includes a display for viewing source programs in the source working area . About 400 characters can be displayed at a time on the scope. Tlie DIAL system is provided to the user on LINCtape 2 . Each tape contains: a. A reserved area occupied by DIAL b. A working area for temporary storage of user files c. A file area for permanent storage of user files The source working area moy be on tape or on disk (refer to Appendix C, Paragraph C.6). 2 A LINCtape contains 51 2^^ blocks of 256 12-bit words. ^Teletype Is a registered trademark of Teletype Corporation. 1-1 The DIAL area of fhe tape contains the DIAL Editor, Assembler, command routines, and a file index. User programs are saved as named files in the file area of the system tape(s) and/or disk(s). DIAL tape and disk allocation is detailed in Appendix C, Paragraph C.6. 1.2 SYSTEM OPERATION A LINCtape containing DIAL must be designated as the system tape and assigned to tape transport 0. Most DIAL operations may be performed with only one LINCtape containing DIAL, but many procedures in DIAL-V2, such as assembling programs, require another tape on unit 1 . Most efficient operation is achieved when both tapes contain DIAL systems. When the system is started (refer to Appendix A, Paragraph A. 3), it automatically enters the text mode. A source progrom may then be typed into the source working area character by character via the Teletype keyboard and will be displayed as it is entered. DIAL automatically assigns lines numbers and formats the input. The DIAL Editor may be used to add, modify, or delete characters, lines or large sections of the program, as detoiled in Chopter 2. A Monitor command may also be issued to a system program via the Teletype keyboard. When called, the Monitor writes out its buffer pointers and is replaced by the called program. When the system program operation is completed, the Monitor is automatically called back into core and retrieves its pointers. 7lie DIAL Assembler is implemented by three Monitor commands that provide user control of the type of listing generated. The Peripheral Interchange Program, PIP, permits any file to be moved between interfaced I/O devices. The rest of this chapter details basic concepts and terminology of the DIAL system 1.3 . SOURCE PROGRAMS A DIAL source program is a group of lines of program input via the Teletype in a symbolic language composed of PDP-8 and LINC mode instructions (refer to Appendix C, Paragraph C.4). Using DIAL, the program can be typed into the source working area and altered with the Editor, stored in a named file, displayed on the scope, or printed on the Teletype. A line number (l-777p) appears to the left of each line on the scope and indicates the sequential location of that line in the source. Tlie program text is placed in an input buffer in core; the buffer is 256 words long and can accommodate 512 ASCII characters. Up to 64 blocks of source program can be input to DIAL. As the input buffer is filled, the text is written out in the source working area which starts at block 370 (see tape C.6), Only the program currently in the working area can be edited. Refer to Introduction to Programming, decimal -to-octal conversion. If in Appendix C, Parograph source program input exceeds 64 blocks DEC C-18, for detailed information on computer fundamentals, such as 1-2 or 4094 lines, can not be assembled; the size of the source program must be reduced, or the program can be it divided into two or more parts by using the Assembler pseudo-ops SAVSYM and LODSYM, explained in Appendix C, Paragraph C.2. 1.4 BINARY PROGRAMS A binary program is the result of an assembly of a source program. The Assembler converts the symbolic source language into binary machine instructions. The binary program is stored in the binary working area and can be saved as a named file (refer to section 4,4) or loaded for immediate execution (refer to Section 4,5), 1.5 CURRENT LINE Every source display has a current line number. By definition, it is the last line number on the display. The current line is noted by an indicator (two dashes) on the right-hand side of the scope on the same display line as the current line. The number been cleared . 1 appears as the current line number whenever the source working area hos Each time RETURN is typed to terminate a source line, the next sequential current line number appears on the scope. From 1 to 17_ lines can be displayed at a time on the scope, as determined by the setting of A/D knob 7 which maintains an approximate constant number of lines. 1.6 LINE CALLS By issuing a line call when using the DIAL Editor, the designated line in the source program is displayed as the last line of text on the scope and a new line number will appear as the current line. To display a new current line, use either of the following methods: a. - LJ where Type L is the number of the line to be the new current line. The right arrow - LINE FEED key and J means press the RETURN key. The display will now be positioned with line Las the last line displayed, indicates pressing the b. Type ALTMODE and then one of the following keys: Key When only line 1 is Action 1 Reposition the display forward one frame 2 Reposition the display forward one line Q Reposition the display backward one frame W Reposition the display backward one line seen on the scope at startup, it may merely indicate that the source program has been positioned at line 1 and the source working area is not clear. 1-3 These ALTMODE key combinations must be typed as the first characters on a new line. A frame is defined as the number of lines currently on the display, as set by A/D knob 7. The last line of the source program in the working area can be displayed by requesting a line number greater than the last line number. Similarly, the first line of the source program can be displayed by calling line or line 7777. 1.7 FILES Tlie DIAL system is file oriented. A program, either source or binary, is saved as a file in contiguous blocks of tape (disk) in the file area, blocks through 267 and 470 through 777. Binary files require a header block for pointers. Every tape contains a file index in blocks 346 and 347 for the binary and/or source programs on that tape. (Refer to Appendix C, Paragraph C.6 for tape and disk allocation.) File names, starting block, and length in blocks are recorded in the index. When a file is entered, the user gives it a name which must be 1 to 8 dis- playable keyboard characters in length, of which at least one character is non-numeric. The characters slash, question mark, and comma should not be used. Only spaces in the middle or at the end are considered to be part of the name; leading spaces are ignored. A full index can accommodate 63 different names; however, any name in the index can describe both a source and a binary program, thereby doubling the number of possible file entries to 126. When a file is being saved, the unused file space nearest the index within the file area that is large enough to contain the file being saved is the next area used. Thus, the location of entries on the tape can be controlled by their order of filing. To minimize tape movement, the most frequently used files should be placed nearest to blocks 346 and 347 during file assignment. 1 .8 MONITOR COMMANDS The DIAL programs are requested through DIAL Monitor commands and cause DIAL to enter command mode. To issue a command, use the following procedure: 1 . 2. Turn A/D knob 3 all the way to the right. Press the LINE FEED key on the Teletype and observe the right arrow in the lower left corner of the scope. 3. Type the command (refer to Chapters 4 and 5). 4. Press the RETURN key. Improperly formatted or spelled commands are ignored and are automatically erased from the scope. 1-4 The Monitor commands, including PIP, are summarized in this section and are treated in greater detail in Chapters 4 and 5. transports. In this manual, a reference to tape unit Items in parentheses in the table are optional; if means the eighth channel on TU55 LINCtape NAME is omitted, the user's program that was most recently manipulated is used. The unit number required in DIAL commands can be between and 7 in DIAL-V2 and between and 17 in DIAL-MS, as follows: Device Acc(sptoible Unit Numbers Logical Disk Units 8 LINCtapes 0-7 - 1 RS08 disk 10 - 11 0- 1 2 RS08 disks 10- 13 3 RS08 disks 10- 15 4 RS08 disks 10 - 17 RK08 disk 10- 15 0-3 0-5 0-7 0-5 DIAL MS only: 1 1 Each RS08 or RK08 disk is considered to be broken into smaller logical disks, each with its own directory, A logical unit is the equivalent of one LINCtape, 1000_ blocks; thus, o of two logical disk units. unit number. areas. If one RS08 disk is considered to be made up When issuing a DIAL command, the logical disk unit is addressed by an acceptable Note that DF32 disks cannot be addressed; they are used only to hold DIAL-MS and the working no unit is specified, unit is assumed. Command Function — AS (N,U) Assemble -* Assemble and List LI (L,L,)(N,U) -* QL(L,L,)(N,U) — LO (N,U) — PS (L,)(L,)(N,U) -* AB(A,)N,U — SB N,U(,M(FA)) — SP N,U - AP (L,L,)N,Uor B,U — DX (,U) Assemble and Quick List Load Binary Print Source Add Binary Save Binary Save Program (source) Add Program (source) Display Index -* PX (,U) Print Index —- CL Clear Source Working Area —* ZE Zero Binary Working Area ~*" Peripheral Interchonge PI -* EX Exit 1-5 Command (cont) Function (cont) —^ MC X(Y),U User's Monitor Command — Line Call L Legend: N File name U Tape (0-7) or disk (10-17) unit L Line number M Start mode (L for A Address (4 digits) F Field B Block number X(Y) = Character in Accumulator LINC or P for PDP-8) ) = Optional parameter -* = Press LINE FEED key ^ = Press RETURN key ( 1.9 ERROR RECOVERY If an illegal command is requested at any time while using DIAL, to return to DIAL. NO is displayed on the scope. Press RETURN No data is lost and the correct procedure may be requested. If the error occurs while using PIP (refer to Chapter 5), press RETURN to generate the initiol PIP display. If at any time while using DIAL a typing error occurs before RETURN has been pressed to terminate the line, the RUBOUT key may be used to delete the incorrect input. Press the RUBOUT key once for each charactrer to be deleted from the left. Each time RUBOUT is typed, a backslash (\) is echoed on the Teletype. 1-6 Chapter 2 The Editor 2 . 1 TEXT AND COMMAND MODES Affer starting DIAL (refer fo Appendix A), a portion of the source working area is displayed on the scope. is Issuing a Clear command at this time will said to be in text mode at this time. the source working area. DIAL remove any previous data from Data may then be typed in the cleared working area when the Editor is in the text mode. At the conclusion of an editing operation, the command EXIT should be issued so that the Editor will save its pointers on the tape or disk. If a command is Issued (refer to Section 1 .8), the Editor enters the com- mand mode. Both modes are under control of the Editor. 2.2 USING THE EDITING CURSOR DIAL provides a powerful and flexible character Editor which is used in text mode to: a. b. c. d . e. Add or delete a single character Add or delete a text line Delete the current line Delete an entire portion of the display Add text at any location in the program Input is automatically formatted and assigned line numbers by the Editor. The Editor is controlled by a cursor that appears as an inverted T ( i ) on the scope with the text. The cursor moves in its own alley below a line of text and can scan up to 256 characters back from the last scope character in a display. The location of the cursor is at the current character; all editing operations occur at the current character. The exact location of the cursor is determined by the setting of A/b knob 3. how many spaces bock from the last character on the scope the cursor is to be placed. has been determined by knob 3, it of spaces from the end of the text. knob 3. will After the cursor location move along with incoming text from the keyboard, always at that number At any time, the location of the cursor may be changed by simply turning Rotating the knob clockwise moves the cursor to the right. sor advances to the left of the next line. left. That setting controls When the end of a line is reached, the cur- Similarly, rotating the knob counterclockwise moves the cursor to the For normal input of data, knob 3 is initially rotated all the way to the right. For a PDP-12B system without an AD12 and multiplexer, the Right and Left Switches are used instead of A/D knobs 7 and 3, respectively. played. The setting of Right switches 8-1 1 determines the maximum number of lines dis- The Left Switches can be set to values from 1 to 2047 to determine the position of the cursor. ue of the Left Switches locates the cursor that many characters from the end of the text. The val- (All discussion in this manual assumes a system configuration with an AD12 and multiplexer.) Monitor commands, to enter the command mode, and line calls, to display a new current line, can be issued only when the cursor is located at the start of a current line that has no text on it yet. Turn knob 3 all the way to the right and press the RETURN key before issuing a Monitor command or a line call to locate the cursor correctly. 2-1 When a mistake has been noted in the previous text while in text mode, set the cursor to indicate where the correction is to be mode and use the RUBOUT key. way to the right; text input can be continued. After the correction has been completed, rotate knob 3 all the If a typing error occurs while issuing a command, only the RUB- OUT key is required to correct it. To facilitate understanding the operation of the Editor, the procedures described in this chapter should be tried at the keyboard directly. 2.3 CHARACTER EDITING A single text character may be deleted or added at any point in the displayed text during text mode. a character, turn knob 3 to locate the cursor so that character is the current character, key. To delete and press the RUBOUT The character will be removed, and the rest of the line and the cursor will move one character to the left. The current character is now the one that preceded the character that was deleted Note that spaces and carriage RETURNs are considered to be one character each. To delete a carriage RETURN, locate the cursor under the first space immediately after the last character on the line and press RUBOUT. As much of the following line as con fit on the line after the last character is moved up to that line on the scope. In the following example, the letter. A, is deleted from line 1. before RDSC 12 SCOIdSii (press RUBOUT) after In this example, a carriage return is deleted. CLR 7nP SETUP DSC IZ CLP STC CURFLG SCOPE:. before /CURSDP DISPLRV /CLEHR FLRG (press RUBOUT) ^,, after SCnPEn DISPLRV CLR 7MP SETUP D5C 1£ CLR STC CURFLG 2-2 /CURSOR /CLERR FLOG be inserted in a line of text. Turn Knob 3 to locate the cursor under the character that is to immediately precede the first new character. As the additions are typed, they are echoed In the same manner, characters may on the Teletype and scope. The cursor moves one space to the right for each character that is inserted . The characters 12 are added to line below. 1 before (type 12) after LINE INSERTION 2.4 To insert a line after Line L 1 . 2. issue a line call for Line L and insert the new line as the current line (L+1) or position the cursor after the last character of Line L (i .e., the blank representing carriage RETURN), and type the new line, including its RETURN. SCOPE:. before CLR 7nP SETUP CLR STC CURFLG LOn I /CURSOR DISPLRV /CLERR FLRG (type -t z 3 4 5 € 7 after SCOPE 10 11 CLR 7MP SETUP DSC 12: CLR STC CURFLO LDR 1 -10 jnp EHl SET 12 )) /CURSOR DISPLRy /CLERR FLHG — M. CURRENT LINE DELETION 2.5 The current line of a display is the last line preceded by a line number that is visible on the scope (refer to Section 1 .5). A source display always has a current line number and is so denoted by the horizontal indicator at the far right of the scope. MODE and D. The current line of a program may be deleted at any time by typing the keys ALT- The location of the cursor does not affect current line deletion. moved by this operation. The preceding line becomes the new current line. Only the current line is re- Line 5 of the source display is omitted in the following example. ^ In any editing operation, the cursor moves according to the setting of A/D Knob 3. This means the cursor is always located the same number of spaces from the end of the text at any time in any procedure, if the knob is unchanged. Similarly, the number of lines specified by A/D Knob 7 will be displayed on the scope after any operation, assuming sufficient source in the Working Area. 2-3 Displayed In Field Instruction Comments P /L Tag Keys Typed /L /L P/L P>/L /L P* P TAB /L /L P Note that text displayed on the scope and the text printed on the Teletype by the commands PS, LI, or QL will both have the same format. 2.8 HANDLING LARGE PROGRAMS The DIAL Editor can handle text files that are up to 64 blocks long. (Assuming an average of 16 characters per line, about 2048 lines of code can be accommodated.) Only Monitor commands or deletions can be accepted by the Editor when the program is 64 blocks long. To facilitate the processing of programs whose source is greater than 64 blocks, the program can be edited in two or more sections and then combined during Assembly by using the assembly pseudo-ops SAVSYM, If LODSYM, and LISTAPE (Refer to Appendix C.2). a line is entered when the source working area is full, the line is automatically deleted when carriage RETURN is typed. If any corrections are required to a source of that length before assembly, one whole block must be deleted from the file first. Use the ALTMODE and move one block from the program. L deletion (The LINCtape on unit will procedure (refer to Section 2.6) to re- move or the disk lights will blink when this has been accomplished.) Use the EXIT command (refer to Section 2. 10), ond then press the CONTinue key on the computer console to perform the required editing while maintaining the current source program. The Editor does not accept more than 120 characters on a line. A carriage RETURN is automatically generated as the 121st character. This 120-character limit holds both before and after any editing operation, such as deleting several carriage RETURNs to make one long line. Note that a maximum of 40 characters can be displayed on a scope line, so that a logical line of 120 characters occupies three scope lines. 2.9 OVERLAPPED I/O When using DIAL-V2, the Editor writes on the core buffer on tape as they are being filled. While a tape operation is in process, up to 20 additional characters may be typed. The display will not be updated with the additional characters until the tape operation has been completed. Teletype to assure the user that his input is being accepted. If However, the characters are echoed on the the auxiliary buffer space is filled during a tape operation, the Editor will indicate this to the user by not echoing the characters on the Teletype. 2-6 DIAL-MS does not provide this overlap feature because writing is accomplished so quickly on the disk. Note, however, that if DIAL-MS is run using tape, the lack of overlapped I/O is noticeable. 2.10 USE OF EXIT COMMAND At the conclusion of each editing session, an EXIT command (-EX J ) should be given to be sure the Editor saves its pointers on tape (disk), thus enabling resumption of the program at a later time. 2. 1 1 If LEFTMOST CURSOR POSITION the setting of the cursor, as determined by A/D knob 3, provides for more characters than presently appear on the scope, the cursor moves along at the value determined by the last character on the scope at the time the cursor was set. When enough characters have been added to equal the cursor setting value, the cursor jumps back from its previous value to the location determined by the actual A/D knob 3 setting. For example, if the cursor is set to ten characters from the end of the text, but only six characters are displayed at first, the cursor will jump bock when four more characters (AG, T) hove been added. before TAD during TAGTAD after TAG, TAD 20 20 20 2-7 Chapter 3 Assembly Language Tlie DIAL Assembler processes a DIAL source program by translating PDP-8 and LINC mode mnemonic operation codes into binary codes for the corresponding instructions, relating symbols to their numeric values, assigning absolute core addresses for data and instructions, and listing the program with error messages. This chapter discusses the gramming, DEC C-18, 3.1 DIAL syntax and semantics acceptable to the Assembler. Refer to Introduction to Pro- for more detailed information on programming techniques. STATEMENT SYNTAX DIAL source programs are usually prepared on a Teletype, with the aid of the Editor, as a sequence of statements. Each statement is written on a single line and is terminated by pressing carriage RETURN. The Assembler interprets and processes these statements, generating one or more binary instructions or data words. DIAL state- ments can be typed without having to adhere to any column formatting. There are four fields in a DIAL statement; they are identified by the order of appearance in the statement, and by the separating, or delimiting character which follows or precedes the field. Statements are written in the general form: tag, operator, operand/comment A statement must contain at least one of these fields and may contain all four. 3.1.1 Togs A tag is the symbolic nome used in the source program to identify the position of the statement in the program. If present, the tag is written first in a statement ond is terminated by o comma. A mnemonic mochine instruction (refer to Appendix C, Paragraph C.4) or pseudo-op (refer to Appendix C, Paragraph C.2) may not be used as a tag. 3.1.2 Operators An operator may be one of the mnemonic machine instruction codes (refer to Appendix C, Paragraph C .4), or pseudo-op codes which directs assembly processing (refer to Section 3.5). Operators are ter- minated with a space if an operand follows or with a semicolon, slash, or carriage return if no operond follows. Note that a semicolon anywhere in a statement, except in a comment, is interpreted by the DIAL-V2 Assembler as the logical end of the statement. 3-1 It terminates the line at that location and in- crements the program's line numbers by 1 line for each semicolon; this causes the line numbers on an Assembly listing to not agree with those seen on the scope. This incrementation allows several instruc- tions to be written on one line as, for example, RTR; RTR; RTR. For DIAL -MS, semicolon does not in- crement the listing line numbers so that they agree with those on the scope. 3.1.3 Operands Operands are usually the symbolic address of the data to be accessed when an instruction is executed, or the input data or arguments of a pseudo-op. In each cose, interpretation of operands in a statement depends on the statement operator. Operands are terminated by a carriage return, semicolon, or slosh. 3.1.4 Comments The programmer may add notes to a statement following a slash character. Such comments do not affect assembly processing or program execution, but are useful in the program listing for later analysis or debugging. 3.2 SYMBOLS 3.2.1 Types of Symbols There are two main groups of symbols, as follows: a. Permanent Symbols The assembler has in its permanent symbol table definitions of its operation codes, operate commands, and many input-output transfer (lOT) micro-instructions (refer to Appendix C, Paragraph C.4). Any symbol in the Assembler's permanent symbols may be used without prior definition by the user. Initially, the Assembler's permanent symbol table in memory contains the mnemonic op codes of the machine instructions of LINC mode programming and the Assembler pseudo-op codes. The symbols for PDP-8 mode programming remain on the DIAL system unit. As the source program is processed, new symbols defined in the source program are added to the user's symbol table. If the programming mode is to be changed to PDP-8 mode, the pseudo-op PMODE must precede the new program input to alert the Assembler'. This instructs the Assembler to retrieve the PDP-8 mode permanent symbols in memory. (The same core memory block is used for the permanent symbols of both modes.) Similarly, the pseudo-op LMODE must precede a change to LINC mode programming,, b. User-defined Symbols User-defined symbols, to be used as statement tags, operators, or operands, are composed according to the following rules: (1) The characters must be alphabetic (A-Z) or numeric (0-9). (2) The first character must be alphabetic. Leading numeric characters are ignored. Distinguish between PMODE and the LINC mode instruction PDP which modifies the hardware at run time. 3-2 (3) Only the first six legal characters of any symbol are meaningful to the Assembler; the remainder, if any, are ignored. (4) The maximum number of symbols is 895. (5) The Assembler assigns values according to the following table: Used after LMODE PMODE Defined LMODE lObits^ 12 bits after PMODE 12 bits 12 bits (See Section 3.6 for definition of LMODE and PMODE). The programmer can use two methods to specify the value to be assigned to a symbol: a. When the first symbol of a statement is terminated by a comma, it is assigned a value equal to the Current Location Counter (CLC). Any instruction or dota word in the program may be so tagged. For example: *llZ((2f TAG, CLR JMP A B, STC B A, The symbol TAG is assigned a value of 0100; the symbol B, a value of 0102; and the symbol A, If a programmer attempts to define the same symbol as a label again, it is redefined as the user requested, but the error message ID is given. (Refer to Appendix B.) a value of 0103. The programmer may insert new symbols with their assigned values directly into the symbol table by using a direct assignment statement of the form symbol= value where the value may be a number or expression. For example, the symbols ALPHA and BETA are assigned numeric values by ALPHA=5 BETA=7 There must be no spaces between the symbol and the equal sign. A direct assignment statement moy also be used to give a new symbol the same value as a previously defined symbol Note that no check is made on expression arithmetic. For example, if TAG = TAG1+TAG2 where TAGl = 1777 = TAG2, then TAG = 3776, which is more than 10 bits. Note also that an address defined in LMODE is not the same when referenced in PMODE. 3-3 BETA=17 GAMAM=BETA The new symbol, GAMMA, is entered into the user's symbol table with the value The statement 17. The value assigned to a symbol may be changed. ALPHA=7 changes the value assigned to ALPHA in the first example from 5 to 7 for any future occurrence of ALPHA. Direct assignment statements do not generate instructions or data in the object program,, These statements ore used to assign values so that symbols can be conveniently used in othesr statements. 3.2.2 Use of Symbols Symbols are used in three ways. a. To tag an instruction or data word at any point in the program, the symbol must appear first in If the symbol is redefined later, the the statement and must be immediately followed by a comma. illegal definition error message is printed. If a b. c. symbol is to be used as an address in LINC mode, it should be assigned a 10-bit value. As an operator, the symbol must be predefined by the Assembler or by the programmer. If o statement has no tag, the operator may appear first in the statement, and must be terminated by a space, tab, semicolon, or carriage return. Examples of operators follow. TAD permanent symbol OCAL Assembler pseudo-op ZIP legal only if defined by the user Symbols used as operands should have a value defined by the user. This value may be symbolic references to previously defined labels where the arguments to be used by this instruction are to be found, or may be constants or character strings. 3.3 NUMBERS Any sequence of numbers delimited by a slash, semicolon, tab, or carriage return is interpreted numerically by the Assembler. 1/ COMMENT 12; 4372 The radix-control pseudo-ops, ber interpretation. DECIMAL and OCTAL, indicate to the Assembler the radix to be used in num- DECIMAL indicates that all numbers are to be interpreted as decimal until the next occur- rence of the pseudo-op OCTAL, which indicates that all numbers are to be interpreted as octal until the next 3-4 occurrence of the pseudo-op DECIMAL. The radix is initially set to octal and remains octal unless otherwise specified. 3.4 EXPRESSIONS The arithmetic and logical operators used in numerical operations operations are: + 2's complement addition (modulo 4096) after a PMODE pseudo-op. Pli ]'s complement addition T024) after an (modulo LMODE pseudo-op. 2's complement subtraction Minus (mod- ulo 4096) after a PMODE pseudo- op. T's complement subtraction (mod- ulo 1024) after an LMODE pseudo- op. Boolean inclusive OR (union). Exclamation Mark & Ampersand i__i Space Boolean AND (intersection). Inclusive OR when used to separate two symbolic operators. For example: TAG, CLACLL Note that there should be no spaces between operands and the operators. Symbols and numbers (exclusive of pseudo-op symbols) may be combined by using the arithmetic and logical operators to form expressions. Expressions are evaluated from left to right. These operations are shown in the following example. MODE A B A+B A-B AIB A&B PDP-8 0002 0003 0005 rrn 0003 0002 0007 0005 0014 0002 0007 0005 0700 0007 0707 0671 0707 0000 0002 0003 0005 7776 0003 0002 LINC 3.5 ADDRESS ASSIGNMENTS The Assembler sets the origin, or starting address, of the source program to absolute address 4020, which may then be changed by the programmer. As source statements are processed, the Assembler assigns consecutive memory addresses to the instructions and data words of the object program. This is done by incrementing a lo- 3-5 A statement which generates a single object program cation counter each time a memory location is assigned. storage word increments the location counter by one. Another statement may generate six storage words, thus incrementing the location counter by six. Direct assignment statements and most Assembler pseudo-ops do not generate storage words and therefore do not affect the location counter. The special character .(period ) olways has a value equal to the value of the CLC. teger or symbol (except to the left of an equal sign). 7lie It may be used as any in- following is equivalent to the statement JMP 0202. *200 JMP .+2 The next example will produce in location 0300 the quantity 700. *300 .+400 Consider the next example. *20 LMODE CALL=JMP . 0027 The second line, CALL=JMP . , does not increment the CLC; therefore, 0027 is placed in location 20 and CALL is placed in the user's symbol table with an associated value of 6020 (the octal equivalent of JMP,). 3.5.1 Legal Characters Programs processed under the DIAL Assembler are prepared by the system in the Assembler's internal code. (See Appendix C.3 for a complete list of the characters with their 6-bit octal equivalents.) The following characters are acceptable by the Assembler: a. The alphabetic characters ABCD. . .XYZ b. The numeric characters 0123456789 c. The special characters «— Space Separates symbols and numbers (refer to Expressions, Section 3.4) + Plus Combines symbols or numbers (add) A period must be preceded by a delimiter or operator, or an erroneous code may result. 3-6 - Minus Combines symbols or numbers (subtract) Exclamation Mark Combines symbols or numbers (inclusive OR) :> Carriage Return Terminates a statement or a line H Tab Formats symbols or numbers for source tape output Comma Assigns symbolic address Equal Sign Direct assignment of symbol values Semicolon Terminates coding statement (v^^ill not terminate com- ! / = / ment) * Asterisk Sets CLC; redefines origin Dot Has value equal to CLC \ Backslash X\Y = IOOOq X+Y (X must be a single octol digit.) / Slash Indicates start of comment & Ampersand Combines symbols or numbers (AND) • 3.5.2 o Illegal Characters All characters other than those listed above are illegal when not in a comment or TEXT field; their occurrence causes the error message IC (Illegal Character) to be printed by the Assembler. 3.6 PSEUDO-OPERATORS The programmer may use pseudo-operators (pseudo-ops) to direct the Assembler to perform certain tasks or to interpret subsequent coding in a certain manner. Some pseudo-ops generate storage words in the object program, other pseudo-ops direct the Assembler on how to proceed with the assembly. Pseudo-ops are maintained in the Assembler's permanent symbol table. Do not use pseudo-ops as variable names; erroneous logic and code may result without generating an error message. The function of each Assembler pseudo-op is described next. 3.6.1 PMODE The Assembler can assemble either LINC instructions (coding) or PDP-8 instructions. Each has a pseudo-op to designate its assembly mode. PMODE indicates that PDP-8 coding follows. The Assembler remains in PDP-8 mode until explicitly changed to LINC mode by an LMODE pseudo-op. 3-7 3.6.2 LMODE To designate LINC mode coding, the pseudo-op LMODE is used. The initial mode of the Assembler is LMODE and will remain in LMODE until the PMODE pseudo-op is given. 3.6.3 SEGMNT n (0< n<7) SEGMNT resets the CLC to the first location of segment n, where n is an integer, a previously defined symbol, or a symbolic expression. Each memory field is divided into four 1024- word segments, generally used whem in LMODE. For example: SEGMNT 2 sets CLC to location 4000g SEGMNT sets CLC to location 2000- I Without an argument, the CLC is reset to the first location of the succeeding segment. CLC = .+1777 & 6D00; more than T sequential SEGMNT pseudo-op with no arguments has the effect of I SEGMNT pseudo-op with no argument. 3.6.4 FIELD n (n=0 or 1) The FIELD pseudo-op indicates the 4K field, or T . If the field is not specified, is assumed as the initial condition. 3.6.5 PAGE n {0<n<40.) o PAGE is used to reset the CLC to the first location of the specified PDP-8 page. If n is not specified, the CLC is reset to the first location of the succeeding page. CLC = .+177 & 7600. Multiple PAGE pseudo-ops with no argument have the same effect as one PAGE pseudo-op with no argument. 3.6.6 LISTAPE n (0<n< 7777) DIAL-MS only The value of n specifies the operation performed by LISTAPE. If n is negative (4000 < n < 7777), the header block (block 447) from the previous assembly this bit table rather than destroy it. If n is is read in and preserved. The present assembly will then alter positive (0< n <3777), the four low-order bits (bits 8-11) of n ore taken as a unit number (0-T7). If the six console Sense Switches are all set to 1 before an assembly, any output encountered by the Assembler after LISTAPE is encountered in pass I block 0. is written on the specified unit starting at No check is made for existing files on that unit. The characters are placed one per word, right justi- fied; the leftmost bits are meaningless. If the Sense Switches are not all set to 1, 3-8 any assembly error messages are printed on the Teletype and the LISTAPE pseudo-op does nothing. Remember that all listing occurs on pass 2 of the Assembler and therefore goes to the indicated device regardless of the actual location of the pseudo-op in the source. 3.6.7 DECIMAL Integers are usually taken to be octal numbers. However, following the pseudo-op DECIMAL (and prior to a succeeding OCTAL pseudo-op) all numbers are interpreted as decimal. 3.6.8 OCTAL OCTAL is used to reset the radix to its original octal base. Note that if a decimal number is specified when the radix is octal, the Assembler tries, often unsuccessfully, to interpret the number. 3.6.9 NOLIST NOLIST is used to prevent printout during an LI assembly (refer to Section 4.2). The NOLIST appears in the listing, but subsequent printout is suppressed until a LIST pseudo-op is encountered. 3.6.10 LIST LIST is used to negate the 3.6.11 NOLIST state. The LIST statement does not appear in the listing. TEXT The pseudo-op TEXT enables the user to represent a character or string of characters in USASCII code trimmed to six bits and packed two characters to a word. The numerical values generated by TEXT are left- justified in the storage words they occupy, with the unused bits of the last word filled with 00. A string of text may be entered by giving the pseudo-op TEXT followed by a space, d delimiting character, a string of text, and the same delimiting character. For example: 3-9 TEXT ZSTRING OF TEXTZ If this example is at location 0200, the listing is as follows: 200 2324 201 2211 202 203 204 205 206 1607 4017 0640 2405 3024 TEXT ZSTRING OF TEXTZ The first printing character following TEXT is taken as the delimiting character, and the text string is the characters which follow until the delimiting character is again encountered. Any legal character may be used as a delimiting character . The Assembler will print out all the code, then print the entire line after it when a carriage RETURN is encountered. If the text goes past the end of the manuscript without finding the end of string delimiter, the error message IE (illegal expansion) is printed, and the assembly is immediately terminated. 3.6.12 EJECT When a program is to be listed on a line printer, the command EJECT causes the next line to be printed at the top of the next line printer paper page, thus permitting a logical splitting along page boundaries. EJECT performs no operation if the listing is to the Teletype. 3.6.13 ASMIFx n The conditional assembly pseudo-ops, of the general form ASMIFx, can have three possible forms: In each case the expression is Pseudo-op Meaning ASMIFZ n Assemble if zero ASMIFN n Assemble if nonzero ASMIFM n Assemble if minus evaluted, and if the value of the expression matches the condition specified (zero, nonzero, minus), the next line is assembled. If it does not match, then the next line is not processed by the Assembler. The next line may be any statement but will most frequently be an ASMSKP pseudo-op (discussed below). Sections of code may thus be altered or entirely deleted from a program just by setting some values in the beginning of the assembly program. When using the TEXT pseudo-op, remember that the formatting feature of the Editor may insert unwanted tabs ,when a comma, slash, or carriage return is encountered. 3-10 3.6.14 ASMSKP n When the pseudo-op ASMSKP and the expression, n, following it are encountered, the expression on the right is evaluated. The number of lines equal to the value of that expression, starting on the next line, are not as- sembled. Thus, the ASMIFx class of pseudo-ops control the assembly of one statement; the ASMSKP pseudo-op controls any number of lines and can be used to eliminate entire blocks of statements. For both the ASMIFx family and ASMSKP pseudo-ops, assembled. sults; If an if no expression is present, the next statement will be attempt is made to go past the end of a manuscript with one of these pseudo-ops, no error re- the end of the manuscript is simply treated as the end of the skip block. With both the ASMIFx and the ASMSKP pseudo-ops, a line may be a normal assembly instruction, or it may be just a comment. Note that with the ASMIFx family and ASMSKP pseudo-ops, the condition zero must be specified by 0000. Consider the following program listing. 0042 0043 0044 0045 0046 0047 0050 0202 ASMIFN TAPE JMS WRITE ASMIFN TAPE-DISK ASMSKP 2 JMS READ JMS WRITE TAD Ml 4401 I I I 0203 1005 The expression after the ASMIFN pseudo-op at line 42, TAPE, had a nonzero value so the next line, 43, was assembled. The value of the expression TAPE-DISK also had a nonzero value, causing line 45 to be executed, thus skipping lines 46 and 47. Assembly was continued at line 50, The two pseudo-ops described next, SAVSYM n and LODSYM, are sophisticated tools which should be used only in large system programs. They are used to link sections of program where the source is not all in one file or where more than one program or subroutine is to be assembled together. These pseudo-ops are discussed briefly here and in detail in Appendix C, Paragraph C.2. 3.6.15 SAVSYM n (n = I or 2) The pseudo-op SAVSYM n allows the programmer to save part or all of his user symbol table for use in later assemblies. It is followed by an expression, n, which is evaluated to a value of 1 or 2. There are two cases when a user will want to save his symbols; first, when the user has defined some common definitions which are to be used with all his programs, and second, when the program is too large and must be split into two or more smaller programs that can communicate with each other. 3-11 3.6.16 LODSYM The pseudo-op LODSYM loads a symbol table previously saved by a SAVAYM pseudo-op. When a LODSYM command is given, all previously defined user symbols in core ore erased. For this reason, a LODSYM should be one of the first statements in a program. SAVSYM and LODSYM permit the user to do an assembly, save the symbol table, do another assembly, and call back in the original symbol table. 3-12 Chapter 4 DIAL Monitor Commands The DIAL Monitor commands are discussed in this chapter. Remember that the Monitor must be in command mode to accept a command. To enter command mode, the cursor must be under the first character (which must be blank) on a new line. All commands are issued by typing LINE FEED, the command in the correct syntax and RETURN. All DIAL-V2 assembly operations require two tapes and can only access files on unit 4.1 or 1 ASSEMBLE PROGRAM —AS (NAME,UNIT)^ NAME = name of filed program to be assembled UNIT = tape or disk unit on which NAME file is to be found (0-17) iVie is Monitor command AS performs on assembly of the NAMEd source file on the specified UNIT, given, the source program in the working orea on unit is no NAME assembled. With the command AS an assembly listing is not produced, but error messages with line numbers and a tag table are printed. the Assembly Error Messages.) if (See Appendix B for Note that the assembly and tag table printout can be stopped and the Editor called back by typing carriage RETURN. The binary coding is placed in the binary working area which is on present or on disk tape 1 if no disks are For all DIAL programs, 1 (unit 11) if disks are in the configuration. NAME can be one to eight characters long and must have at least 1 non-numeric char- acter and no? or / characters. For a machine with a line printer, the Assembler will automatically put its listing and symbol table on the line printer, if it is in the START or READY status. Otherwise, the output will go to the Teletype, 4.2 ASSEMBLE AND LIST PROGRAM — LI (LINE NUMBER 1, LINE NUMBER 2,) (NAME, UNIT)) LINE NUMBER 1 = starting line number LINE NUMBER 2 = terminating line number NAME = name of filed program to be assembled and listed UNIT = tape or disk unit on which NAMEd file is to be found (0-17) Hie LIST command performs the same functions as the AS command, but, in addition, produces an octalsymbolic listing on the Assembler output device. It will assemble and list from the working area if no program NAME and UNIT are specified. In DIAL-V2, the value of UNIT can only be command, AS, the binary working area on tape unit 1 is ^-\ or 1 . As with the ASSEMBLE used for the binary output and tag table. If fwo line numbers are supplied, the entire program in the working area or a NAMEd file is assembled, but only the portion of the program between the two line numbers is listed. To assemble and list only that part between lines 140 and 160 of the source working area, type - 140,160^ LI To assemble and list lines 300 to 310 of file MART on unit 1 , the correct command is — If LI 300, 310, MART, 1^ a line printer is available and in the ready state, the listing will be output to that device. By using the pseudo-operators LISTAPE, NOLIST, and LIST (refer to Section 3.6), the output listing can be controlled. Carriage RETURN may be typed at any time to return to the Editor. 4.3 ASSEMBLE AND QUICK LIST — QL (LINE NUMBER 1,LINE NUMBER LINE NUMBER 1 2, )(NAME,UNIT)^ = starting line number LINE NUMBER 2 = terminating line number NAME = name of filed program to be assembled and listed UNIT = tape or disk unit on which NAMEd file is to be found (0-17) This command performs the same functions as the LI command with the following exceptions: a. Line numbers and all comments are deleted. b. All tabs are printed out as spaces. The QL command enables the user to examine his code without having to wait the extra time to receive a full listing. The QUICK LIST feature normally saves 1 to 2 seconds per line, more if the program contains many tabs and comments. In DIAL-V2, UNIT must be or 1 . No line numbers are printed with the QL command. To help the user determine statement line numbers from the listing, (FIELD, *, QL takes advantage of the fact that the pseudo-ops PAGE, PMODE, LMODE, etc.) generate no code and the line number is printed instead of the lo- cation counter, the assembly may be interrupted by typing RETURN to go back to the Editor. Two listings of the same program follow to illustrate the differences between a listing produced by a LIST command and one generated by a QUICK LIST command. 4-2 TTiis listing was produced by a LIST command. Octal Number Mnemonic Code Location *20 0000 0001 PMODE /START IN PDP-8MODE 0002 0003 0004 0005 0006 0007 0010 LINEP=0 /NO EJECTS ASMIFN LINEP /EJECT? EJECT /YES. KCC /CLEAR KEYBOARD FLAG /SET TELETYPE FLAG /EJECT? /GO TO TOP OF PAGE. /CHAR. TYPED? /NO. WAIT /YES. READ IT IN. /TELEPRINTER READY? /NO. WAIT 0011 0012 0013 0014 0015 0016 0017 4020 4021 6032 START, 6046 TLS AFSMIFN LINEP 4022 4023 4024 4025 4026 4027 4030 6031 EJECT KSF LOOP, 5222 6036 JMP 6041 TSF 5225 6046 5222 JMP JMP *20 0001 PMODE / LINEP=0 / core 0002 0003 0004 4020 locations 4021 numbers QUICK LIST command. 0000 0007 0010 4022 4023 4024 core 4025 locations 4026 4027 _4030 6032 6046 line number 6031 5222 6036 6041 5225 6046 5222 0000 ERRORS LINEP 0000 4022 4020 LOOP START .-1 /YES. OUTPUT THE CHAR TLS LINEP 0000 LOOP 4022 START 4020 This listing was produced by a .-1 KRB 0000 ERRORS line Comment ASMIFN LINEP / EJECT / START, KCC / TLS / ASMIFN LINEP / EJECT / LOOP, KSF / JMP .-1 / KRB / TSF / JMP .-1 / TLS / JMP LOOP / 4-3 LOOP /GO GET ANOTHER CHAR. 4.4 SAVE BINARY — SB NAME UNIT(,MODE(ADDRESS)) ) NAME = name to be assigned to saved binary file UNIT = unit on which binary file is to be saved MODE = L if program is to start in P if program is to start in ADDRESS LINC mode PDP-8 mode = starting address (5 digits) The binary program most recently assembled with the AS, as file LI, or QL command can be saved with the SB command NAME on the specified UNIT. If another program is assembled before this assembled binary program is stored, the one assembled first is destroyed. Two tapes are required for this operation with DIAL-V2. The SB command has a load-and-go option, so that when a program is loaded into memory with the LO command, it will also automatically start to be executed. To use this option, the program If the program is to be started in is to start at 04020, the L is followed by typing LINC mode when loaded, the unit number is followed by an L. If the program 5-digit address must be specified. If the program is to be started in MODE must be specified. Tlie RETURN. If the program is to be started elsewhere, a full Data Field is always set to three when the program is started. PDP-8 mode, the unit number is followed by a P which causes the program to be started at location 00200; otherwise the full 5-digit starting address should be specified. If the SB command is terminated after UNIT with a carriage return, the loader will halt to location 7774 after having loaded the program. For example: To save the program PGMNAM on unit I so it will load and start in LINC mode at location 04020 so it will load and start in LINC mode at location 4020 of field it will load and halt —SB PGMNAM,!, Lj To save the program PGMNAM on unit 1 (location 20, segment 6) — SB PGMNAM,0, LI4020J To save the program PGMNAM on unit so — SB PGMNAM,Oj With each assembly, a binary header block is generated by the Assembler which maps the memory blocks used. The SAVE and LOAD BINARY commands use the data in the header to save or load the appropriate block's. 4-4 (Block 4000 is always saved in DIAL-V2). Thus, if a program occupied blocks 4000 and 4400, three blocks would be saved: the two program blocks and the header block. If a previous version of the same program is already present on the specified tape, DIAL will display REPLACE?. Type R to replace the existing file entry with this new entry; type RETURN if the existing file is not to be replaced. Control is then returned to DIAL. 4.5 LOAD BINARY — LO (NAME, UNI T)J NAME = name of binary file to be loaded UNIT = unit from which file is to be loaded If NAME is not specified, the program is loaded from the binary working area and the loader halts (at location 7774 for DIAL-V2 and at 7775. for DIAL-MS). If NAME is specified, but the designated program is not selfstarting, the program is loaded and the loader halts as above. If the NAMEd program is self-starting, the loader will start the program after loading. Note that the DIAL-V2 loader overlays locations 776]-7777 of field 0; the DIAL-MS loader will not load locations 7750-775] of field and locations 7600-7777 of field 1 . For both versions of DIAL, location the starting segment for self-starting 4.6 ADD BINARY of LMODE programs is destroyed by the loader. (DIAL-MS only) — AB(ADDR,(FIELD,))NAME,UNIT^ ADDR FIELD NAME UNIT = 4-digit (12-bit) address = field number (0 or 1) = name of a binary file on UNIT = unit on which file NAME may be found (0-17) The binary file is copied to the binary working area, omitting zeroes. Typicolly, ADD BINARY will be used without specifying ADDRESS and FIELD to combine standard subroutines with user-written main programs. For example, if a user has written a program which requires QANDA which is a binary file on unit 0, ond his program is in the source working area, the correct sequence is to ZERO the binary working area (refer to Section 4.7) and then assemble the program. If there are no errors, use ADD BINARY for QANDA, and test the result. — ZERO^ -*ASj — AB QANDA,Oj ^LOj 4-5 By odding QANDA in binary form, rather than source form with the ADD PROGRAM command, the user has saved considerable assembly time and avoided the possibility of tag duplications between his program and QANDA. If his program also needs FPP, for example, it can be added by the command — AB FPP,0J Thus, many subroutines can be combined with the user's program, without necessitating re-assembling each pro- gram. The result may be saved, with SAVE BINARY, as if the whole had been assembled together. ADD BINARY is also useful for patching binary programs, as follows: — CL — ZERO — AB /X IS THE FIRST LOCATION TO PATCH /INSTRUCTIONS OF PATCH GO HERE *X LISTAPE -1 — AS — SB PROGRAM, U /PRESERVE HEADER Refer to Section 3„6,6 for an explanation of the LISTAPE -1 pseudo-op. Note that, in general, for ADD BINARY to function properly it must be used in conjunction with the ZERO command. ZERO should always be used before assembling a program whose binary may later be added, and before adding a binary or binaries to the working area. The binary file is added to the binary working area via a word-wise OR operation. Thus, each nonzero word from the binary file replaces the old word at the corresponding (relocated) location in the binary working area. All zero words in the binary file do not replace their counterparts. Advanced users may want to use the ADDRESS and FIELD parameters to specify a new core location for the binary file. If If ADDRESS and FIELD are not specified (or both are zero), it will be moved to its assembled address. ADDRESS is specified and FIELD is not, it will be moved to ADDRESS in field 0. FIELD can not be specified without ADDRESS.. No address adjustment within the assembled code is performed. ADDRESS, if specified, is taken to be the new address of the first word of the first block of the binary files. The relocation of the binary is equal to [(FIELD*10000 + ADDRESS) - (ORG-7400) ] where ORG is the lowest origin in the assembly. 4-6 A binary may not be moved to field 0, location 0, because this is the condition recognized as no relocation. Any program, therefore, which may be used starting at must be assembled with origin 0. It may be moved to any other address by specifying the new address in the ADD BINARY command. If ADDRESS and FIELD are specified such that any portion of the binary file would be moved to an address above 20000 (i.e., in field 2 or higher), that portion of the file is ignored. No address adjustment is performed by ADD BINARY when a binary is relocated. It is thus necessary that a program which is to be moved include self-relocating code, so that it can determine its location at execution time. Tlie ADD BINARY facility allows the user to build large sophisticated programs (binary) from the results of many small assemblies and standard subroutine packages. This means that bugs can be corrected by re-assembling a small portion of the entire program. A sophisticated program might consist of a main program, MAIN, user-written subroutines, SUBl and SUB2, and standard subroutines, QANDA and FPP. The binary might be constructed as follows (MAIN is assumed to be in the source working area): — ZERO — AS SUB1,0 — SB SUBl, — ZERO — AS SUB2,0 — SB SUB2,0 — ABSUB1,0 — AB 7000, QANDA, — AB FPP, LISTAPE-1 — AS — LO 1 1 If /PRESERVE BIT MAP a bug is found in MAIN, the procedure to correct it is to restart DIAL-MS, change the source, re-assemble MAIN (using LISTAPE -1) and try again. Note that the Assembler will store explicitly defined zeros (HLT, AND 0, etc.), but will not zero storage skipped over by an origin or segment pseudo-op. 4.7 ZERO (DIAL-MS only) The ZERO command fills the entire binary working area with zeroes and clears the block mop, guaronteeing that any location not used in a subsequent assembly will be zero. There are three major applications of ZERO: a. 0000 is HLT in LINC mode. Therefore, filling the binary working area with zeroes is equivalent to filling unused core locations with HLT. Thus, a program being tested halts if it jumps to an unused location. 4-7 b. The! paper tape output option in PIP, DZ, (refer to Section 5.5), when combined with the ZERO command, allows the user to assemble and punch short patches to binary programs, with the re- sulting tape only as long as the patch. c. The ADD BINARY command depends on the use of the ZERO command in two instances: (1) Before assembling a program to be saved and later added. (2) Before a group of ADD BINARY commands, the ZERO command is required because ADD BINARY does not copy zeroes from the file in the working area. TTiis is done to enable the user to make effective patches and overlays easily. Press the RETURN key to return to the source working area display and text mode at any time. 4.8 SAVE PROGRAM — SP NAME,UNIT^ NAME = name to be assigned to saved program in file UNIT = unit to contain the NAMEd program DIAL saves the source program by NAME in one file on the UNIT specified. When saving a program, RETURN may be pressed at any time. This will interrupt the command and return to the source display with no effect, since DIAL has not updated the index. To prevent saving two programs with the same NAME, DIAL displays REPLACE?. The user may either type R to replace the file entry with this source or press RETURN to keep the old file entry. To save the source file PETE on disk unit 12, the command is —* SP PETE, 12^ 4.9 ADD PROGRAM — AP BN,UNITJ -*AP (LN1,LN2,)NAME,UNITJ BN = first block number of source program NAME = name of filed program UNIT = unit on which program is located To add DIAL source to the current source at the current line in the source working area or to call a previously stored source program into the working area for editing, etc., the AP command requires specifying only its starting block number, BN, or its NAME. Two line numbers may be specified to add that portion of the NAMEd program to the current source. 4-8 The first line of the program is added after the current line on the scope. Source lines which follow the added source are then renumbered; if there is no current source, e.g., a CLEAR command was issued, the added source will be the entire source. of the source file If the arguments are omitted, the command is ignored. Lines 15 through 361 EXP6 on unit 4 are added to the current source by the command — AP 15,361,EXP6,4^ 4.10 CLEAR -cl; can be cleared by using the command CL. DIAL remains in core and is The source working area on tope unit restarted with a clean buffer area. —*CL may be typed at any time to clear the source working area without having to manipulate any console switches. 4.11 DISPLAY INDEX -*DX (,UNIT)J UNIT = unit whose index is to be displayed The tape file index of the specified UNIT is displayed on the scope by the command-* DX. For each program on the tape, its name, source and/or binary, starting block number, and length in blocks are indicated. To view the entire index, use the following keys to modify the display. A frame is the number of lines defined by the setting of A/D knob 7. Press the Key Action 1 Forward one frame 2 Forward one entry Q Backward one frame W Backward one entry RETURN key to return to the source working area display and text mode at any time. Entries may be deleted from the index. Pressing the RUBOUT key will delete the last line on the display. If the wrong entry is deleted, type R to restore the index. The deletions are made permanent by typing the colon key (:) after erasing the desired entries. The is no index or an empty index, NO is DIAL working area display is returned to the scope. Note that if there displayed on the scope. Consider the index of unit 1 1 4-9 MHHE BN FORSWS Bl NLOFID BL.KS s EOE. ^ B .t5 4 J.<S S 201 1 «? 'ft I?? ^42 «f8 T«- t3 :. MHR (5 PRTC12-F S J. i:- i?5 B n Delete the binary file. A, by typing RUBOUT. ^ Move the display forward to view the rest of the index by typing 1. NUHE BLKS BN HRR B PH1C12-F S !?? ^42 St «5e. B j.a<i; 3.Z CUHRK H3i7 S ^ S EKRMJ. s ?£? P45 5£S «4 i« i? B nnsDN To delete the source file EXAMl, type 3 s 1?'4 W twice so that S it is the last entry on the display. Then type RUElOUT. Make this deletion permanent by typing colon. 4.12 PRINT INDEX — PX(,UNiT)^ UNIT = unit of index to be printed Tlie command PX prints out the contents of the specified index on the Teletype. Press RETURN at any time to stop the printout and to return to the source working area display. To check the modified index on unit 11 above, type - PX, 1 1 The index printed is SOURCE NAME BN FORSYS BINLOAD MAR PRTC12-F CLARK A31J 205 201 BN BLKS 1 154 1 202 16 3 2 BLKS 64S 6 65 64 7 27 16 174 1 EXAMl MASON BINARY 4-10 177 126 12 525 3 4.13 PRINT SOURCE — PS (LNl,)(LN2,)(NAME,UNIT)j NAME = name of file to be prtnted UNIT = unit on which NAMEd file is to be located LNl = starting line number LN2 = terminating line number The NAMEd source program is printed on the Teletype from the specified UNIT, The source currently in the working area is printed when no NAME and/or UNIT are designated. portion of the If two line numbers are specified, that NAMEd file is printed. Any DIAL source can be printed with the PS command. No words are split between Teletype lines. Printing time is approximately 1 minute per page for PDP-12 program sources. Line numbers, it is if specified, provide inclusive bounds for the printout. When only one line number is specified, assumed to be the start of the printout and the rest of the source on unit 1 is printed. To print lines 23 through 151 of file 4JA-1 on to the Teletype, use the command — PS 23,151,4JA-1,lj 4.14 EXIT -EXj The EXIT command completes the updating of the source working area from the memory buffers, thus assuring the user of leaving DIAL without losing the current source program in the working area. An EXIT command should be issued when editing is completed with the PDP-12. After - EX^ , DIAL halts. Press the CONTinue console switch to return to DIAL. The program that was in the working area when the EXIT command was issued is still there, and any legal DIAL operation can now be performed. 4.15 USER'S MONITOR COMMAND — MC X(Y),UNIT^ X(Y) = argument(s) to be passed by the Editor to a user program via the AC (argument Y is optional UNIT = unit to be read 4-11 The user's MONITOR command allows access to the free blocks of a DIAL tape. When the MC command is issued, block 270 of UNIT is read into core locations 4000-4377; the arguments XY are placed in the AC and the Editor turns program control over to the initial free block of code at location 4020 in Tape blocks 270 through 277 are defined as the free blocks of a DIAL system device. Paragraph C.6 for tape and disk allocation.) they are meant for the user. LMODE. (Refer to Appendix C, Except for the MC command, DIAL never accesses these TBLKs; The contents of block 270 are left to the user's discretion. The MC command has no meaning if the user's binary at block 270 is not aware of the Editor's action during the execution of an MC command. The MC command is obviously not meant for the beginning programmer. Consider the following examples. If the user wanted to expand DIAL to process additional Monitor commands, XX and X^X., that are not de- fined in DIAL, they can be defined in the free area and called via the Editor by: — MC X^X2,U^ -*MC ^2\'^J Then, depending upon the contents of the AC, the program loaded from block 270 would either do the function X^X^orXgX,. If the user had a program to be loaded into Locations 7600-7777 of field 1 (the DIAL loader does not access these locations), the binary can be placed in the last 200 words of TBLK 270 and a bootstrap routine in the first 200 words to move locations 4200-4377 to 7600-7777. Then the program can be loaded by -* MC A, U^ 4-12 Chapter 5 Peripheral Interchange Program (PIP) The Peripheral Interchange Program (PIP) for the PDP-12 permits the user to transfer source or binary files be- tween I/O devices, including disk (RS08 or RK08), LINCtape, high-speed and Teletype paper tape reader/ punch, card reader, and line printer. 5.1 INITIALIZING PIP (DIAL-MS) The command for calling PIP,-* Plj , loads PIP from the system unit; for DIAL-V2 users or DIAL-MS users running without an RS08 or RK08 disk, -» P\J is equivalent to the command equivalent to-*LO PIP, 10^ - LO PIP,0; for DIAL-MS users with RS08 or RK08 systems, it is To implement the — command call on a system using DIAL-MS with an RS08 or RK08 disk, PIP must be Pl^ . Copy tape copied onto unit 10 after initialization (refer to Appendix A, Paragraph A. 3). If a. Typing-* LO PIP,0^ b. Responding to the PIP displays with Aj to disk unit 10 by . just PIP is to be copied to the system device, , Uj , LOj RO^ , , in that order. respond to the PIP displays with &j , LO;PIP^ , RO;PIP^ , that order. Note that when using PIP, disk units may be called as through 7 rather than 10 through 17, as required for the other DIAL-MS programs. Either value is acceptable. Thus, RO above is equivalent to RIO. 5.2 CONTROL COMMANDS PIP implements four control commands that may be issued at any time while it is being used. Command Action CTRl/P Return to PIP options display CTRl/D Return to CTRl/U Rewind each transport that is set to REMOTE and has a tape at block 0, Repeated typing of on it and position unit CTRL/U will cause tape to be unloaded also. This option Is used to minimize tape handling for all units and to de- DIAL creose duplication time for unit 0. CTRL/T Rewind all LINCtapes completely (as with CTRL/U) and to block 300 to permit a faster DIAL-MS restart. Typing CTRL/T several times will unload unit 0. position tape 5-1 in 5.3 MODE OPTIONS When PIP is started, the following message is displayed. Note that lower-case letters are used in this chopter. to indicate half-size characters on the scope. PIP OPTIONS a auxiliary mode b binary mode s source mode reply: The file to be manipulated by PIP must be described at this time. Only one of the three single letter abbreviations above needs to be typed after reply. This PIP display and all subsequent displays are followed by reply: left hand corner. When o response is typed, it is and a square-shaped cursor in the lower seen at the location indicated by the cursor. The cursor moves one character to the right for each character typed in. Terminate a reply with a carriage RETURN. When responding to any PIP display, RUBOUT can be typed to delete the last character typed, or LINE FEED can be typed to delete the entire line. If an illegal character is typed, it is ignored, and the PIP display is returned to the scope. 5.4 BINARY OR SOURCE INPUT After the mode has been selected, the input device must be specified. If the reply to the first PIP display was B or S, the second display is shown as follows: INPUT DEVICE c h — card reader high speed reader I line tape r rs08,rk08disl< t teletype reply; The auxiliary mode option is described in Section 5.6. If LINCtape or disk is the selected input device, the user's response to the second PIP display must be in the format Ln;NAME or Rn;NAME, where L indicates LINCtape, R indicates disk, n is the input unit number (0-17) followed by a semicolon, and NAME is a 1- to 8-character file name. Thus, to input a file named ABC3 from LINCtape unit 4, the correct command is L4;ABC3. 5-2 If a card reader is to be the input device, type C after having chosen source mode. Columns 1-1 10„ are reod unless a response is given in the form Caa;THRU,bb, where aa is the first column to be read and bb is the lost column to be read. To read columns 50 through 110 (octal), the correct reply string is C50;THRU,1 10. The character codes used are not the card reader codes in the PDP-12 User's Handbook. Instead, they are the standard IBM-029 Keypunch codes (See Appendix B of Introduction to Programming, DEC-C-18). There are some minor changes in that set to be compatible with standard ASCII. Card Code 0-8-2 ] (underscore) 11-8-7 - (Logical not) \ 12-8-2 ^ (Cent Sign) c 1 (Vertical Bar) t the user desires, he may substitute an entirely different character set Into PIP (with the exception of BLANK). Refer to the PIP Internal Description, If, NONE DIAL Character 0-8-5 12-8-7 If 029 Character DEC-12-ZW2A-D. for binary input, the device is to be the high-speed reader or the the user's response must be in the form DF;Mode, Address, where D is the device abbreviation (H or T), and F is the memory field and is specified only for field P for PDP-8 mode, Teletype (neither is file or unit oriented), or larger. AAode is indicated by L for 1 and Address is the starting address. If LINC mode and by Mode and Address are omitted, the program is not automatically started when loaded. The Mode must be specified for the program to start after it has been read. More than one tape can be input during one PIP session (refer to Section 5.5). Tlie punctuation marks are always required if the items after them are specified. If no Address is given, a LINC mode operation starts at location 4020, and a PDP-8 mode operation starts at location 200. When the high-speed reader is in the input device, the tape must be in the reader before the carriage RETURN is typed to terminate the output device command string. For ASCII paper-tape input, the character CTRL/Z must terminate the input. It tape has been read in. the tape was originally punched by PIP, a CTRL/Z is already present at the end of it. If must be present as the last character on the tape or typed on the Teletype after the 5-3 Consider fhe following examples. Input is from the high-speed reader and the program, H;P when loaded, will be started in PDP-8 mode at location 200. H1;P,1000 Input is from the high-speed reader and the program, will T;L,6000 Input is from the Teletype and the program, in 1 when loaded, will start LINC mode at location 6000. Input is from the high-speed reader and the program, H when loaded, be started in PDP-8 mode at location 1000 in memory field when loaded, will not be started. If the specified file is not at the indicated location, NO will be displayed on the scope. Return to PIP by typing CTRl/P or return to DIAL by typing CTRl/D at this time. 5.5 BINARY OR SOURCE OUTPUT When a response to the input device display has been accepted, the output device must be specified. The following display appears on the scope. OUTPUT DEVICE h high-speed punch I line tape p line printer r rsOB, rkOS disk t teletype reply: If LINCtape or disk is to be the output device, a response in the same format as was used to specify them as the input device is required. Never ask to copy a file onto itself by using the same name and the same unit for both the input and output commands. This destroys the NAMEd file. To locate the file PETE on the correct command string is LO;PETE. 5-4 LINCtape unit 0, When using LINCtape or disk (DIAL-MS) as the input or output device for these PIP operations, be sure to specify the name of the file. If the file name Is omitted when specifying LINCtape or disk output, the file is assigned the name question mark (?) by PIP. The file will be accessible only by using PIP ond the name ? or no name. ?. If If the file name is omitted when specifying there is no file with that name, then can be generated at this time. If LINCtape or disk input, PIP can locate only a file named NO will be displayed on the scope. Only a return to PIP or DIAL no unit is specified when using PIP, unit of the specified device type is assumed. If there is not sufficient room on the indicated device to perform the requested action, NO is displayed. Type CTRl/P to return to the first PIP display or CTRL/D to return to DIAL. If a file with the same name is already located on that tape, the message if the present file is REPLACE? is displayed. Type R^ to replace the existing file or, if it is not to replace it, type CTRl/P to return to the first PIP display or CTRL/D to return to DIAL. For high-speed punch. Teletype, or line printer output, only the letter abbreviation is required. The punch will generate leader tape automatically. When the output device command string is terminated, typing a carriage RETURN initiates the specified operation. Note that tape punched using PIP can be read directly into DIAL by the Teletype reader. If the Teletype or high speed, paper-tape punch is chosen as the output device, an option may be used so that zeros are not punched. It is specified by the reply T;DZ or H;DZ to the output device display. Note that the tope produced does not contain a halt instruction if in LINC mode. If zeros are removed from the middle of a section, however, a new origin is punched, so that the remaining code will be loaded properly. This option is especially useful for patching programs in conjunction with the ZERO command (refer to Section 4.7). For example, the following sequence generates a short paper-tape of the program SCW on the high-speed punch. TVie initial ZERO command causes all locations to contain zeros and therefore ore not punched by the H;DZ statement. — ZERO SEGMNT 1 *100 1 2 3 — AS — SB SCW, — PIP 1 B RIbSCW H;DZ 5-5 If the input device wos the paper-tape reader, then after the first tape has been read in, the following display appears on the scope. MORE TAPES? read another tape -no more tapes a n reply: Type the oppropriate letter answer and a carriage RETURN. A reply of A will store the next file immediately after the first one. Eoch tape must be terminated by a CTRL/Z; if CTRL/Z is not on the tape, it must be typed on the Teletype after the tape has been read. Any operation can be interrupted by typing CTRL/P to return to the first PIP display or by typing CTRL/D to return to DIAL. 5.6 AUXILIARY MODE If the letter A is typed in response to the PIP mode options display, the following is seen on the scope. OPTIONS c copy specified blocks d duplicate tape s copy system copy unit u onto 1 reply: In addition to specifying the option, a number can follow any of the replies to indicate the number of con- secutive units onto which the specified blocks of tape are to be transferred. The S option copies blocks 300-345 and 350-370, thus copying the entire DIAL system except for the index. The U option duplicates the specified unit onto other specified units. A reply of D will perform thot operation immediately. A response of C, S, or U will produce the second PIP display requesting the input device. The only acceptable input devices are disk and LINCtape. For the C option, the reply must be in the format Dn;fb,nb, or Ln;fb,nb where D Is disk and L is LINCtape, n is the unit number, fb is the first block, and nb is the number of blocks to be read. Thus L2;63,24 will start input from LINCtape unit 2, block 63, ond con- tinue for 24 blocks. Note that block numbers are octal. For the S or U option, only the device and unit must be specified; block limits are not required. When the input response has been accepted, the PIP output display is seen on the scope for the C, S, and U options. The only acceptable output devices are disk and LINCtape. For the C option, response must be in the form Dn;fb or Ln;fb where D is disk and L is LINCtape, n is the number of the first consecutive tape unit, and fb is the block where output is to start. The S and U options require only that the device and unit number be specified. 5-6 5.7 ERRORS During ail PIP operations, the program checks for errors. When one is encountered, the following message is displayed. DISK (TAPE) ERROR AT BLOCK nnnn r accept as is try again (repeat tape operation) s try to skip past error a reply: For a disk error, the leftmost digit of the block number, nnnn, It is is the disk unit number (0-7). up to the user's discretion to choose one of the three options above. For a disk error, the disk status register can be checked to determine the type of error. If the problem is a minor hardware error, for exomple, the WRITE ENABLE switch was not set, then choice R can be used. some of the block numbers have been If modified, then choice S may still yield a working system. The user can always type CTRL/P to return to PIP or CTRL/D to return to DIAL. For binary tape input, the error message, CHECKSUM ERROR, can be followed only by a return to PIP or DIAL. For an RK08 system, the message SEEK ERROR is displayed for 5 seconds if the movable head on the disk is misthis message arises often, the disk positioned. PIP will automatically recalibrate the disk and try again. If should be serviced. Note that if this message appears during startup, it is because the disk head may be ran- domly positioned. Remember that systems with RK08 disks only permit units 10-15. Addressing additional units with PIP will generate one of several error messages on the display, possibly SEEK ERROR. If the return commands CTRl/P and CTRL/D fail to operate, PIP may be restarted by stopping the processor, setting the Left Switches = 0200, and pressing the START LS console key. 5.8 If RECOVERY the input for a PIP operation is binary paper tape and output is to tape or disk and NO is displayed, a SAVE BINARY command may be issued after CTRl/D to save the program on another unit without reloading the tape. Call the program from the unit to which it was output. (This procedure is illegal for systems with two or more DF32 disks.) To reclaim a source program if PIP displays NO, issue the following appropriate commond ofter typing CTRl/D -< AP370, 1^ or — AP370, Ij 1 if no disk or a DF32 disk is present if an RS08 or RK08 disk is present 5-7 5.9 PIP EXAMPLES The following command sequences are examples of PIP operations. 1 Copy the binary file BINFILE from unit to unit 6. B LO;BINFILE 1.6; BINFILE 2. Copy the source file HOW from unit 3 to unit 7. S L3;HOW 1.7; 3. HOW Copy the binary file OLDNAME from unit 1 to unit 7 ond call it NEWNAME. B Li; 1.7; 4. OLDNAME NEWNAME Read in a binary tape via the high speed reader, and store it as file JIO on unit 0, where it will 200 in PMODE. start at location B H;P 1.0; J 10 5. Duplicate the source file COPY! on unit 2, and call it COPY2 on the some unit. S L2;COPY1 1.2;COPY2 NOTE: Never copy a file onto itself on the same unit. For example: B L1;COPYl Ll:COPYl This sequence could result in the destruction of the file COPY! 6, Punch the source file HERE on unit 3 by the high speed punch. S L3;HERE H 7. Read in a tape on the Teletype that was not originally punched by PIP, ond store it as file MARTY on tape unit 0. <[ T LO; MARTY When the tape is finished, type CTRl/Z on the Teletype (if PIP hod punched the tape originally there would be a CTRL/Z at the end of it). 5-8 Then type N if only this tape is to be read or A 8. if another Duplicate tape tape is to be read and added after the first tape. onto tape 1 A D 9. Duplicate tape onto tapes 1, 2, 3, 4, and 5. A D5 10. Copy blocks 300-317, unit 4, to blocks 200-217, unit 6. A C L4;300,30 L6;200 n. Copy blocks 600-677, unit 2 to blocks 700-777 of units 5, 6, and 7. A C3 L2;600, 100 L5;700 12. Copy the system area tape from unit to LINCtape unit 3. A S LO L3 13. Copy the tape on unit 1 onto logical disk units 2 and 3. A U2 LI R2 5-9 Appendix A DIAL-V2 vs. DIAL-MS A.l In FEATURES addition to the general system capabilities outlined in Section 1.1, the following features are unique to each version of DIAL: a. DIAL-V2 (1) Overlapped tape I/O to accept user input during a tape read or write operation. run on tape, input is not accepted while the tape is moving.) (When DIAL -MS is (2) b. 4K system DIAL -MS (1) Fully integrated tape-disk system with mass storage support for one or two DF32, one to four RS08 or one RK08 disks. (2) Editor commands to clear the binary working orea (which is used in conjunction with the PIP option not to punch zeros) and to merge binary files. (3) I/O routines to read, write, or move data. (4) Increased Assembler facilities for processing large programs. (5) 8K system A. 2 SYSTEM BUILD FOR DIAL -MS The following system-build procedure must be executed to "build" a DIAL-MS tape. Part of the procedure is running the program, GENASYS, provided on the system tape Step 1 2 Procedure Start the system by the procedure in Appendix A. 4. Type — LO GENASYS ,0^ to load GENASYS to specialize a tape for DIAL-MS on this system configuration 3 After the message TAPE UNIT CONTAINING GENASYS: is 4 printed, type 0. GENASYS then asks TAPE UNIT FOR DIAL -MS: Type an octal digit to indicate the tape unit on which DIAL -MS is to be built. If the reply is GENASYS does not initialize DIAL-MS, the procedure in Section A. 3 must be performed not 0, to initialize the tape. If the reply is 0, another message is printed on the Teletype after GENASYS has built DIAL-MS: PRESS CONTINUE TO INITIALIZE DIAL-MS: Press the CONTinue key. The last message is A-1 Procedure Step WHEN EDITOR DISPLAY APPEARS, TYPE (LINE FEED) EX (RETURN) GENASYS initializes DIAL-MS. When that- is done, the Editor Type— EXJ and then press CONTinue. DIAL-MS is ready to accept user After the message is printed, display appears. input. The following error conditions can occur. a. If GENASYS is not able to find 8K of core, the following message is printed and GENASYS returns to DIAL-V2. THIS MACHINE HAS ONLY 4K, DIAL-MS REQUIRES 8K. b. If GENASYS is not able to find one of the four binary files needed to build DIAL-MS, the following message is printed: THIS TAPE DOES NOT CONTAIN BINARY DIAL-MSx, where x is a digit, c. If 1 to 4. NEEDED FOR GENASYS. Continue at Step 4 above. one of the binary files is the wrong length, the following message is printed: LENGTH ERROR IN DiAL-MSx. where x is a digit, 1 to 4. A. 3 SYSTEM INITIALIZATION A system using DIAL-MS must be initialized. This procedure causes: the initial tape to modify itself to become a startup tape by building a set of I/O routines for a. hondling the user's particular disk configurotion, b. the initialization routine to copy the DIAL-MS system area (blocks 270 to 345 and 350 to 467) into the appropriate area on the disk. from tape System initialization may be automatically carried out by GENASYS (by a reply of in Step 4) or may be performed when the equipment configuration changes, if the contents of the disk are lost for ony reason, or GENASYS does not perform the procedure, e.g., because a tape unit other than was specified in Step 4. The procedure is Procedure Step 1 2 Mount the DIAL-MS tope on tape unit 0. Mount another LINCtape on tape unit (required if configuration has no disk or 1 only one DF32 disk). & 2. 3 Set the scope channel knob to position 4 Set the switches of both tape units to REMOTE and set unit 5 Set all disk units to WRITE ENABLE. A second DF32, 6 if present, 1 to WRITE ENABLE. A single DF32 disk unit must be set to 0. must be set to 1 Set the mode switch to LINC mode and press the A-2 I/O PRESET key. Step 7 Procedure Set the Left Switches to 0701 and the Right Switches to 7310 by pushing down the front part of the switches indicated by t and pushing down the back part of those indicated by | in the following diagram. ttt iU ttt tti Ui tu ttt ttt Left Switches Right Switches DO key. 8 Press the 9 When the tape has stopped spinning, press the START 20 key. 10 Type-»EXJ when part of the DIAL-MS program appears on the display in order to preserve the DIAL-MS pointers. Press CONTinue. (This step is essential it updates the Editor's pointers.) 1 Set the 12 if VD knob 3 all the way to the right. A DIAL command moy now be issued. PIP is to be used, refer to Section 5.1. A.4 SYSTEM STARTUP The following procedure is performed every time DIAL-MS (and DIAL-V2) is to be used. For DIAL-MS it is assumed that the tape ond disk have been initialized (refer to Section A. 3) so thot the DIAL-MS system looded from tape is aware of available disks and will use them appropriately. Step Procedure 1 AAount DIAL tape on tape unit Oo 2 Mount another LINCtape (scratch) on unit 1 3 Set scope channel knob to position 4 Set the switches of both tape units to REMOTE and WRITE ENABLE. 5 Set all disk units to WRITE ENABLE. if present, 6 7 1 & 2. A single DF32 disk must be set to 0; a second DF32, must be set to 1 Set the mode switch to LINC mode and press I/O PRESET. Set the Left Switches to 0701 ond the Right Switches to 7300 by pushing down the front part of the switches indicated by by ,\ j and pushing down the back part of those indicated in the following diagram. ttt Ui ttt ttl \il Left Switches tu tu ttt Right Switches 8 Press the DO key. 9 Press the START 20 key when the tape has stopped spinning. Jh e version of DIAL on the tape is started and ready for any A-3 DIAL operotion. It is possible for on error condiHon fo result while initializing the system, causing the computer to the status register for the device in the Accumulator; this informs the user of the The Right Switches are then set to indicate the error recovery method anything but 7777, the operation is tried again. sole key. It is . If the halt with exact nature of the error. user sets the Right Switches to This retry facility is activated by pressing the CONTinue con- good practice to retry the operation that produced the error at least once. If the Right Switches are set to 7717 , the data will be accepted by the computer after pressing the CONTinue key. has been modified for the user's particular configura- At the completion of this operation, the tape on unit tion. It may be copied with the auxiliary "S" option of PIP if multiple copies are needed (refer to Section 5.6). The initialization procedure may bfe repeated at any time, but it is necessary only when the DIAL-MS the disk is lost or when the configurction changes. Refer to PDP-12 User's Handbook, DEC-12-SRZA-D. A-4 system on Appendix B Assembly Error Messages During source program assembly, error messages in the form of a two-letter code are included in the program listing. These messages, defining illegal syntax or insufficient space errors, ore explained below. Error Code IC Explanation Illegal Character - An illegal character was processed in the instruction field; the character is ignored and the assembly is continued, ID Illegal reDefinition of a symbol - An attempt was made to give a previously defined symbol a new value by means other thon the equal sign; the symbol was not redefined. IE Illegal Expansion - Delimiter missing in text. IR Illegal Reference - An off -page reference was made. SE Symbol table Exceeded - Assembly is terminated and control is returned to DIAL; up to 895 user symbols, maximum. US Undefined Symbol - A symbol has been processed during pass 2 that was not defined before the end of pass 1 WA Binary Working Area exceeded - Assembly is terminated and control Is returned to DIAL; more than lOOg blocks of source program have been input for ossembly (refer to Appendix C, PS Paragraph C.2). Push-down Stack exceeded - Too many symbols to be evaluted on one line. B-1 Appendix C Summaries C 1 C OMMAN D S UMMARY . All commands are issued in the form — Command^ »• Command FuncHon AS (N,U) Assemble LI(L,L,)(N,U) Assemble and List QL(L,L,)(N,U) Assemble and Quick List LO(N,U) Load Binary PS(L,)(L,)(N,U) Print Source AB(A,)N,U Add Binary SB N,U(,M(FA)) Save Binary SP N,U Save Program (Source) AP(L,L,)N,Uor B,U Add Program (Source) DX(,U) Display Index PX(,U) Print Index CL Clear Source Working Area ZE Zero Binary Working Area PI Peripheral Interchange EX Exit MC X(Y),U User's Monitor Command L Line Call Legend indicates an optional parameter F = Field N = File name B = Tape block number U =Tape (0-7) or disk (10-17) unit X(Y) = Characters in accumulator L = Line number M = Mode (L or LINC or P for PDP-8) — = L1NE FEED } = Carriage RETURN A = Address (4 digits) C-1 C.2 PSEUDO-OPERATORS Pseudo-Op Mode ASMIFM n Assemble if n is negative ASMIFN n 8A 8A ASMIFZ n 8/L Assemble if n = ASMSKP n 8A 8A 8A 8A Continue Assembly after n lines 8 Indirect addressing Negate NOLIST condition LIS TAPE 8A 8A LMODE 8 Causes subsequent coding to be Interpreted as LINC instructions LODSYM 8A 8A 8A 8A Load saved symbol tape (see below) DECIMAL EJECT FIELD n 1 LIST NOLIST OCTAL PAGE n Operation Assemble if n ^ Set decimal radix for Integer input Print next line at top of next page of line printer Defines each 4K of memory; n = or 1 Header block and Assembler listing control Inhibit octal -symbolic listing during assembly Set octal radix for integer input Start new page at n-200. If no parameter, start at next page (0^<40g) PMODE L Causes subsequent coding to be interpreted as PDP-8 instructions; SAVSYM n 8A 8A Saves symbol table for later assembly (n = 1 or 2) (see below) SEGMNT n Starts new segment at N'<2000, (0 < n If no parameter start at next segment. < 7) TEXT 8A Packs two 6-bit words per cell Z 8 Page zero reference The two cases requiring use of the SAVSYM pseudo-op and the procedure for assembling large programs with the SAVSYM, Case 1 . LODSYM, and LI5TAPE pseudo-ops are discussed in detail in this section. Assume that the user has defined the following symbols for his program. INDEX = 346 /set the index pointer to 346 DISK =3 Ahree disks TTYIN=7423 /address of Teletype input routine TTYOUT=7520 /address of Teletype output routines SAVSYM /now save just these symbols (see below) 1 *XXXX YYYY /the rest of the program C-2 The command SAVSYM 1 will cause the user-defined symbols INDEX, DISK, TTYIN, and TTYOUT to be saved when fhe program is assembled. Any user symbols occurring lafer in the program will not be saved. At a later time in another program, a LODSYM command will load these symbols into the symbol table without having to retype them. Case 2. If all SAVSYM 1 is symbols are to be saved in a common table, the SAVSYM 2 command is used. Thus, if replaced by SAVSYM 2 in the previous example, then the four user-defined symbols and all symbols to follow are saved in the symbol table. symbols are to be saved. If a This is useful in breaking up large assemblies when all symbol was redefined, the last definition assigned will be the one saved. Note that the more symbols defined and saved, the slower the Assembler will run. The symbol table is always stored in the working area on unit 1 near the binary output and the present symbol table. With SAVSYM 1, the symbol toble is saved at this point in pass 1 of the assembly. With SAVSYM 2 the symbol table is saved at this point during pass 2. The user who wants to save a set of common definitions or a common page zero with pointers should use the command SAVSYM 1 after the definitions on page zero. No other symbols are saved. The user who wishes to save all his symbols because his program has to be split into sections should put the command SAVSYM 2 at the end of his program, assuring that all symbols will be properly defined. In either case, the symbols will be permanently saved unless one of the following conditions occurs: a . The tape is erased b. The tape is used for unit c Another SAVSYM command is given at some later time and replaces the old symbol table with a new one . workspace (source) and is overwritten. C.2.1 Assembling Large Programs with SAVSYM, LODSYM, and LISTAPE SAVSYM and LODSYM may be used to assemble a program that is longer than 100_ blocks by breaking the program into several smaller files. To avoid symbol communication difficulties, SAVSYM, LODSYM and LISTAPE in the following manner. C-3 (in DIAL -MS) are employed PART 1 SAVSYM 2 PROGRAM LONGER THAN 100 LODSYM 8 BLOCKS LISTAPE-1 PART 2 A SAVSYM 2 during the assembly of PART 1 will save all the symbols from PART 1 . The LODSYM at the start of PART 2 loads in the saved symbol table, thus putting all the symbols from PART 1 and PART 2 into a common symbol table. For DIAL-MS, LISTAPE with a negative argument con be used to preserve the bit map from the assembly of PART 1 . The program is then assembled by the commands — AS PART — AS PART 1 2 This method will work only if all the symbols referenced in PART 2 are defined in PART 1 . Because most pro- grams cannot easily be split so all references occur after definitions, the following technique is employed. PROGRAM LONGER SAVSYM THAN lOOg LODSYM LODSYM 0000 1 + + BLOCKS CLEARSYM LISTAPE-1 SAVSYM 2 SAVSYM PART PART 2 1 The program is assembled by the following command string. — AS CLEARSYM — AS PART 2 — AS PART — AS PART 2 1 The program named CLEARSYM produces a clean symbol table. clean symbol table. assembled, The LODSYM in PART 1 then loads in this PART 2 is assembled first so that all symbols in that part will be defined when PART ignore any error messages generated at this time. C-4 is PART 1 and PART 2 are then assembled correctly by using a SAVSYM 2 pseudo-op at the end of each part and a LODSYM at the start of each messages generated now indicate real errors in the program. 1 . Any error When starting an assembly with DiAL-V2 only, the Assembler destroys the binary coding in locations 4000-4377. Therefore, the user must assemble the part containing this section of code last. locations 4000-4377 ore in If the program was split so that PART 2, then the sequence above will assemble the program correctly. If the pro- gram was split so that locations 4000-4377 are in PART 1, then the correct sequence of commands is as follows: — AS CLEARSYM — AS PART 2 — AS PART — AS PART 2 — AS PART 1 1 Locations 4000-4377 must be in the lost part assembled, no matter into how many ports the program has been split. The program may then be loaded directly, but in DIAL-V2 it cannot be saved by a SAVE BINARY command directly because the binary header block for the file is incorrect. Only the last part of the program to be assembled is included in the heoder block. Block 447, the header block, must be filled with correct information. Each word of block 447 from word 340 to 377 represents 400- words of the file to be saved, as follows. BLOCK 447 Word Word Locations Represented unused 336 totol 337 ^J number word blocks sav« - 377 400 - 777 340 341 ; 377 If 17400- U777 any of the word locations represented contain dato, then the corresponding word of block 447 must contain the value 7777, If those word locations are empty, then the appropriate word of block 447 contains 0000, To correct the header block, load 7777 into the correct word of block 447. When completed, change word 337 of block 447 to the total number of words between 340 and 377 in block 447 that contain the value 7777 . A SAVE BINARY command may then be performed. Use of the LISTAPE pseudo-op in DIAL-MS inhibits destruction of the header block at the start of a new program assembly. C-5 C.3 CHARACTER SET External Keyboard (ASCII) A 301 B H 302 303 304 305 306 307 310 10 1 311 11 12 P 312 313 314 315 316 317 320 20 Q 321 21 R X 322 323 324 325 326 327 330 22 23 24 25 26 27 30 Y 331 31 z 332 333 334 335 336 337 240 32 33 34 35 36 40 241 41 42 ( 242 243 244 245 246 247 250 ) 251 51 252 253 254 255 256 257 260 52 53 54 261 61 C D E F G J K L M N O S T U V w [ (SHIFT/K) \ (SHIFT/L ] (SHIFT/M) t SPACE 1 II # $ % & 1 * + / - / 1 Internal 1 2 3 4 5 6 7 13 14 15 16 17 Illegal (not displayed) Illegal (not displayed) 44 45 46 Illegal (not displayed) 50 55 56 57 60 C-6 Exfernal Keyboard (ASCII) Internal 2 6 7 262 263 264 265 266 267 8 9 270 62 63 64 65 66 67 70 271 71 272 273 274 275 276 277 300 212 215 375 377 72 73 74 75 76 77 3 4 5 ; / < = > ? @ LINE FEED RETURN ALTMODE RUBOUT CONTROL/I (TAB) Illegal (not displayed) 37 43 (nof displayed) None (not displayed) None (not displayed) 47 (not displayed) 211 C.4 INSTRUCTIONS C.4.1 PDP-8 Symbols Mnemonic AND Operation Octal MEMORY REFERENCE INSTRUCTIONS logical AND 0000 TAD 1000 2000 3000 4000 5000 ISZ DCA J MS JMP GROUP 1 2s complement add increment & skip if zero deposit & clear AC jump to subroutine jump OPERATE MICROINSTRUCTIONS NOP 7000 no operation lAC RAL 7001 increment AC 7004 7006 7010 7012 7020 7040 7100 7200 rotate AC & link left one RTL RAR RTR CML CMA CLL CLA rotate AC & link left two rotate AC & link right one rotate AC & link right two complement link complement AC clear link clear AC C-7 Mnemonic Operation Octal GROUP 2 OPERATE MICROINSTRUCTIONS HLT 7402 7404 7410 7420 7430 7440 7450 7500 7510 OSR SKP SNL SZL SZA SNA SMA SPA halts the computer inclusive OR switch register with AC skip unconditionally skip on nonzero link skip on zero link skip on zero AC skip on nonzero AC skip on minus AC skip on plus AC (zero is positive) COMBINED OPERATE MICROINSTRUCTIONS CIA 7041 complement & increment AC STL 7120 7204 7240 7604 set link to GLK STA LAS 1 get link (put link in AC, bit 1 1) AC = -1 load AC with switch register set lOT MICROINSTRUCTIONS Program Interrupt ION OF 6001 turn interrupt on 6002 turn interrupt off KSF 6031 skip if keyboard/reader flag = 1 KCC 6032 6034 6036 clear AC & keyboard/reader flag TSF 6041 skip if teleprinter/punch flag = 1 TCF TPC 6042 6044 6046 clear teleprinter/punch flag load teleprinter/punch buffer, select & print I Keyboard/Reader KRS KRB read keyboard/reader buffer clear AC & read keyboard buffer, & clear keyboard flag Teleprinter/^unch TLS load teleprinter/punch buffer, select & print, and clear teleprinter/punch flag Clock CLSK 6131 skip on clock interrupt CLLR 6132 6133 6134 6135 6136 6137 load clock control register 1 CLAB CLEN CLSA CLBA CLCA Extended Memory (Type MC8/I) 62nl CDF CIF RDF RIF RMF RIB 62n2 62n4 6224 6244 6234 AC to buffer preset register load clock control register clock status to AC buffer preset register to AC counter to AC change to data field n change to instruction field n read data field into AC read instruction field into AC restore memory field reod interrupt buffer C-8 Mnemonic Octal Operation lOT MICROINSTRUCTIONS (cont) Processor Mode Change LINC change to LINC mode processing 6141 C.4.2 LINC Symbols Mnemonic Octal ADD ADA LAM 2000 1100 1140 1200 MUL 1240 LDA LDH 1000 1300 STC STA STH 4000 ROL N ROR N 0240 0300 0340 Operoti' ADD ADM add memory to A (full address) add memory to A (index class) add A to memory (sum also In A) add link and A to memory (sum also in A) MULTIPLY signed multiply LOAD load A, full register load A, half register STORE A (full address) A (index class) store half A store and clear 1040 1340 store SHIFT/ROTATE SCRN N places N places scale right N places rotate left rotate right OPERATE HLT NOP 0000 0016 halt no operation CLR 0011 clear AC ond LINC SET 0040 6000 0005 set register J MP QAC N to contents of register Y jump to register Y MQ transfer to AC LOGICAL OPERATIONS BCL SCO 1540 1600 1640 COM 0017 BSE bit clear (any combination of 12-bits) bit set (any combination of 12-bits) bit complement (ony combinotion of 12 complement AC SKIP Skip next instruction if: SAE 1440 1400 AC equals memory register, Y right half AC unequal to specified holf of memory register, Y SNS N 0440+N sense switch SKP 0456 0450 unconditional skip SHD AZE N is set AC equals 0000 or TTT7 C-9 OperaHon Mnemonic Octal APO 0451 AC contains positive number LZE 0452 0454 0455 add overflow is set SKIP (cont) FLO QLZ SXL N KST SRO XSK link bit equals 0400+N bit 1 1 of Z register equals external level N is preset keyboard has been struck 0415 1500 rotate memory register right one place; then if bit of Y equals 0, skip next instruction contents of Y equal 1777; index memory register if 1 bit set STD 0200 0416 ATR RTA 0014 0015 AC to relay buffer relay buffer to AC SAMN 0100+N sample analog channel DIS 0140 1740 0002 0516 0517 0500 display point on oscilloscope tape instruction completed INPUT/OUTPUT DSC PDP RSW LSW JOB N display character on oscilloscope (2x6 matrix) change to PDP-8 mode RIGHT SWITCH register to AC LEFT SWITCH register to AC I/O bus enable MEMORY LIF LDF 0600 0640 change instruction field change data field LINC TAPE read one block into memory RDC 0702 0700 RCG 0701 read and check WRI write one block on tape MTB 0706 0704 0705 0707 0703 XOA 0021 RDE WRC WCG CHK read and check one block N consecutive tape blocks write and check one block write and check N blocks check one block of tape move tape toward selected block extended tape operations buffer to AC EXTENDED OPERATION S TMA 0004 0003 0023 AXO 0001 DJR 0006 0000 0024 ESF TA-C MSC SPA enable special functions tape control register to AC AC to tape control register AC to extended operations buffer disable Jump Return Save miscellaneous special functions to AC C.5 OPERATORS AND SPECIAL CHARACTERS Char Mode Operation 8/L Assign symbolic address 8A Origin - dependent on mode (LINC or PDP-8) C-10 Char Mode = 8/L Define parameters + 8A Combine symbols or numbers - 8/L Combine symbols or numbers 8/L Has value of current location counter / 8/L Comment u L Add 10_ to instruction 1 L 8 Add 20g to instruction Add 400g to instruction / 8/L Terminate coding line • Operatron o SPACE 8/L lOR & 8/L Logical AND 1 8/L Logical lOR \ L Operator x\y = 1000„x+y where x is a single octal digit C.6 LAP6-DIAL TAPE ALLOCATION DURING ASSEMBLY Systems Unit: Scratch Unit: FILE FILE FREE 267 277 INDEX 345 347 t 1 FREE 267 277 INDEX 345 347 t LAP6-DIAL LAP6-DIAL 367 367 BINARY SOURCE WORKING AREA WORKING AREA 427 USER SYMBOLS (4K only) CORE MEMORY MAP SAVSYM SYMBOL AREA 467 FILE 446 44/ 457 FILE 777 777 c-n Allocation of LAP6-DIAL Areo C.6.1 DIAL -MS DIAL-V2 Blocks Content Same as DIAL-V2 except: 300-321 EDITOR Blocks Content 322-345 ASSEMBLER 310 SYS BUILD 346-347 INDEX 322-323 I/O ROUTINES 350-353 FILECOMS 324-344 ASSEMBLER 354-355 LOADER 345 I/O CONTROLLER 356-360 SAVE BINARY 356-360 UNUSED 361 -362 PX, DX 363 TTY 363 PS 364 PS 364 TTY 365-366 UNUSED 365-366 MASTER I/O ROUTINES 367 SCRATCH C.6.2 DIAL-MS Disk Allocation Disk allocation for the available PDP-12 mass storage configurations with DIAL -MS is as follows. Contents Disk Used 1 DF32 2 DF32's 1-4RS08'5 Disk contains First DIAL-MS system and source working area DF32 as above; second dijsk contains binary working area First disk (logical Units 10 and 11) contains DIAL-MS system program and source and binary working areas and files assigned to logical units 10 and Each RS08 disk is equivalent 11 . Up to three additionol units may be used. to two LINCtapes and eoch may be used for storage of source and/or binary files. 1 RK08 Logically equivalent to six LINCtapes; DIAL-MS system programs and source working area are on first unit. Binary working area is on the second, source and/or binary files are on all six units. C.7 SAMPLE PROGRAM The following listing is an example of a program which will read in a paper tape in image mode. in only source or binary.) and packed with zeroes. to indicate (PIP will read This program reads in 8 bits from the Teletype and puts it in one word, right justified, The data is then written out onto the working area of unit 1 . when the end of the tape has been reached and then to restart DIAL. tape, it can be copied and used as input to another user program. and is not the only way to do this task C-12 Sense switch Is used Once the data is written on Remember that this program is an example *20 0000 0001 0002 0003 0004 0005 0006 0007 0010 0011 0012 0013 0014 0015 0016 0017 0020 0021 0022 002«i 0024 0025 0026 0027 0030 0031 0032 0033 0034 0035 0036 0037 0040 0041 0042 0043 0044 0045 0046 0047 0050 0051 0052 0053 0054 0055 0056 0057 0060 0061 0062 0063 0064 0065 0066 0067 0070 0071 / / / / / / / / / / / / / THIS PROGRAM WILL READ IN A PAPER TAPE AND PLACE THE CONTENTS OF IT ON L NC TAPE, THE PAPER TAPE IS READ AS AN 8 BIT CODE AND IS PACKED ONE CHARACTER PER WORD, RIGHT JUSTIFIED, WITH THE LEFT BITS CONTAINING 2ER0, THE DATA IS WRITTEN ONTO THE WORKING AREA OF UNIT 1, STARTING AT BLOCK 370. IS THE END OF INPUT SIGNAL, SENSE SWITCH IF THERE IS TOO MUCH DATA, THE PROGRAM WILL HALT WITH 7777 IN THE AC, WHEN FINISHED, THE PROGRAM WILL RESTART DIAL. I / f *1 / / 0001 0000 BLOCKN, 0002 0000 BLOCKC, 0003 0000 POINT, 0004 0000 BCOUNT, /CURRENT BLOCK NUMBER /BEING WRITTEN ON, /NUMBER OF BLOCKS LEFT /IN THE WORKING AREA. /POINTS TO NEXT FREE /SPACE IN BUFFER, /NUMBER OF FREE WORDS /LEFT IN BUFFER, / / / THIS IS THE BOOTSTRAP TO RESTART DIAL, / 0015 0016 0017 0643 0701 7300 DIAL, »15 LDF RCG 7300 3 /SET DATA FIELD TO 3 /READ IN DIAL /8 BLOCKS FROM BLOCK 300 / / / DIAL WILL START HERE, / »20 LDA 0020 0021 0022 0023 0024 0025 0026 1020 0020 0004 0061 0367 0062 7676 START, SET I 0027 0030 0031 0032 6056 0460 6042 0500 LOOP, JMP INLOOP, SNS JMP I 4033 6031 0034 0035 6030 0500 I 20 ESF SET BLOCKN I WKAREA=1 BLOCKC =WKSIZE=1 RESET DUMP /I-O PRESET CODE /DO I-O PRESET /INITIALIZE POINTER /TO WORKING AREA=1 /SET COUNTER TO WORKING /AREA SlZE+1 TO ALLOW /FOR RESET /START OF A NEW BLOCK NOT UP? /SENSE SWITCH DUMP BUFFER /IT IS UP. lOB PMODE KSF LHODE JMP /DO PDP-8 lOT /IS A CHARACTER READY? INLOOP /NO CHAR THERE, /CHAR THERE lOB PMODE C-13 WAIT 0072 0073 0074 0075 0076 0077 0100 0101 0102 0103 0104 0105 0106 0107 0110 0111 0112 0113 0114 0115 0116 0117 0120 0121 0122 0123 0124 0125 0126 0127 0130 0131 0132 0133 <1036 6036 0037 0040 0041 0042 0043 0044 0045 0046 1063 0224 6030 1000 0001 1560 7000 i620 4047 1000 0050 4052 KRB LMOOE STA I POINT XSK I BCOUNT JMP INLOOP LDA BLOCKN BCL 5777 BSE PMODE BUFFER + 400S300li LMODE STC ,*2 0051 0052 0053 0054 0055 0714 0000 0440 6027 6015 WRC 0000 SNS JMP JMP LOOP DIAL /GET BLOCKN NUMBER AND PLACE /IN WRITE INSTRUCTION /WRITE OUT ON UNIT 1 /BLOCK NUMBER GOES HERE /SENSE SWITCH UP? /GO BACK AND GET SOME MORE /YES, LOAD IN DIAL. XSK SET BLOCKN POINT /INCREMENT BLOCK NUMBER /SET BUFFER POINTER 'bcount /SET BUFFER WORD COUNTER NOW /400 0CTAL=256 DECIMAL /TOO MUCH DATA? /NO, RETURN DUMP, I I /READ IN THE CHAR /PLACE IN BUFFER /BUFFER FULL? GET ANOTHER WORD. /NO. /YES. WRITE OUT BUFFER /ONLY 9 BITS OF INTEREST /AND WITH 777 /SET CORRECT FIELD BITS /FOR 12 BIT CALCULATION /SETS CORRECT BITS ON / / 0056 0057 0060 0061 0062 0063 0064 0065 0066 0067 0070 0134 0135 0136 0137 0140 0141 0142 0143 0144 0000 ERRORS BCOUNT 4004 BLOCKC 4002 BLOCKN 4001 BUFFER 4400 4015 DIAL 4042 DUMP INLOOP 4030 4027 LOOP POINT 4003 RESET 4056 START 4020 WKAREA 0370 mSliZ 0100 0221 0063 4377 0064 7377 0222 6000 1020 7777 0000 6065 RESET, BUFFER-1 SET I = 400 XSK I JMP LOA I 7777 HLT JMP BLOCKC WKSIZE=100 WKAREA=370 BUFFER=4400 C-14 /YES. /ONLY A HALT WITH 7777 IN AC RESTART PERMITTED NOW /WORKING AREA SIZE IS /100 BLOCKS /WORKING AREA STARTS FROM /BLOCK 370 /TAPE BUFFER AREA Appendix D I/O Routines for DIAL-MS D . 1 CALLl N G THE ROUTI NES DIAL-MS provides a set of ready-to-go READ, WRITE, or MOVE I/O routines on tape that may be called to perform block transfers on LINCtape or disks, thus eliminating the need to write or assemble these routines. and may be loaded into locations 7000 through The DIAL-MS routines occupy blocks 322 and 323 of LINCtape 77T7 of any field, A typical sequence to load the routines into locations 7000-7777 of field 1 follows. As will be explained later, placing the routines in field 1 has a definite advontage over any other field. LDF 7 RDC 6\322 RDC 7\323 Each of the three DIAL-MS routines, READ, WRITE, and MOVE, are called in PDP-8 mode and in the same manner. A typical call is: /CURRENT IF /SUBROUTINE CDF N CIF M JMS ROUTINE ARGUMENTS The CDF instruction sets the data field to the present instruction field so the routines will know where to return. (If the data field is already set to the instruction field, this statement is not needed.) struction sets the instruction field to the field of the routines. calling programming, this statement may be removed.) (If the The JMS (or D.2 READ and WRITE The READ and WRITE routines are called in the same manner, as: JMS READ POINTER /RETURN IS HERE. POINTER points to the following: POINTER, UNIT NO CORELOC START BLOCKS D-1 The CIF in- routines are in the same field as the JMS I) is the call UNIT * is the logical unit number of the I/O device for the READ or WRITE. CORELOC is the first location of transfer divided by 400; thus 13 refers to location 5400. START is the starting block number of the transfer. BLOCKS is the number of blocks to transfer. A program to read in eight blocks from block 30 on disk into location 2000 is as follows: LINC LMODE 7 /READ THE ROUTINES INTO SEGMENT 7 CDF ^ CIF 10 /SAVE THE CURRENT IF FOR RETURN /ROUTINES ARE IN SECOND PDP-8 FIELD LDF RDC 6\322 RDC 7\323 CLR PDP PMODE J MS I PRE AD PI HLT PI, 10 04 30 10 /UNIT NO. /CORE LOC. /TBLK /NO. BLOCKS PREAD, READ D.3 MOVE The MOVE routine transfers core locations from one area of core to another, as: J MS MOVE CDF FROMF FROML CDF TOP TOL WORDS Aeturn is here FROMF is the "from" field, FROML is the first "from" location, TOF is the "to" field, and TOL is the first WORDS is the number of words to be transferred. "to" location. The MOVE entry point is at 7200, the READ is at 7774, and WRITE is at 7775. Remember thot locations 7750 and 7751 of field Section 4.5). are the data break locations and should not be written over for o DF32 or RS08 disks (refer to If data must be read from the disk into those locations, it is odvisable to read the dota into another location and then use the MOVE routine to transfer the information to 7750 or 7751. D-2 D.4 BOOTSTRAP ROUTINE By JMPing to 7777 in field 1, the bootstrap location, DIAL-MS is restarted. The bootstrap will not function properly unless the routines are in field 1, thus the advantage of having the I/O routines in field 1 D-3 INDEX A/D Knob 3, 2-1, 2-2 DECIMAL, 3-4, 3-9 A/D Knob 7, 2-1 Disks, 1-1, 1-5, 5-2, ADD BINARY, 4-5 DISPLAY INDEX, 4-9 ADD PROGRAM, 4-8 Duplicate Tape, 5-6 C-12 Address Assignments, 3-5 ALT MODE, 1-3, 2-3, 2-4, 2-5 ASMIFx, 3-10 Editor, 1-2, 2-1 EJECT, 3-10 ASMSKP, 3-11 Error Messages (Assembler), B-1 ASSEMBLE, 4-1 Error Recovery, 1-6, ASSEMBLE and LIST, 4-1 ASSEMBLE and QUICK LIST, 4-2 5-7 EXIT, 2-1, 2-7, 4-11 Expressions, 3-5 Assembler, 1-2, 3-1 Auxiliary Mode, 5-6 FIELD, 3-8 Fields, 2-5, 3-1 Binary Input, 5-2 File Index, 1-4 Files, 1-1, 1-4 Binary Output, 5-4 Binary Programs, 1-3 Binary Working Area, 1-3, 4-5 Bootstrap Routine, D-3 Hardware Requirements, 1-1 High-Speed Reader, 5-3, 5-S Cord Reader, 5-3 Choracter Editing, 2-2 Chorocter Set, C-6, C-10 CLEAR, 2-1, 4-9 Commond Mode, 2-1 Comments, 2-5, 3-2 Illegal Characters, 3-7 Initializing PIP, 5-1 Input Buffer, 1-2, 2-6 Instructions, 2-5, 3-2, C-7 I/O Routines, D-1 Control Commands (PIP), 5-1 Copy, 5-6 Large Programs, 2-6 Current Line, 1-3 Large Section Deletion, 2-4 Deletion, 2-3 Formatting, 2-5 Legal Characters, 3-6 LINCtape, 1-1, 1-2, 5-2, 5-A Current Location Counter, 3-3 Cursor, 2-1, 2-7 Line Calls, 1-3, 2-2 Line Insertion, 2-3 INDEX (cont) Line Printer, 5-5 SAVE BINARY, 4-4 LIST, 3-9 SAVE PROGRAM, 4-8 LISTAPE, 3-8, C-2, C-4 SAVSYM, 3-11, C-2, C-4 LMODE, 3-7 SEGMNT, 3-8 LOAD BINARY, 4-5 Semicolon, 3-1 LODSYM, 3-12, C-2, C-4 Source Input, 5-2 Source Output, 5-4 Mode OpHons (PIP), 5-2 Monitor Commands, 1-2, 1-4, 1-5, 2-2, 4-1, C-1 MOVE, D-2 Source Progroms, 1-2 Source Working Area, 1-1, 1-2, 2-1, C-11 Statement Syntax, 3-1 Symbols, 3-2, 3-3, 3-4, 3-5 System Build, A-1 NOLIST, 3-9 Numbers, 3-4, 3-5, 3-6 System Initialization, A-2 System Operation, 1-2 System Startup, A-3 OCTAL, 3-4, 3-9 Operands, 3-2 Operators, 3-1, C-10 Overlapped I/O, 2-6 Tabs, 2-5 Tags, 2-5, 3-1 Tape Allocation, C-1 TEXT, 3-9 PAGE, 3-8 Text Mode, 1-2, 2-1 PIP, 1-2, 5-1 PMODE, 3-7 PRINT INDEX, 4-10 Unit Numbers, 1-5 User's Monitor Command, 4-11 PRINT SOURCE, 4-11 Pseudo-Operators, 3-7, C-2 Punch Zeros, 5-5 Radix, 3-4 READ, D-1 RUBOUT, 2-2 WRITE, D-1 ZERO, 4-7 HOW TO OBTAIN SOFTWARE INFORMATION Announcements for new and revised software, as well as programming notes, software problems, and documentation corrections are published by Software Information Service in the following newsletters. Digital Software News for the PDP-8 Family Digital Software News for the PDP-9/I5 Family PDP-6/PDP-10 Software Bulletin These newsletters contain information applicable to software available from Digital's Program Library. Please complete the card below to place your name on the newsletter mailing list. Questions or problems concerning DEC Software should be reported to the Software Specialist at your nearest DEC regional with or district sales office. In cases where no Software Specialist is available, please send a Software Trouble Report form details of the problem to: Software Information Service Digital Equipment Corporation 146 Main Street, Bldg. 3-5 Maynard, Massachusetts 01754 These forms, which are available without charge from the Program Library, should be fully filled out and accompanied by be sent teletype output as well as listings or tapes of the user program to facilitate a complete investigation. An answer will to the individual and appropriate topics of general interest will be printed in the newsletter. New and revised software and manuals, Software Trouble Report forms, and cumulative Software Manual Updates are available from the Program Library. When ordering, include the document number and a brief description of the program or manual requested. Revisions of programs and documents will be announced in the newsletters and a price list will be included twice yearly. Direct all inquiries and requests to: Program Library Digital Equipment Corporation 146 Main Street, Bldg. 3-5 Maynard, Massachusetts 01754 Digital Equipment Computer Users Society (DECUS) maintains a user Library and publishes a catalog of programs as well as write to: the DECUSCOPE magazine for its members and non-members who request it. For further information please DECUS Digital Equipment Corporation 146 Main Street Maynard, Massachusetts 01754 Send Digital's software newsletters to: Name Company Name Address (zip code) My computer is a PDP-8/I LINC-8 PDP-9 PDP-10 My system serial number is. D D D D PDP-8/L PDP-12 PDP-15 Other (if D D D D known) .Please specify Fold Here Do Not Tear - Fold Here and Staple FIRST CLASS PERMIT NO. 33 MAYNARD, MASS. BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATES Postage will be paid by: Digital Equipment Corporation Software Information Services 146 Main Street, Bldg. 3-5 Maynard, Massachusetts 01754 LAP6-DIAL Programmers Reference Manual READER'S COMMENTS DEC-12-SE2D-D Digital Equipment Corporation maintains a continuous effort to improve the quality and usefulness of its publications. To do this effectively we need user feedback - your critical evaluation of this manual. Please comment on this manual's completeness, accuracy, organization, usability, and readability. Did you find errors in this manual? How can this manual be improved? DEC also strives to keep its customers informed of current DEC software and publications. Thus, the following periodically distributed publications are available upon request. Please check the appropriate boxes for a current issue of the publication(s) desired. [~| I I [~| Software Manual Update, a quarterly collection of revisions to current software manuals. User's Bookshelf, a bibliography of current software manuals. Program Library Price List, a list of currently available software programs and manuals. Please describe your position. Name Organization ^ Street City State Department Zip or Country Fold Here Do Not Tear - Fold Here and Staple • FIRST (CLASS PERMn NO. 33 MAYNARD, MASS. BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATES Postage will be paid by: Digital Equipment Corporation Software Information Services 146 Main Street, Bldg. 3-5 Maynard, Massachusetts 01754 Digital Equipment Corporation IVIaynard, IVIassachusetts printed in U.S.A.
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies