Digital PDFs
Documents
Guest
Register
Log In
DEC-12-ADRMA-A-D
December 2000
92 pages
Original
7.3MB
view
download
Document:
dec-12-adrma-a-d
Order Number:
DEC-12-ADRMA-A-D
Revision:
Pages:
92
Original Filename:
https://svn.so-much-stuff.com/svn/trunk/pdp8/src/dec/dec-12-adrma/dec-12-adrma-a-d.pdf
OCR Text
Equipment Corporation Maynard, IVIassachusetts Digital SDSDDID PDP-12 LAP 6-DIAL PROGRAMMER'S REFERENCE MANUAL PROGRAMMER'S REFERENCE MANUAL For addiHonal copies of this document, order No. DEC-12-ADRMA-A-D from the Software Distribution Center, Digital Equipment Corporation, Maynard, Mass. 01754 " Price; DIGITAL EQUIPMENT CORPORATION • $5.00 MAYNARD, MASSACHUSETTS First Printing February 1970 Second Printing (Revised) August 1970 Third Printing May 1972 Fourth Printing (Revised) October 1972 Copyright (c) 19 72 by Digital Equipment Corporation The material in this document is for information purposes and is subject to change without notice. The following are trademarks of Digital Equipment Corporation, Maynard, Massachusetts: CDP Computer Lab Comtex DEC DECtape Dibol Digital DNC Flip Chip IDAC Indac KAIO LAB-8/e OMNIBUS OS/ PDF PHA PS/8 Quickpoint RADRSTS RSX RTM SABR Typeset Unibus 8 LAP6-DIAL IS an EdUor^ 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 Lxiboratory 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, Programming Languages 1972. iii CONTENTS Page CHAPTER 1 USING DIAL 1.1 infroducHon 1-1 1.2 System Operation 1-2 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 CHAPTER 2 THE EDITOR ! 2.1 Text and Command Mode 2-1 2.2 Using the Editor Cursor 2-1 2.3 Character Edi ti na 2-2 2.4 Line Insertion 2-3 2.5 Current Line DeleHon 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 UNGUAGE 3.1 Statement Syntax 3.1.1 Tags 3.1.2 Operators 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 3-1 3-1 3-1 V 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 SEGMNT n 3-8 3.6.4 FIELD n 3-8 3.6.5 PAGE n 3-8 3.6.6 LI STARE 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-r 3.6.11 TEXT 3-9 3.6.12 EJECT 3-10 3.6.13 AS Ml Fx n 3-10 3.6.14 ASMSKP n 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„]0 4.13 Print 4.14 Exit 4^]] 4.15 User's Monitor Command 4-] ] Source 4»]1 CHAPTER 5 PERIPHERAL INTERCHANGE PROGRAM (PIP) 5.1 Initializing PIP 5.] 5.2 Control Commands 5.] 5.3 Mode 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.2 System Build for DIAL-MS A-] A. 3 System Initialization A-2 A, 4 System Startup A-3 APPENDIX B ASSEMBLY ERROR MESSAGES B-1 APPENDIX C SUMMARIES C.I Command C.2 Pseudo-operators C-2 vii APPENDICES (ConO Page LODSYM, and LISTAPE C.2.1 Assembling Large Programs with SAVSYM, C.3 Character Set C-6 C.4 Instructions C-7 C.4.1 PDP-8 Symbols C-7 C.4. LINC Symbols C-9 C.5 Operators and Special Characters C-10 C.6 LAP6-DIAL Tape Allocation during Assembly C-11 C.6.1 Allocation 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 ROUTir>IES FOR DIAL-MS D.I Calling the Routines D-1 D.2 READ and WRITE D-1 D.3 MOVE D-2 D.4 Bootstrap Routine D-3 INDEX VMI ATTENTION The LAP6-DIAL^ tapes distributed by the Digital Equipment Corporation Program Library contain two versions of DIAL: DIAL-V2, for 4K tape systems, and DIAL-MS, for 8K and larger systems, particularly those using disks. Users may decide to use one or both systems. See Appendix A.l 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 a Initialization 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. allow the user to perform the initialization automatically If the DIAL-MS tape built by unit 0, LAP6-DIAL Is referred to as DIAL In this manual Ix GENASYS will GENASYS Is on Chapter 1 Using DIAL U INTRODUCTION DIAL provides the PDP-12 user wifh 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 de- vice interchange program facilitate file manipulation. The minimum hardware configuration for using DIAL-V2 Is o PDP-12B system, composed of: a. 4096-word, 12-bit, b. TCI 2 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® 1 . 6 usee core memory Note that the DIAL character Editor is designed to be operated with an AD12 Ana log -to -Digital Converter and Multiplexer. DIAL-MS requires 8K of core memory and will support the additional hardware: 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 (800 K words) The 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. The 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 flies The source working area may be on tape or on disk (refer to Appendix C, Paragraph C.6). 2 A LINCtape cc»itams 512^^ blocks of 256 12-bit words. ®Teletype is a registered trademark of Teletype Corporation. 1-1 The DIAL area of the 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. SYSTEM OPERATION 1.2 A LINCtope 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 program 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 detailed In Chapter 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. The DIAL Assembler is implemented by three Monitor commands that provide user control of the type of listing generated. Hie 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 . SOURCE PROGRAMS 1.3 A DIAL source program is a group of lines of program input via the Telet/pe 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 (^-Ty/g) appears to the left of each line on the scope and indicates the sequential location of that line in the source. The 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 0 in Appendix C, Paragraph C.6), Only the program currently in the working area can be edited. ^ Refer to Introduction to Programming, source program input exceeds 64 blocks DEC C-18, for detailed information on computer fundamentals, such as dec ma -to -octal conversion. I If I 1-2 or 4094 lines, it can not .be assembled; the size of the source program must be reduced, or the program con be 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 1 appears as the current line number whenever the source working area has been cleared^. 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 As/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. Type ~^ J where 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. L Indicates pressing the b. Type ALT MODE and then one of the following keys: Key ^When only line positioned at line 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 and the source working area Is not clear. is 1 1 1-3 These ALT MODE key comb! nations 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 0 or line 7777. 1.7 FILES The 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 0 through 267 and 470 through 777. Binary files require a header block for pointers. Every tope 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 whiich 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 Monlt-or commands, including PIP, are summarized in this section and are treated in greoter detail in Chapters 4 and 5* transports. In this manual, a reference to tape unit 0 means the eighth channel on TU55 LINCtape Items in parentheses in the table are optional; if NAME is omitted, the user's program that was mosl" recently manipulated is used. The unit number required in DIAL commands can be between 0 and 7 in DIAL-V2 and between 0 and 17 in DIAL-MS, as follows: Device Acceptable Unit Numbers Logical Disk Units 8 LI NC tapes 0-7 0-1 RS08 disk 10-11 0-1 2RS08disks 10-13 3 RSOB 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 logical unit is the equivalent of one LINCtape, lOOOg blocks; thus, one RS08 disk of two logical disk units. unit number. areas. If is directory. A considered to be made uf 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 0 is assumed. Command AS (N,U) LI (L,L,)(N,U) Function Assemble Assemble and List QL(L, L,)(N,U) Assemble and Quick List LO (N,U) Lood Binary PS (L,)(L,)(N,U) Pnnf 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 1-5 Command (confr) Function (cont) — MC X(Y),U User's AAonlfror 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 ( Optional parameter J ) LINC or P for PDP-8) Press LINE FEED key Press RETURN key U9 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 initial 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 character 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 After starting DIAL (refer to Appendix A), a portion of the source working area is displayed on the scope. DIAL is said to be in text mode at this time. the source working area. Issuing a Clear command at this time will 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: b. Add or delete a single character Add or delete a text line c. d. Delete the current line Delete an entire portion of the display e. Add text at any location In the program a. 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/D knob 3. how many spaces back from the last character on the scope the cursor Is to be placed. has been determined by knob 3, It will of spaces from the end of the text. knob 3. 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 nofed 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. To delete a character, turn knob 3 to locate the cursor so that character is the current character, and press the RUBOUT key. 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 can 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 (press RUBOUT) after In this example, a carriage return is deleted. before (press after 2-2 RUBOUT) In the same manner, characters may 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 on the Teletype and scope The cursor moves one space to the right for each charqcter that is inserted' 1 The characters 12 are added to line . below. SCOPE ^ DSC 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. CLR JttP SETUP D5C I'Z CLR 510 CURFLG LDR I before /CURSOR DISPLRV /CLERR FLRG (type -t scnpE. 4 5> after 10 11 CLR :tmp setup DSC 12 CLR STC CURFUG LDR I --It"? JttP ENT y CURSOR DISPLRV /CLERR FLRG BliHIIill^ isSMf;'- • 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 J, £ CLR DSC IZ CLR 310 CURFLG J MP 3 4 liiiiflliHiiB BilSiiiiiilillili^ I LC.'iH liiliiiilili^^ A £U1 Blililiilillfflii iiiiiiiiiiiiiiliis? 11 liiillliiiiiH DISPLRV /CL.ERR FLRG /CLJIRSDR ililiilllSiiiiS ^Siili (type ALTMODE SB:- and D) ::i.!r;:>riR :;:LERR e:ii 5plrv F-LFIQ illi - .1 : ;. Any line of the source program may be displayed as the current line. The two ways to call the current line described in Section 1 rent line when the call 2.6 Both require the cursor to be the first character on a new cur- .6 are used with the Editor. issued. is LARGE SECTION DELETION To delete a large section of the displayed text, the Editor can eliminate all of the displayed text to the right or left of the cursor. By making the current character the last character of a string of text to be deleted to the left of that character and then typing the keys ALTMODE and L, the current character and all the characters to its left on the preceding lines visible on the display are deleted. lines through 4 are deleted. 1 In the following example, all characters on I I' I-..'. ijy.c J..;;: l"l 1 ;;.i;[]r'E: before : lismimmmB, ' .1 M i. i o 1. I-' r.l.lRr I...'"; t i- 1 1 .nil' /CUR 5 OP DX^PLRV /c-i...I;;.i-;r lmg i- :i: 1 IIBIIIIIIIBIIII^ NT .11 (type SIC i:::LIRF~LG TMP e;;nt .•CLETRR FLRG ALTMODE and L) To delete a large section of code that can not be displayed on the scope all at once use the following procedure: 1 . Turn knob 3 all the way to the right. 2. Turn knob 7 all the way to the right. 3. Type a line call so that the last line of code to be deleted is the current line. 4. Type ALTMODE and L as many times as needed until the first line of the section of code to be deleted appears on the scope. 5. Type ALTMODE and D as needed to delete text current line by current line through the first line of code to be deleted. 2-4 Typing the keys ALTMODE and R performs a delete-right operation, removing the current character and all the characters to Its right on succeeding lines of the display. The remaining text is redisplayed, and enough pre- ceding lines are added above them on the display to satisfy the knob 7 displayed line number requirement. In the following example, two and a half lines are deleted from the right of the cursor. (Remember that TAB and carriage RETURN count as one character each .) CU' -1 ,1 |"j i- ' ; 4 \ 1 \\ ' i ! i ;;;; C\.,\ 3"\f before :^ L-i.Ji-;;!-- LGliWi /CURSOR D3:SPL yCLERR ELF^G L.i::fi: -If; n i"ir ' 11 "f Wili: (type ALTMODE and R) ii after 2.7 3 4 SCDPE:. CLR 7MP SETUP DSC IZ CLR li STC CURFLG /CURSOR DXSPLRV /CLCflR FLHG CURRENT LINE FORMATTING When a new line Is typed as the current line of the displayed text, it is automatically formatted by the Editor. Each text line Is considered to be composed of three fields; each field In a line has a number of displayable spaces designated to It by DIAL. Of the 40 spaces available, the first 8 spaces are provided for the tag field, the next 16 for the Instruction field, and the lost 16 for the comment field, as follows: A horizontal tab takes eight scope spaces, thus permitting five tabs per line. When a new line is encountered, the first characters are displayed in the Instruction field, unless the first character is a slash. If a comma is then typed, the preceding characters are moved to the tag field, and subsequent Input is displayed, starting at the Instruction field. This operation is demonstrated with the Input line SCOPE, SCOPE during after If a slash is DSC 12. SCOPE, DSC 12 encountered as any character but the first one on a line. It is positioned In the comment field along with the characters typed after it and before a carriage RETURN. displayed In the tag field. If a slash is the first character of a line. Consider the user Input on the following page. 2-5 It is Displayed In Field Comments P /L /L /L P/L P^/L P Instruction Tag Keys Typed TAF^ /L P> /L H /L 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. HANDLING LARGE PROGRAMS 2.8 The DIAL Editor con handle texf 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 a LODSYM, and LISTAPE (Refer to Appendix C.2). 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 L deletion procedure (refer to Section 2.6) to re- move one block from the program. (The LINCtape on unit 0 will move or the disk lights will blink when this has been accomplished.) Use the EXIT command (refer to Section 2.10), and 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 de- leting 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 tope operation, the Editor will indicate this to the user by not echoing the characters on the Teletype. DIAL-AAS 2-6 does not provide fhrs 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 2. 10 I/O is noticeable, USE OF EXIT COMMAND At the conclusion of each editing session, an EXIT command (—-EX^ ) 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.11 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 back when four more characters before TAD (AG, T) have been added. 20 JL during TAGTAD after TAG, TAD 20 20 2-7 Chapter 3 Assembly Language The 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 DIAL syntax and semantics acceptable to the Assembler. Refer to Introduction to Pro- gramming, DEC C-18, for more detailed information on programming techniques, 3 J 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 temiinated 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 ore 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 Tags A tag is the symbolic name 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 and is terminated by a comma. (refer to Appendix C, Paragraph A mnemonic machine instruction 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 operand 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 prc^ram*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 case, interpretation of operands in a statement depends on the statement operator. Operands are terminated by a carriage return, semicolon, or slash. 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 pjermanent 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) Tbe 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 fhe firsf 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 Def ned LMODE 10 blts^ 12 bits after PMODE 12 bits 12 bits i (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 data word in the program may be so tagged. For example: TAG, CLR JMP A STC B A, The symbol TAG is assigned a value of 0100; the symbol B, a value of 0102; and the symbol A, If o 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 may also be used to give a new symbol the same value as a previ ously 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 GAMMA-BETA The new symbol, GAMMA, is entered Into the user's symbol table with the value value assigned to a symbol may be changed. 17, The The statement 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 are used to assign values so that symbols can be conveniently used in other 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 the statement and must be immediately followed by a comma. If the symbol is redefined later, the illegal definition error message is printed. If a b. 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 a 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. c. 3.3 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. 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 interpre*'ed 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. Plus !'s complement addition (modulo 1024) after an Minus LMODE pseudo-op. 2*s complement subtraction (mod- ulo 4096) after a PMODE pseudo- op. Ts complement subtraction (modulo 1024) after an LMODE pseudo- op. Boolean inclusive OR (union). E^sc tarnation Mark & Boolean AND (intersection). Ampersand Space Inclusive OR when used to sepa- rate 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 A!B A&B PDP-8 0002 0003 0005 7777 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^) always has a value equal to the value of the CLC. It may be used as any in- teger or symbol (except to the left of an equal sign). The 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.! Lega I C haracters 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 I—I 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) J 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 I Terminates coding statement (will not terminate com- ment) * 3.5.2 Asterisk Sets CLC; redefines origin Dot Has value equal to CLC \ Backslash X\Y = lOOOg X+Y (X must be a single octal digit.) / Slash Indicates start of comment & Ampersand Combines symbols or numbers (AND) t'wrr^«^ tocatioK (^oisyyier 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 LAAODE 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 SEGMNTn (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 i024g word segments, generally Used when in LMODE. For example: SEGMNT 2 sets CLC to location 4000g SEGMNT sets CLC to location 2000g I Without an argument, the CLC is reset to the first location of the succeeding segment. CLC = •+1777 & 6000; more than 1 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, 0 or 1 . If the field is not specified, 0 is assumed as the initial condition. 3.6.5 PAGE n {0<n<40J 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 LISTAPEn (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 taken as a unit number (0-17), If the 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 are six console Sense Switches are all set to encountered by the Assembler after LISTAPE is encountered in pass 1 block 0. is 1 before an assembly, any output 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 ! , any assembly error messages 3-8 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. ^'^v^ce^ neyt tl^^ ^snr^ scy^ei^u)! hcj^'c^l usrAPe 4),^ ^^vf disk wf// Pis^aQQ-op be hjoJ U pi^^imA /f vwss siwaje refn^^jUJ be-^ to tke cx 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, a delimiting character, a string of text, and the same delimiting character. For example: 3-9 If this example is at location 0200, the listing is as follows: 200 2324 201 2211 202 203 204 205 206 4017 0640 2405 3024 1607 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 o Any legal character may be used as a delimiting character carriage . The Assembler will print out all the code, then print the entire line after it when a 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 Pseudo-op Meaning ASMIFZ n Assemble if zero ASMIFN n Assemble if nonzero ASMIFM n Assemble if minus case the expression is evoluted, 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 (discus- sed 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, if no expression is present, the next statement will be assembled. If an attempt is made to go past the end of a manuscript with one of these pseudo-ops, no error results; 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 MIO 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 = 1 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 v/ant 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 are 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 Monlfor commands are discussed In this chapfer. 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 Ime, 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 0 or 4.1 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) The AAonitor command AS performs on assembly of the NAMEd source file on the specified UNIT. is given, If no NAME the source program in the working area on unit 0 is assembled. With the command AS an assembly listing is not produced^ but error messages with line numbers and a tag table are printed. (See Appendix B for the Assembly Error Messages.) 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 tape 1 For all if no disks are present or on disk 1 (unit 1 1) if disks are in the configuration. DIAL programs, 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 --^Ll (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) The LIST command performs the same functions as the AS command, but, In addition, produces an octal- symbolic listing on the Assembler output device. It will assemble and list from the working area if no program NAME and UNIT are specified. In D1AL-V2, the value of UNIT can only be 0 or command, AS, the binary working area on tape unit 1 Is 4-1 1 . As with the ASSEMBLE used for the binary output and tag table. If two 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 lines list only that part between 140 and 160 of the source working area, type 140,160^ LI ope *'i*^^0\-^ List e^^ou^i^ter^i. ^ w /n'v, t VeV <?<-c*"<^ i ^<rjt To assemble and list lines 300 to 310 of file MART on unit 1 , the correct command is -^Ll If 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 2, )(NAME, UNIT) LINE NUMBER 1 j = 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 0 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 com- mand and one generated by a QUICK LIST command. 4-2 This HsHng was produced by a LIST command. Octal Number Mnemonic Code Location *20 0000 0001 PMODE /START IN PDP--8 MODE 0002 0003 0004 0005 0006 UUU/ 0010 LINEP=0 /NO EJECTS ASMIFN LINEP /EJECT? EJECT /YES. KCC /CLEAR KEYBOARD FLAG /SET TELETYPE FLAG oon 0012 0013 0014 0015 0016 0017 4020 4021 6032 START, 6046 TLS, PC /V\ AAI r PKI AA AJ 1 4022 4023 4024 4025 4026 4027 4030 6031 LOOP, J 6041 TSF 5225 6046 5222 JMP 0000 *20 0001 PMODE / 0002 0003 0004 4020 ASMiFN LINEP / EJECT / START, KCC / 4Q2] line 0007 0010 4022 4023 4024 4025 4026 4027 number core locations LINEP=0 / 6032 6046 6031 5222 6036 6041 _4030 0000 ERRORS LINEP 0000 4022 4020 START / ASMIFN LINEP / 5225 6046 5222 LOOP TLS • -1 EJECT / LOOP, KSF / JMP .-1 / KRB / TSF / JMP .-1 / TLS / JMP LOOP / 4-3 1 r /CHAR. TYPED? /NO. WAIT /YES. READ IT IN. /TELEPRINTER READY? /NO. WAIT /YES. OUTPUT THE CHAR TLS JMP / CJcL. /GO TO TOP OF PAGE, KRB was produced by a QUICK LIST commond. locations LI INCr MP 5222 6036 LINEP 0000 LOOP 4022 START 4020 numbers 1 EJECT KSF 0000 ERRORS Tliis listing Comment LOOP /GO GET ANOTHER CHAR. 4.4 SAVE BINARY -^SB NAME^UNlT(,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 thot 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 MODE must be specified. LINC mode when loaded, the unit number is followed by an L, If fhe program RETURN. If fhe program is to be started elsewhere, a full 5~digit address must be specified. The Data Field is always set to three when the program is started. If the program is to be started in 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 holt to location 7774 after having loaded the program. For example: To save the program PGMNAM on unit 1 so it will load and start in LINC mode at location 04020 -*SB PGMNAM, 1,Lj To save the program PGMNAM on unit 0 so it will load and start in LINC mode at location 4020 of field 1 (location 20, segment 6) ^SB PGMNAM,0,LI4020j To save the program PGMNAM on unit 0 so it will load and halt --^SB PGMNAM,Oj With each assembly, a binary header block is generated by the Assembler which maps the memory blocks used, Ihe SAVE and LOAD BINARY commands use the data in the header to save or load the appropriate blocks. 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)^ 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 self- starting, the program is loaded and the loader halts as above. If the NAMEd program is self-storting, 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 0 and locations 7600-7777 of field the starting segment for self-starting 4.6 1 . For both versions of DIAL, location 0 of LMODE programs is destroyed by the loader. ADD BINARY (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 NAME may be found (0-17) unit on which file The binary file is copied to the binary working area, omitting zeroes. Typically, 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, and 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^ ^ AS^ — AB QANDA,0^ 4-5 By oddfng QANDA In binary form, rafher than source form with fhe ADD PROGRAM command, the user has saved considerable assembly time and avoided the possibility of tag duplications between his progrom and QANDA. If his program also needs FPP, for example, it can be added by the command -*AB FPP,0^ 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: --^ ZERO — AB *X /X IS THE FIRST LOCATION TO PATCH /INSTRUCTIONS OF PATCH GO HERE • LISTAPE -1 /PRESERVE HEADER -^AS -^SB PROGRAM, 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), if will be moved to its assembled address. ADDRESS IS specified and FIELD Is nof. It will be moved to ADDRESS in field 0. FIELD can not be specified without ADDRESS. No address adjustment within fhe 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 file. The relocation of the binary is equal to [(FIELD*10000 + ADDRESS) - ^RO"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 0 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 The ADD BINARY facility allows the user to build large sophisticated programs (binary) at execution time. from the results of many small assemblies and standard subroutine packages. This means that bugs con 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, SUB! 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 SUBl, 0 SB SUB1,0 ZERO AS SUB2,0 SB SUB2,0 AB SUB1,0 -^ AB 7000, QANDA, AB FPP, 1 1 LISTAPE-1 ^ AS — LO If a /PRESERVE BIT MAP 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 map, guaranteeing 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, filling flierefore, filling the binary working area with zeroes Is equivalent to unused core locations with HLT. Thus, a program being tested halts If It jumps to an unused location. 4-7 b. The paper tape outpul- 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 resulting tape only as long as the patch, c. The ADD BINARY command depends on the use of the ZERO command In two instances: (1) (2) Before assembling a program to be saved and later added. 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. This 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 progrom 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 4.9 SP PETE, 12^ ADD PROGRAM -^AP BN,UNIT^ -^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 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 its Tlie 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, source will be the entire source. If the added the arguments are omitted, the command is ignored. Lines 15 through 361 of the source file EXP6 on unit 4 are added to the current source by the command -*AP 15,361, EXP6,4^ 4.10 CLEAR -cl; The source working area on tape unit 0 can be cleared by using the command CL. DIAL remains in core and is restarted with a clean buffer area, -^CL may be typed at any time to dear 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 (:) after erasing the desired entries. TTie is no index or an empty index, NO is key 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 BLK5 BN PDRS VS 5 B NLORD MRR PRTCIS-F > R Delete the binary file. A, by typing RUBOUT, 205 1&4 5 2 B 202 1-3 J. B 17 7 S <i:4 -1 2 2 B 12<j: B 175 :t2 Move the display forward to view the rest of the index by typing NOME 1. :t BLKS BN 2 B PRl C IZ-F mmitlM WIS'''' CLRR S ^:42 B 12^ 5 nil ^ B JlflllliB To delete the source file EXAMl, type ; :III^^^Bl .^5 12 S EXRMl H fl S ^ « 727 745 525 X7 jHBHB^^^I 5 W twice so that it is the last entry on the display. Then type RUBOUT. Make this deletion permanent by typing colon. 4.12 PRINT INDEX -^PXCUNIT)J UNIT = unit of index to be printed The 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 ^PXJlj The index printed is SOURCE NAME FORSYS BINLOAD MAR PRTC12-F CLARK A31J BLKS BN BN BLKS 16 205 1 154 201 1 202 3 177 126 2 12 525 3 6A2 6 65 6A 727 16 174 1 EXAMl MASON BINARY 4-10 4J3 PRINT SOURCE — PS (LNl,)(LN2,)(NAME,UNIT)j NAME = name of file to be printed 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 working area is printed when no NAME and/or UNIT are designated. portion of the If UNIT. Ihe source currently in the 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.l,lj 4.14 EXIT The EXIT command completes the updating of the source working the user of leaving area from the memory buffers, thus assuring DIAL without losing the current source program in the working area. An EXIT command should be Issued when edifing is completed with the PDP-12. After — EX J , DIAL halts. Press the CONTinue console switch to return to DIAL. Ihe program that was In the working area when the EXIT command Issued is still there, and any legal was DIAL operation can now be performed. 4.15 USER'S MONITOR COMMAND --^MC X(Y),UNITJ X(Y) = argument(s) to be passed by the Editor to a user program via optional ) UNIT = unit to be read 4-11 the AC (argument Y is 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 ore 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. Except for the MC command LMODE, (Refer to Appendix C, 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, ^1^2 ^3^4' ^^^^ fined in DIAL, they can be defined in the free area and called via the Editor by: -«-MC X^X2,U^ -MC X^X^^Uj Then, depending upon the contents of the AC, the program loaded from block 270 would either do the function or Xj^^' 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,[Jj 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. 5J INITIALIZING PIP (DIAL-MS) Ihe command for calling PIP,-- Pl^ , running without an RS08 or RK08 disk, with RS08 or RK08 systems, To Implement the P\J it is loads PIP from the system unit; for DIAL-V2 users or DIAL-MS users p\j equivalent to the command equivalent to-^LO PIP, 10^ LO PIP,0; for DIAL-MS users . command call on a system using DIAL-MS with an RS08 or RK08 disk, PIP must be copied onto unit 10 after Initialization (refer to Appendix A, Paragraph A. 3). If a. Typing-*LO PIP,Oj b. Responding to the PIP displays with Aj just PIP Is to Copy tape 0 to disk unit 10 by . , , LOj , ROj , in that order. be copied to the system device, respond to the PIP displays with Bj , LO;PIPj , RO;PIP^ , that order. Note that when using PIP, disk units may be called as 0 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 DIAL CTRL/U Rewind each transport that is set to REMOTE and has a tape on It and position unit 0 at block 0. Repeated typing of CTRL/U will cause tape 0 to be unloaded also. This option is used to minimize tape handling for all units and to decrease duplication time for unit 0. CTRL/T Rewind all LINCtapes completely (as with CTRL/U) and position tape 0 to block 300 to permit a faster restart. DIAL-MS Typing CTRL/T several times will unload unit 0. 5-1 in 5.3 MODE OPTIONS When PIP IS sfarted, the following message is displayed. Note that lower-case letters are used in this chapter 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 a response is typed, it is and a square-shaped cursor in fhe lower seen at the location indicated by fhe 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 con 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 8 or S, the second display Is shown as follows: INPUT DEVICE c card reader h high speed reader I line tape r rs08,rk08 disk t teletype reply: The auxiliary mode option is described in Section 5.6. If LI NC tape 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, from LINCtape unit 4, the correct command Is L4;ABC3. 5-2 to input a file named ABC3 a card reader is to be the input device, type C after having chosen source mode. Columns 1-1 10^ are read (f 8 unless a response is given in the form Caa;THRU,bb, where aa is the first column to be read and bb is the last column to be read. To read columns 50 through 110 (octal), the correct reply string is C50;THRUJ10. Ihe character codes used ore not the card reader codes in the PDP~12 User's Handbook. Instead, they are the standard {BM~029 Keypunch codes (See Appendix B of Introduction to Programming, DEC-C-18). There are some minor changes in that set to be compatible v/ith standard ASCII. Card Code 0-8-2 029 Character DIAL Character NONE ] 0-8-5 (underscore) n-8-7 - (Logical not) \ (Cent Sign) [ (Vertical Bar) f 12-8-2 12-8-7 {|: I the user desires, he may substitute an entirely different character set into PIP (with the exception of BLANK). If Refer to the PIP Internal Description, If, DEC-1 2-ZW2A-D. for binary Input, the device Is to be the high-speed reader or the Teletype (neither is file or unit oriented), 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 1 or larger. P for PDP-8 mode, and Address Is the starting address. If Mode is indicated by L for 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). Ihe punctuation marks are always required If the Items after them are specified. location 4020, and a If no Address is given, a LINC mode operation starts at 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 the following examples, H;P Input" is from the high-speed reader and the program, will be started in when loaded, PDP~8 mode at location 200 when loaded, field 1 in at location memory mode 1000 will be started in PDP-8 Input is from the high-speed reader and the program, H1;P, 1000 Input is from the Teletype and the program, when loaded, will start T;L,6000 in LINC mode at location 6000. Input is from the high-speed reader and the program, H 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 Ifnc tape p r t — — line printer rs08, rkOS disk 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 UNCtape or disk (DIAL-MS) as the input or output device for these PIP operations, be sure to pacify 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 and the name ? or no name. ?. If If the file name is omitl-ed 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 0 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 CTRt/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 REPLACE? is displayed. Type R^ if the present file is 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 zeros are not punched. is It is specified by the reply chosen as the output device, an option may be used so that T;DZ or H;DZ to the output device display. Note that the tape 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. Ihe initial ZERO command causes all locations to contain zeros and therefore are not punched by the H;DZ statement. ZERO SEGMNT 1 *100 1 2 3 AS SBScw,n PIP B Rn;SCW H;DZ 5-5 If the input device was the paper-tape reader, then after the first tape has been read in, the following display appears on the scope • MORE TAPES? a read another tape n- no more tapes reply: Type the appropriate letter answer and a carriage RETURN. A reply of A will store the next file immediately after the first one. Each 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 0 onto s copy system copy unit u 1^ / / ± t r iC L tLfsM^ U^^^ hl,^hu i f- 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 that operation immediately. A response of C, S, or U will produce the second PIP display requesHng 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 tinue for 24 blocks. LINCtape un»^ 2, block 63, and con- 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 all PIP operations, the program checks for errors. When one is encountered, fhe 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 example, the WRITE ENABLE switch was not set, then choice R can be used. If some of the block numbers have been 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 mis- positioned. PIP will automatically recalibrate the disk and try again. If should be serviced. Note that if this message appears during startup, it is this message arises often, the disk 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 keyo 5.8 If RECOVERY the Input for a PIP operation is binary paper tape and output is fo 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 command after typing CTRL/D no disk or a DF32 disk Is present AP370, 1^ if AP370, 1 ]j if on or RS08 or RK08 disk is present 5-7 9 PIP EXAMPLES e following command sequences are examples of PIP operations. 1 . Copy the binary file BINFILE from unit 0 to unit 6. B LO; BINFILE L6;BINFILE 2. Copy the source file HOW from unit 3 to unit 7. S L3;HOW L7;HOW 3. Copy the binary file OLDNAME from unit 1 to unit 7 and call it NEWNAME. B L1;OLDNAME L7; 4. NEWNAME Read in a binary tape via the high speed reader, and store it as file JIO on unit 0, where it will start at location 200 in PMODE. B H;P L0;J10 5. Duplicate the source file COPYl on unit 2, and call it COPY2 on the same unit. S L2;COPYl L2;COPY2 NOTE: Never copy a file onto itself on the same unit. For example; B Ll;COPYl LhCOPYl This sequence could result In the destruction of the file COPYl. 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, and store it as file MARTY on tape unit 0. S T LO;MARTY When the tape is finished, type CTRl/Z on the Teletype (if PIP had 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 tape is to be read and added after the first tape. Duplicate tape 0 onto tape 1 A D 9. Duplicate tape 0 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 1 1 . 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 0 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. DrAL-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: 0. 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 area (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 to initialize the tape. If the reply is 0, another message is printed on the Teletype after not 0, 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 mlHalizes DIAL-MS. When that is done, the Editor Type—EX^ and then press CONTinue. DIAL-MS is ready to accept user Aff-er 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 D!AL-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: a. the initial tape to modify itself to become a startup tape by building a set of I/O routines for handling the user's particular disk configuration, b. the initialization routine to copy the DIAL-MS system area (blocks 270 to 345 and 350 to 467) from tape 0 into the appropriate area on the disk. System initialization may be automatically carried out by GENASYS (by a reply of 0 in Step 4) or may be performed when the equipment configuration changes, if the contents of the disk are lost for any reason, or GENASYS does not perform the procedure, e.g., because a tape unit other than 0 was specified in Step 4. The procedure is Step 1 2 Procedure Mount the DIAL-MS tape on tape unit 0. AAount another LINCtape on tape unit 1 (required if configuration has no disk or only one DF32 disk). & 2. 3 Set the scope chonnel knob to position 4 Set the switches of both tape units to REMOTE ond set unit 0 to WRITE ENABLE. 5 Set all disk units to WRITE ENABLE. 1 A single DF32 disk unit must be set to 0. A second DF32, if present, must be set to 1 6 Set the mode switch to LINC mode and press the I/O PRESET key. A-2 Procedure Step 7 Set the Left Switches to 0701 and the Right Switches to 7310 by pushing down the and pushing down the bock part of those front part of the switches indicated by t indicated by | in the following diagram, ttt iii ttt tti ill tii ttntt Right Switches Left Switches DO key. 8 Press the 9 When the tape has stopped spinning^ press the START 20 key, 10 Type—^EX^ 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 Edi tor's pointers. 1 1 Set the A/D knob 3 all the way to the right, 12 If A DIAL command may 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 and disk have been Initialized (refer to Section A, 3) so that the DIAL-MS system loaded from tope Is aware of available disks and will use them appropriately. Procedure Step 1 A/bunt DIAL tape on tape unit Oc 2 Mount another LINCtape (scratch) on unit 1, 3 Set scope channel knob to position 4 Set the switches of both tape units to 5 Set all disk units to WRITE if present, 6 7 & 2. 1 REMOTE and WRITE ENABLE. ENABLE, 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 and the Right Switches to 7300 by pushing down the front part of the switches Indicated by by f In the | and pushing down the back part of those indicated following diagram. ttt iU tu ttt ttt iU ttt tti Left Switches Right Switches 8 Press the DO key. 9 Press the START 20 key when the tape has stopped spinning. The version of DIAL on the tape is started and ready for any DIAL operation. A-3 It is possible for an error condiHon to result while initializing the system, causing the computer to halt with 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 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 7777 , the data will be accepted by the computer after pressing the CONTinue key. At the completion of this operation, the tape on unit 0 has been modified for the user's particular configuration. 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 be repeated at any time, but it is necessary only when the DIAL-MS system the disk is lost or when the configuration changes. DIAL "MS srsieMi mn/ tt Refer to PDP-12 System Reference Manual, DEC-12-SRZC-D. A-4 on Appendix B Assembly Error Messages During source program assembly, error messages in the form of a two-letter code ore included in the program listing. These messages, defining illegal syntax or insufficient space errors, are 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 reDefinlfion of a symbol - An attempt was made to give a previously defined symbol a new value by means other than the equal sign; the symbol was not redefined. IE Illegal Expansion - Delimiter missing in text. IR Illegal SE Symbol table Exceeded - Assembly is terminated and control is returned to DIAL; up to 895 user symbols, maximum. US Reference - An off --page reference was made, 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 assembly (refer to Appendix C, PS Paragraph C.2). Q /1 .1 Push -down Stack exceeded ~ Too many symbols to be evo luted on one line. ^?h«^*ii\ error B-1 Appendix C Summaries C.I COMMAND SUMMARY All commands are issued in the form Command ^ Command Function AS (N,U) Assemble (L,L,)(N,U) Li 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 Line Call / Legend: 0 ;> Indicates an optional parameter F = Field N = File name B = Tape block U - Tape (0-7) or disk (10-17) unit X(Y) = Characters in accumulator L = Line number number =LINE FEED M = Mode (L or LINC or P for PDP-8) J = Carriage RETURN A = Address (4 digits) C-1 C.2 PSEUDO-OPERATORS Pseudo-Op Mode ASMIFM n 8A 8A 8A 8A 8A 8A 8A ASMIFN n ASMIFZ n ASMSKP n DECIMAL EJECT FIELD n 1 LIST LI ^ TAPE NOLIST OCTAL PAGE n Operation Assemble if n is negative Assemble if n ^ 0 Assemble if n = 0 Continue Assembly after n lines Set decimal radix for integer input Print next line at top of next page of line printer Defines each 4K of memory; n = 0 or 1 8 Indirect addressing 8A 8A Negate NOLIST condition neaaer diock ana AssemDier listing control o o Causes subsequent coding fo be Interpreted as LINC instructions 8/L O/L Looa savea symooi tape vsee oeiow^ 8A 8A 8A 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<n<40J — o 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 NX2000. If no parameter start at next segment. (0<n <7) TEXT 8A Packs two 6-bit words per cell Z 8 Page zero reference The fwo cases requiring use of the SAVSYM pseudo-op and the procedure for assembling large programs with the SAVSYM, LODSYM, and LISTAPE pseudo-ops are discussed in detail in this section. Cose 1 . Assume that the user has defined the following symbols for his program. INDEX = 346 /set the Index pointer to 346 DISK =3 /three 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 the program is assembled. Any user symbols occurring later 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 table 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 C.2.1 be permanently saved unless one of the following conditions occurs: a. The tape is erased. b. The tope is used for unit 0 workspace (source) and is overwritten. c. Another SAVSYM command is given at some later time and replaces the old symbol table with a new one 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 o 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 PROGRAM 1 SAVSYM 2 LONGER THAN 100 LODSYM 8 BLOCKS LI S TAPE -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 can be used to preserve the bit map from the assembly of PART 1. The program is then assembled by the commands AS PART 1 -AS PART 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 LODSYM 0000 SAVSYM THAN lOOg 1 + BLOCKS CLEARSYM LODSYM + LISTAPE-1 SAVSYM 2 SAVSYM PART 1 PART 2 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. PART 1 C-4 Is 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 port containing this section of code last. locations 4000-4377 are If the program was split so that m 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 I, then the correct sequence of commands is as follows: --AS CLEARSYM -«-AS PART 2 — AS PART 1 -*AS PART 2 AS PART 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 header block. Block 447, the header block, must be filled with correct Information. Each word of block 447 from word 340 to 377 represents 400g words of the file to be soved, as follows. BLOCK 447 Word Word Locations Represented 0 unused 336 total number word blocks saved 337 0 - 377 340 341 377 If 400 777 17400 - \ 7777 any of the word locations represented contain data, then the corresponding word of block 447 must contain the value 7177. If those word locations ore 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 I 311 11 C D E F G Internal 1 2 3 4 5 6 7 312 313 314 315 316 317 320 J K L M N 0 P 12 13 14 15 16 17 20 Q 321 21 R 22 23 X 322 323 324 325 326 327 330 Y 331 31 Z 332 333 334 335 336 337 240 32 33 34 35 36 40 241 41 42 44 45 46 ( 242 243 244 245 246 247 250 ) 251 51 252 253 254 255 0 256 257 260 52 53 54 55 56 57 60 1 261 61 5 T U V W [ (SHIFT/K) \ (SHIFT/L 1 (SHIFT/M) — f SPACE ! " # $ % 6 * + / 24 25 26 27 30 Illegal (not displayed) Illegal (not displayed) Illegal (not displayed) 50 C-6 External Keyboard (ASCII) Infernal 2 262 263 264 265 266 267 270 62 63 64 65 66 67 70 271 71 272 273 274 275 276 277 300 212 215 375 377 72 73 74 3 4 5 6 7 8 9 : ; < > ? @ LINE FEED RETURN ALTMODE RUBOUT CONTROL/I aAB) 75 76 77 Illegal (not displayed) 37 43 (not displayed) None (not displayed) None (not displayed) 47 (not displayed) 211 C.4 INSTRUCTIONS C.4.1 PDP-8 Symbols Mnemonic AND Octal MEMORY REFERENCE INSTRUCTIONS 0000 logical AND TAD 1000 2000 3000 4000 5000 ISZ DCA MS J JMP GROUP 1 NOP 7000 7001 RAR RTR CML CMA CLL CLA 2s cott^lement add increment & skip if zero deposit & clear AC jump to subroutine jump OPERATE MICROINSTRUCTIONS lAC RAL RTL Operation 7004 7006 7010 7012 7020 7040 7100 7200 no operation increment AC AC & link left one AC & link left two rotate AC & link right one rotate AC & link right two rotate rotate complement link complement AC clear link clear AC C-7 Mnemonic Octal Operation 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 skiD on nonzero link skip on zero link skip on zero AC skiD on nonzero AC skiD on minus AC skip on plus AC (zero is positive) COMBINED OPERATE MICROINSTRUCTIONS CIA 7041 complemenf & increment AC STL 7120 7204 7240 7604 set link to OLK STA LAS 1 get link (put link in AC, bit 11) AC =-1 load AC with switch register set lOT MICROINSTRUCTIONS Program Interrupt ION OF 6001 turn interrupt on 6002 turn interrupt off K e yboard/Reade r KSF 6031 skip if keyboard/reader flag = 1 6032 6034 6036 clear AC & keyboard/reader flag clear AC & read keyboard buffer, TSF 6041 skip if teleprinter/punch flag = 1 TCF TPC 6042 6044 6046 clear teleprinter/punch flag I KCC KRS KRB read keyboard/reader buffer & clear keyboard flag Teleprinter/lPunch TLS load teleprinter/punch buffer, select & print load teleprinter/punch buffer, select & print, and clear teleprinter/punch flag Clock CLSK CLLR CLA8 CLEN CLSA CLBA CLCA 6131 6132 6133 6134 6135 6136 6137 skip on clock interrupt load clock control register 1 AC to buffer preset register load clock control register clock status to AC buffer preset register to AC counter to AC Extended Memory (Type MC8/I) CDF 62n1 CIF 62n2 62n4 6224 6244 6234 RDF RIF RMF RIB change to data field n change to instruction field n read data field into AC read instruction field into AC restore memory field read 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 SIC STA STH 4000 1040 1340 ROL N ROR N SCR N 0235 0300 0340 HLT 0000 0016 Operation 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 and clear A (full address) A (index class) store half A store store SHIFT/ROTATE rotate left N places rotate right N places scale right N places OPERATE NOP halt no operation CLR 0011 clear AC and 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 1540 1600 bit set (any combination of 12-bits) SCO 1640 bit COM 0017 BSE bit clear (any combination of 12-bits) complement (any combination of 12-bits) complement AC SKIP Skip next instruction if: SAE SHD 1440 1400 SNS N 0440+N sense switch SKP 0456 0450 unconditional skip AZE AC equals memory register, Y right half AC unequal to specified half of memory register, Y N is set AC equals 0000 or 7777 C-9 Mnemonic Octal APO 0451 AC contains positive number LZE 0452 0454 0455 add overflow is set Operation SKIP (cont) FLO QLZ SXL N KST SRO link bit equals u 0415 1500 n of Z register equals 0 external level N Is preset bit 04004-N keyboard has been struck rotate memory register right one place; then If bit 0 of Y equals 0, skip next instruction XSK STD 0200 0416 ATR RTA 0014 0015 contents of Y equal 1777; index memory register if 1 bit set tape instruction completed INPUT/OUTPUT AC to relay buffer relay buffer to AC N SAM N 0100+N sample analog channel DIS 0140 1740 0002 0516 0517 0500 display point on oscilloscope DSC PDP RSW LSW lOB 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 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 one block into memory 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 OPERATIONS ESF TAC TMA 0004 0003 0023 AXO 0001 DJR 0006 0000 0024 MSC SFA 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 * 8/L Origin - dependent on mode (LINC or PDP-8) C-10 Mode Char Operation 8A 8A 0/L Define parameters Combine symbols or numbers o /t 8A Combine symbols or numbers 8/L Has value of current location counter / 8/L Comment u L • Add lOg to instruction I f Add 20g to instruction Add 400g to instruction f 0/1 8/L Terminate coding line SPACE 8/L lOR & 8A 8A Logical 1 \ AND Logical I OR Operator x\y = lOOOgX + y where x is a single L octal digit C.6 LAP6-DIAL TAPE ALLOCATION DURING ASSEMBLY Systems Unit: 0 Scratch Unit: 1 FILE FILE FREE 267 277 INDEX 345 347 t FREE 267 277 INDEX 345 347 t LAP6-DIAL LAP6-DIAL 367 367 BINARY SOURCE WORKING AREA WORKING AREA USER SYMBOLS (4K only) CORE MEMORY MAP SAVSYM SYMBOL AREA 467 FILE 427 446 447 467 FILE 777 777 c-n C.6.1 Allocation of LAP6-DIAL Area DIAL-V2 DIAL -MS Blocks Content Same as DIAL-V2 except: 300-321 EDITOR DIOCKS Content 322-345 ASSEMBLER O lU c vc 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 Qi if 1 r\ C.6.2 DIAL-MS Disk AllocaHon Disk allocation for the available PDP-12 mass storage configurations with DIAL -MS Disk Used ^ DF32 is as follows. Contents Disk contains DIAL-MS system and source working area 2 DF32*s First 1-4 RSOS's 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 1 1 • DF32 as above; second disk contains binary working area Up to three additional units may be used, Eoch RS08 disk is equivalent LINCtapes and each may be used for storage of source and/or binary to two files, 1 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. (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. to indicate when the end of the tope 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 0 is used Once the data is written on Remember that this program is an example 0000 0001 0002 0003 0004 0005 0006 0007 0010 0011 0012 0013 0014 0015 0016 0017 0020 0021 0022 0023 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 •20 / THIS PROGRAH WILL READ IN A PAPER TAPE AND PLACE THE CONTENTS OF IT ON LINC 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 ZERO, THE DATA IS WRITTEN ONTO THE WORKING QTADTTKir AT Ql r\C*i/ tl Ol ART A nr UW IT 1 SENSE SWITCH 0 IS THE END OF INPUT SIGNAL, ir THERE IS TOO MUCH Data, the program WILL HALT HITH 7777 IN THE AC, WHEN FINISHED, THE PROGRAM WILL RESTART DIALi / / / / / / , / / / / / / / / •1 / / 0001 0000 BLOCKN, 0 0002 0000 BLOCKC, 0 0003 0000 POINT. 0 0004 0000 BCOUNT, 0 /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, 0027 0030 0031 0032 6056 0460 6042 0500 LOOP, JMP INLOOP, SNS JMP I OB 4033 6031 0034 6030 0500 00 35 I 20 ESF SET BLOCKN WKAREA-1 SET BLOCKC I I i^WKS IZE = 1 RESET I PMODE KSF LMODE JMP 0 DUMP /I-O PRESET CODE /DO I-O PRESET /INITIALIZE POINTER /TO WORKING AREA»1 /SET COUNTER TO WORKING /AREA SIZE*1 TO ALLOW /FOR RESET /START OF A NEW BLOCK /SENSE SWITCH 0 NOT UP? /IT IS UP, DUMP BUFFER /DO PQP-8 lOT /IS A CHARACTER READY? INLOOP lOB PMODE C-13 /NO CHAR THERE, /CHAR THERE WAIT 0072 0073 0074 0075 0076 0077 0100 0101 0102 0103 0104 0105 4036 6036 KR8 LMOOE 0037 0040 0041 0042 0043 0044 0045 0046 1063 0224 6030 1000 0001 1560 7000 1620 STA XSK JMP LOA 4047 0106 0107 0050 0110 0111 0051 0052 0112 0053 0113 0114 0054 0115 0055 0116 0117 0056 0120 0121 0057 0122 0060 0123 0061 0124 0062 0125 0063 0064 0126 0127 0065 0130 0066 0131 0067 0070 0132 0133 0134 0135 0136 0137 0140 0141 0142 0143 0144 0000 ERRORS BCOUNT 4004 BLOCKC 4002 8L0CKN 4001 BUFFER 4400 4015 DIAL 4042 DUMP INLOOP 4030 4027 LOOP POINT 4003 RESET 4056 START 4020 WKAREA 0370 WKSI2E 0100 1000 DUMPi /READ POINT BCOUNT INLOOP I I IN THE CHAR /PLACE IN BUFFER /BUFFER FULL? /NO, GET ANOTHER WORD. WRITE OUT BUFFER /YES, BLOCKN BCL I s777 BSE I /ONLY 9 BITS OF INTEREST /AND WITH 777 /SET CORRECT FIELD BITS PMOOE /FOR 12 BIT CALCULATION BUFFER*400&3000 /SETS CORRECT BITS ON LMODE STC /GET BLOCKN NUMBER AND PLACE /IN WRITE INSTRUCTION WRC /WRITE OUT ON UNIT 1 0000 /BLOCK NUMBER GOES HERE SNS 0 /SENSE SWITCH 0 UP? JMP LOOP /GO BACK AND GET SOME MORE JMP DIAL /YES, LOAD IN DIAL. 4052 0714 0000 0440 6027 6015 / / 0221 0063 4377 0064 7377 0222 6000 1020 7777 0000 6065 RESET, XSK SET I I BLOCKN POINT /INCREMENT BLOCK NUMBER /SET BUFFER POINTER BCOUNT w WW wH /SET BUFFER WORD COUNTER NOW /400 0CTAL=256 DECIMAL /TOO MUCH DATA? RETURN /NO, BUFFERS-•1 SET I s400 XSK JMP LOA I 7777 HLT JMP I - 1 BLOCKC 0 /YES, /ONLY A HALT WITH 7777 IN AC RESTART PERMITTED NOW / / / WKSIEE= 100 WKAREA= 370 BUFFERS 4400 / / C-14 /WORKING AREA SIZE IS /100 BLOCKS /WORKING AREA STARTS FROM /BLOCK 370 /TAPE BUFFER AREA Appendix D I/O Routines for DIAL-MS D.l CALLING THE ROUTINES DIAL-MS provides a set of ready-to-go READ, WRITE, or MOVE I/O routines on tape 0 that may be colled to perform block transfers on LINCtape or disks, thus eliminating the need to write or assemble these routines. The DIAL-MS routines occupy blocks 322 and 323 of LINCtape 0 and may be loaded into locations 7000 through 7777 of any field. A typical sequence to load the routines into locations 7000-7777 of field 1 As wilJ follows. be explained later, placing the routines In field 1 has a definite advantage over any other field. LDF 7 — - —A322 RDC - ^ ^ - 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 CIFM JMS ROUTINE ARGUMENTS - - v The CDF instruction sets the data field fo 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 GIF in- routines are in the same field as the The JMS (or JMS I) is the call D.2 READ and WRITE The READ and WRITE routines are called in the same manner, as: JMS READ POINTER AETURN IS HERE POINTER points to the following: POINTER, UNIT NO CORELOC START BLOCKS I (syjt^^ Sh-si 0# sufi-^H, ^-y^^ bhck^ ^f^rl^ 77nir -^y- r^i ' '^k-e he : XA? pi''-i^'^et^:^f rau.'^Uei 10 0' " 'i .i ' ^ i ' ^ ^ 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 storting 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 0 into location 2000 is as follows: LINC LMODE LDF 7 /ftEAD THE ROUTINES INTO SEGMENT 7 RDC 6\322 RDC 7\323 CLR PDP PMODE CDF f& CIF 10 JMS I /SAVE THE CURRENT IF FOR RETURN /ROUTINES ARE IN SECOND PDP-8 FIELD PREAD PI HLT /UNIT NO. /CORE LOC. PI, 10 04 39 /FBLK /NO. BLOCKS 10 PREAD, READ D.3 MOVE The MOVE routine transfers core locations from one area of core to another, as: JMS MOVE CDF FROMF FROML CDF TOP^ TOL WORDS /teTURN IS HERE FROMF is the "from" field, FROML is the first "from" location, TOF is the "to" field, and TOL is the first "to" location. Tlie WORDS is the number of words to be transferred. MOVE entry point is at 7200, the READ Is at 7774, and WRITE is at 7775. Remember that locations 7750 and 7751 of field 0 ore the data break locations and should not be written over for a DF32 or RS08 disks (refer to Section 4.5). If data must be read from the disk into those locations, it is advisable to read the data 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 Assembler, 1 5-7 EXIT, 2-1, 2-7, 4-11 Expressions, 3-5 -2, 3-1 Auxiliary Mode, 5-6 FIELD, 3-8 Fields, 2-5, 3-1 Binary Input, 5-2 File Index, 1-4 Binary Output, 5-4 Files, 1-1, 1-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-5 Card Reader, 5-3 Character Editing, 2-2 Character Set, C-6, C-10 CLEAR, 2-1, 4-9 Command 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 Current Location Counter, 3-3 Cursor, 2-1, 2-7 Legal Characters, 3-6 LINCtape, 1-1, 1-2, 5-2, 5-4 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 Source Progroms, 1-2 Moni for Commands, 1-2, 1-4, 1-5, 2-2, 4-1, C-1 Source Working Area, 1-1, 1-2, 2-1, C-11 MOVE, D-2 Statement Syntax, 3-1 Symbols, 3-2, 3-3, 3-4, 3-5 System Build, A-1 NOLIST, 3-9 System Initialization, A-2 Numbers, 3-4, 3-5, 3-6 System Operation, 1-2 System Stortup, A-3 OCTAL, 3-4, 3-9 Operands, 3-2 Tabs, 2-5 Operators, 3-1, C-10 Tags, 2-5, 3-1 Overlapped I/O, 2-6 Tope Allocation, C-1 TEXT, 3-9 PAGE, 3-8 Text Mode, 1-2, 2-1 PIP, 1-2, 5-1 PMODE, 3-7 Unit Numbers, 1-5 PRINT INDEX, 4-10 User's Monitor Command, 4-11 PRINT SOURCE, 4-11 Pseudo-Operators, 3-7, C-2 Punch Zeros, 5-5 WRITE, D-1 Radix, 3-4 ZERO, 4-7 READ, D-1 RUBOUT, 2-2 HOW TO OBTAIN SOFTWARE INFORMATION Announcements for new and revised software, as well as programming notes, software problems, and documentation corrections are published by Software Information Service in the following newsletters. Digital Software News for the PDP-8 & PDP-12 Digital Software News for the PDP-11 Digital Software News for the PDP-9/15 Family These newsletters contain information applicable to software available from DigitoMs Program Library, Articles in Digital Software News update the cumulative Software Performance Summary which is contained in each basic kit of system software for new computers. To assure that the monthly Digital Software News is sent to the appropriate software contact at your installation, please check with the Software Specialist or Sales Engineer at your nearest Digital office. Questions or problems concerning Digital's Software should be reported to In cases where no Software Specialist is available, please send a Software Performance Report form with details of the problem to: the Software Specialist. Software Information Service Digital Equipment Corporation 146 Mam Street, Bidg. 3-5 Maynard, Massachusetts 01754 These forms which are provided in the software kit should be fully filled out and accompanied by teletype output as well as listings or tapes of the user program to facilitate a complete investigation. An answer will be sent to the individual and appropriate topics of general interest will be printed in the newsletter. Orders for new and revised software and manuals, additional Software Performance Report forms, and software price lists should be directed to the nearest Digital Field office or representative. directly from the U.S.A. customers may order Prccmm Library in Maynard. When ordering, include the code number and a brief description of the software requested. Digital Equipment Computer Users Society (DECUS) maintains a user library and publishes a catalog of programs as well as the DECUSCOPE magazine for its members and non-members who request it. For further information please write to: DECUS Digital EquipNnent Corporation Main Street, Bidg. 3-5 Maynard, Massachusetts 01754 146 PDP-12LAP6-DIAL Programmer's Reference Manual DEC-12-ADRMA-A-D READER'S COMMENTS 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? If so, specify by page. How can this manual be improved? Other comments? Please state your position. Date: Name: Organization: Street: Department: City: State: Zip or Country Do Not Tear Fold Here and Staple - BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STAThS Postage will be paid by: SBSBDSD Digital Equipment Corporation Software Information Services 146 Main Street, BIdg. 3 5 Maynard, Massachusetts 01754 1
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies