Digital PDFs
Documents
Guest
Register
Log In
DEC-12-FRZB-D
July 1970
12 pages
Original
1.0MB
view
download
Document:
CREF12
Order Number:
DEC-12-FRZB-D
Revision:
0
Pages:
12
Original Filename:
http://bitsavers.org/pdf/dec/pdp12/diagnostics_set2/DEC-12-FRZB-D.pdf
OCR Text
0, ' IDENTIFICATION 0 Product Code: DEC-12-FRZB-D Product Name: CREF12 Date Created July 1, 1970 Maintainer: Software Services 0 DEC-12-FRZB-D July, 1970 Copyright 0 1970 by Digital Equipment Corporation The material in this handbook, including but not limited to instruction times and operating speeds, is for information purposes and is subject to change without notice. 0 The following are trademarks of Digital Equipment Corporation, Maynard, Massachusetts: DEC FLIP CHIP DIGITAL PDP FOCAL COMPUTER LAB The equipment described herein is covered by patents and patents pending. For additional copies order DEC-12-FRZB-D from Program Library, Digital Equipment Corporation, 146 Main Street, Maynard, Massachusetts 01754 Price $1.00 a 1.0 0 INTRODUCTION In many situations of assembling, debugging, and modifying programs, a crossreference listing is an invaluable aid. This listing is particularly useful when a programmer wishes to make changes in a large program or one he does not know well. A cross-reference is an alphabetical listing of all user-defined symbols with the line numbers at which the symbol was defined and used. Thus, the various places that a tagged location or an equated symbol is used are easily identified. C:REF12 provides this facility to the DIAL-Ms 1 user. It should be noted that the usefulness of a CREF (CRoss-REFerence) is almost directly proportional to the quality of the coding. In particular, the follow- ing principles should be used in new coding in order to make the best use of r P.EF12: Use symbolic references for beta registers, auto-index regi>ters, 1. page zero constants and temporaries, and fixed core locatioi1s. 2. Avoid use of large displacements from a tag (e.g., TAD X+l2 or JMP Y-6) because references to X and Y, respectively, rather than 0 the locations actually used, will appear in the CREF. 2.0 ENVIRONMENT CREF12 (including its header) occupies seven blocks in the DIAL file area of any unit. It is loaded into locations J through 2777 of field 1 and is entered at 2§!1.0 rn field 1. 3.0 USING CREF12 cREF12 is fntended for use in conjunction with the LISTAPE pseudo-op of the DIAL-MS AssernbleL. L_ISTAPE (with a positive argument) produces a normal assembler listing on a mass-storage device, rather than on the console Teletype(R) or line printer. The resulting data may then be processed by CREF12 to produce a full cross-reference of user-defined symbols and, optionally, the assembly listing. To use CREF12, insert a LISTAPE n pseudo-op in the program of interest, where n is an expression whose value is between /3 and 45, octal, and is taken as the RTeletype is a registered trademark of Teletype Corporation. 1 LAP6-DIAL-MS is commonly referred to as DIAL-MS. 0 l unit number of a scratch tape ing will be produced. (fl-7) or disk (ljK-45) on which· the Assembler list- The user must exercise caution in assigning units for LISTAPE because the listing information is written directly on the unit starting at block zero without regard to anything else that may be on the same unit. Therefore, unit n Should be either a scratch tape or a logical disk devoted to scratch work. Typing ret1rn at any time (after answering the "LISTING [Y OR N]? 11 causes CREF12 to return to DIAL-MS. 3.1 question Operating Procedures 1. Set all six sense switches on. Be sure the tape or disk unit assigned by the LISTAPE pseudo-op is ready and WRITE ENABLEd. 2. Assemble the program with the LIST Command (refer to the LAP6-DIAL Programmer's Reference Manual, DEC-12-SE2D-D). 3. If a printer is to be used for the CREF, it should be ready at this time. When the Editor display returns, load CREF12 by typing +LO CREF12 ,JK) 4. The following message is printed: UNIT #? 5. Type an octal number between ~ and 45, followed by carriage return, for the unit on which the listing was written. The next message is 0 LISTING [YORN)? Type Y if the full assembly listing and CREF are the CREF is needed. desired~ N if only Assuming the specified unit is available and ready, CREF12 will then read the listing (printing it if requested) and print the cross-reference table. Output will be on. a .line printer if one is available and ready. Otherwise, it will be on the console teletype. 3.2 Error Conditions ; Under some conditions, CREF12 will not be able to produce the cross-reference desired. 1. If there were errors in the assembly, CREF12 may interpret the program incorrectly, or may even be unable to process it at all. In the latter event, it will print "BAD INPUT" and return to DIAL.:.;MS. 2. If there is· a large number of symbols and references, the cross-, reference table may overflow. In this case, CREF12 prints: '( ·' ·,;i: iil ~ SYMBOL TABLE OVERFLOW AT LINE XXXX 0 2 wh:,rc XXXX is the last line number processed. crmF'l2 t::hcn pr .. nts the crqss-reference up to that line, and returns to DIAL-MS. '!'his problem will arise if (NSYM*5 + NREF) is greater than 4,094, where NSYM is the number of user-defined symbols in the program, and NREF is the number of references to user-defined s~mbols. If t~ere are ~1ore than 8_1_0 10 symbols, this message will occur during the first pass, with XXXX equal to .0.0.0.0. CREF12 will print "BAD INPUT" and return to DIAL-MS. 0 3) If the unit specified by the user is invalid, the DIAL-MS I/O routines will display NO. The user may type return to get back to DIAL. If a program containing a LISTAPE pseudo-op is to be assembled without getting a CREF, use the normal assembly procedure with the sense switches off; this disables the LISTAPE function. 4.0 i. ter INTERNAL DESCRIPTION reading the DIAL~MS I/O routines into 7.0fiJ0-7777 of field 1, CREF'.1.2 requests two parameters from-the user: the unit from ,Jhich to read tile listing, and whether the listing is to be pr:i.11.ted; CREF12 then begins its first pass over the data. The routine MAIN rewinds the input, initializes counters, and cal·!:: t.he subroutines GETLIN and ENDLST to get a line of input and check tt for tli.e separator between the listing proper and the symbol table, respectively. 0 ·1·nis separator is a line with one of two messages, "NO ERRORS" or "XXXX ERRORS". If the input runs out (indicated by a word of zero) before the separator is found, the input is invalid and processing is terminated with the message "BAD INPUT". takes over and reads the symbol table. If the separator is found, SYMBUILD Each symbol is stored in stripped ASCII form in field .0, followed by two words of zero. When the end of data is found, control passes to PART2, which rewinds the input file. MAJOR calls GETLIN and ENDLST to get successive lines from the file and test for the end of the listing proper. After checking for the separator, MAJOR flows into SCAN, which collects a symbol at NAME, calls NSERCH to search the symbol table for it, and (if it finds the symbol) stores the line number with the symbol in field ,0. Control returns to SCAN until either carriage return, slash, or "TEXT" is found. Control then returns to MAJOR to get a new line. When a separ<'l.tor is found, control transfers to DUMP~ which prints a header, then reads each symbol from the file. Each symbol and its value.are printed, followed by the line number at which the symbol was defined, and then the lin~ numbers at which the references to it were made. Output is terminated, and control returns to DIAL-MS, when the end of the symbol 0 table is found. 3 The functions of minor routines are as follows: BOP UP Maintains SYSCOUN'r to keep track of field fl utilization and issue the message "SYMBOL TABLE OVERFLOW AT LINE XXXX" when the symbol table overflows. Called by SCAN when a reference is to be added to the symbol table •. CRLF Go to a new line on the Teletype or line printer. GETBLK Get .8 blocks from the input file. {,Jsed by GETLIN when the inpur buffer is empty, and by MAIN and PART2 to rewind the input and read the first buffer load. GETC Obtain the next character from the current line and return it in CHAR and the AC. Used by many routines. GETLIN Get a line (a string of characters terminated by zero or line feed) from the input file. If LISTSW is non-zero, print it. I MOVE Move a block of data across field boundaries. to move a new entry into the symbol table. I PUSH Move. a portion of the symbol table down. Durinq SYMBUILD, the symbol table is built by pushing previous entries down to lower core addresses and entering each new symbol at the end of the list (at the top of field~). During SCAN, references to each symbol are stored following the symbol. IPUSH .is called to make room for each entry. ISNUM Examine the first four characters of the current line. If not octal digits, return to P+l. Otherwise, convert them to binary, store.binary at LINENO, and return to P+2. Called only by MAJOR. I ZERO Search.the symbol table, starting at the location addressed by TEMP, for a word of zero. If none is found, return to P+l. Otherwise, return to P+2 with TEMP pointing to the zero. Called by NSERCH to look for the next symbol and by SCAN to find the .end of the references to the current symbol. LIMIT Compare the value in the AC to two limits. If the AC is zero, return to address in P+3~ if AC is out of limits, return to address. in P+4. If AC is within the limits, return to P+5.. Used by many routines. NSERCH Find the symbol table entry which matches the symbol at NAME. Return to P+l if no match is found, or to P+2 if successful. Called only by SCAN. POCTAL Print the value in the AC, converted to octal characters. Used by BOPUP to print the line number at which overflow occurs and by DUMP to print the cross-reference line numbers. PUTC Print one character on the output- devl.ce. TTY Print a character string. RE TC HU Check. the keyboard flag and return to DIAL if retµrn has been struck. Otherwise just clear AC. . 0 Used by SYMBUILD 0 . 0 4 HOW TO OBTAIN SOFTWARE INFORMATION Announcements for new and revised software, as well as programming notes, software problems, and document a· lion corrections are published by Software Information Service in the following newsletters. Digital Software News for the PDP·8 Family Oigital Software News for the PDP·9/ l 5 Family PDP-6/PDl'· I 0 Software Bulletin !'Ill'"' newsklters con lain information applicable to software available from l>igital's Program Library. l'lea:,e complete the card helow to place your r,ame on the newsletter mailing list. Oue:;tiDm or problems concerning DEC Software should be reported to the Software Specialist at your nearest DEC '"''•onal or district sales office. In cases where no Software Specialist is available, please send a Software Trouble Ecport form with details of the problem to: Software Inkn',1dli«11 '.)ervice Digital Equipment Corpc·,1ati•.•n 14(> Main Street. Bldg. 3·5 Maynard, Mas>ad1usctts 01754 I' forn1s. which are available without charv.e from the l'rogrnm Library, should he fully filled out and accornpa· llt"d hy lektypc output as wl'il as listings or tapes of the user program to facilitate a complete investigation. i\n an',\V\'I will he sc·nt to the individual and appropriate topics of general interest will be prinlL'd in lhe newsletter. "'"I Nt·w n·visc·d soltwan· and 111a11uals, Software Trouble Report forms, and curnulativl' Solhvarc Manual lJpdatcs avail;ihk frnn1 Ilic Program Library. WIHon ordering, include llu· docunll'nt n1J111her and a hricl description •;f lhl· 11rug1;1J1J "' 111:1Ju1al rc·qut•sll'd. Revisions of programs and documents will hL' an1101utcl·d in tl1e newsletters anti a \\I'll'<' list will ht• 111d11ded twice yt·arly. !Jirect all inq11irics and req11ests to. '11<' Program Library Digital Lquiprnenl ( 'orporalion 146 Main Street, Bldg. 3-5 Maynard, Mass;1ch11sctts 01754 Digital Lquipment Computer Users Society (DECUS) maintains a user Library and publishes a catalog of programs :is well as the DECUSCOPE magazine for its members and non-members who request it. For further information please w1itc to: DEC US Digital Equipment Corporation 146 Main Street Maynard, Massachusetts 0·1754 Send Digital\ software newsletters to: Name _ _ _ _ _ _ _ __ Company Name _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ Address _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ~ My computer is a PDl'-8/I LINC-8 l'DP-9 PDP-IO 0 0 0 0 (zip code) PDP-8/L 0 PDP-12 0 l'DP-15 D Please specify OTHER 0 _ _ _ _ __ My system serial number is _ _ _ _ _ _ _ _ _ _ _ _ (if known) 0 0 - - - - - - - - - - - - - - - - - - Fold Here - - - - - - - - -· - - - - - - - - -· - - - 0 - - - - - - - - - - - - - - Do Not Tear - Fold Here and Staple - - - - -- - - - - - - - - FIRST CLASS PFRMf'I NO 33 'I MAYNARD, MASS i) llUSINf SS REPLY MAIL NO POSl AGE STAMP NECESSARY If MAILED IN Tflf· UN II ED ~I A I I'S Postage will be paid by: ' mamaamo Digital Equipment Corporation Software Information Services 146 Main Street, Bldg. 3-5 Maynard, Massachusetts 01754 ·'· .. :u.,•am.......,•. :& ' ' 0 0 CREF12 READER'S COMMENTS DEC-12-FRZ.13-D Digital Equipment Corporation maintains a· continuous effort to improve the quality and usefulness of its publications. To do this effectively we need user feedback - your critical evaluation of this manual. Please comment on thi]l manual's completeness, accuracy, organization, usability, and readability. Did you find errors in this manual? ___________ ,_ _ _ _, 0 How can this manual be improved?-------------------~---~---- DEC also strives to keep its customers informed of current DEC software and publications. Thus, the following period· ically distributed publications are available upon request. Please check the appropriate boxes for a current issue of the publication(s) desired. O Software Manual Update, a quarterly collection of revisions to current software manuals. 0 User's Bookshelf, a bibliography of current software manuals. O Program Library Price List, a list of currently. available software programs and manuals. Please describe your position. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name - - - - . . . , . , . . - - - - - - - - -..... Organization S t r e e t - - - - - - - - - - - - - - - Department - - - - - - - - - - - - - - - - - City _ _ _ _ _ _=""...,,,...,,,....-,... State _ __,__ _ _ _ _ _ _ _ _ _ _ Zip or Country _ _ _ __ 0 I I I I !!' " 0 ······•·························•························································ Fold Herc ......................................................................................... . 0 ............................................................................ Do Not I car · Fold Herc and Staple ................................................................ . FIRST CLASS PERMIT NO. 33 MAYNARD, MASS BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATES Postage will be paid ·by: mamnamo Digital Equipment Corporation Software Information Services 146 Main Street, Bldg. 3-5 Maynard, Massachusetts 01754 lllllllllllllllllllllllllllllllllll!t'?1'' WW'''"c.:11-RllllllRlll --~11111111111111111111111111111• !ii.~.ll!AlllllllllllllllilllllllllllllllllB 0 0 Digital Equipment Corporation Maynard, Massachusetts C 0 ~ / I printed in U.S.A. ~amaamn 0 0
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies