Digital PDFs
Documents
Guest
Register
Log In
LA-5118-MS
December 1972
22 pages
Original
0.4MB
view
download
Document:
MCA FOCAL: A Real-Time Programming System for Multichannel Analysis on a PDP-9/PDP-15 Computer
Order Number:
LA-5118-MS
Revision:
Pages:
22
Original Filename:
4603095.pdf
OCR Text
LA-5118-MS INFORMAL REPORT MCA FOCAL: A Real-Time Programming System for Multichannel Analysis on a PDP-9/PDP-15 Computer (Cientiffic laboratory of the University of California LOS ALAMOS, NEW MEXICO 87544 \ UNITED STATES ATOMIC ENERGY COMMISSION CONTRACT W-7405-ENG. 36 This report was prepared as an account of work sponsored by the United States Government. Neither the United States nor the United States Atomic Energy Commission, nor any of their employees, nor any of their contractors, subcontractors, or their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness or usefulness of any information, apparatus, product or process disclosed, or represents that its use would not infringe privately owned rights. In the interest of prompt distribution, this LAMS report was not edited by the Technical Information staff. Printed in the United States of America. Available from National Technical Information Service U. S. Department of Commerce 5285 Port Royal Road Springfield, Virginia 22151 Price: Printed Copy $3.00; Microfiche $0.95 LA-5118-MS Informal Report UC-32 ISSUED: December 1972 losV/Valamos scientific laboratory of the University of California LOS A1AM0S, NEW MEXICO 87544 -NOTICE- This report vas prepared as an account of work sponsored by the United States Government. Neither the United States nor the United States Atomic Energy Commission, nor any of their employees, nor any of their contractors, subcontractors, or their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness or usefulness of any information, apparatus, product or process disclosed, or represents that its use would not infringe privately owned rights. MCA FOCAL: A Real-Time Programming System for Multichannel Analysis on a PDP-9/PDP-15 Computer by Larry V . East Paul M. Aebersold* of the Nuclear Analysis Research Group 'Present address: Department of Biophysics, University of California, Berkeley, CA. Work supported by the U.S. AEC Division of Nuclear Materials Security v»r Uiii CONTENTS PAGE LET OF TABLES iii LIST OF FIGURES iii I, INTRODUCTION 1 II. DATA DBPLAY 2 III. FUNCTIONAL CONTROL PANEL 2 A. Toggle Switches 2 B. Rotary Switches Push Buttons Thumb Switches Status Lamps 2 C. D. E. IV. V. 3 3 3 MCA FOCAL FUNCTIONS 3 A. FADC 3 B. FSTP 5 C. FTIM 5 D. FPSH 5 E. FRSW 5 F. FZER 5 G. FCUR 5 H. FDTP 6 I. FMCA 7 J. FSWH 7 K. FRDC 7 L. FPRC 7 M. FODT 7 N. FIDT 7 O. FPLT, FPPL, and FCON 7 P. FCOM 7 Q. FCNT 8 MCA FOCAL PROGRAM EXAMPLE 8 ACKNOWLEDGMENTS 10 REFERENCES 10 APPENDICES Ii A LISTING OF PHA PROGRAM 10 B LOADING AND RUNNING MCA FOCAL 14 C MCA FOCAL IMPLEMENTATION 16 LIST OF TABLES SECTION PAGE T-BI III. I IV. II IV. III IV. rv CONTROL PANEL TOGGLE SWITCHES MCA FOCAL INTERNAL FUNCTIONS MCA FOCAL EXTERNAL FUNCTIONS EXAMPLES OF SOME INSTRUCTIONS THAT MAY BE EXECUTED BY FUNCTION FCOM 3 4 4 8 APPENDIX B. B-I. MCA FOCAL .DAT SLOT USAGE 14 C. C-I. CONDITIONAL ASSEMBLY PARAMETERS FOR FOCALM 16 LIST OF FIGURES SECTION FIGURE III. 1. FUNCTIONAL CONTROL PANEL OVERLAY FOR USE WITH MCA FOCAL. 2 V. 2. SAMPLE PLOT PRODUCED BY PHAPLT. 9 PAGE ill MCA FOCAL: A REAL-TIME PROGRAMMING SYSTEM FOR MULTICHANNEL ANALYSIS ON A PDP-9/PDP-15 COMPUTER by Larry V. East and Paul M. Aebersold* ABSTRACT A programming system based on a modified FOCAL interpreter is described for a PDP-9/PDP-15 computer equipped with specific hardware. User programs written in FOCAL may be used to control the acquisition of multichannel pulse height data and perform data analysis. A switch panel and CRT display with a light pen are utilized to allow the user a high degree of interaction with the data acquisition routines. I. INTRODUCTION MCA (Multi-Channel Analysis) FOCAL** is a modification of Digital Equipment Corporation's FOCAL (FOrmula CALculator) interactive programming language. The software is designed to be used with a 16K PDP-9, PDP-9/L, or PDP-15 computer equipped with DEC-tape, display and light pen. Functional Control Panel*** (FCP) and dual Analogto-Digital Converters**** (ADCs). Additional peripheral devices, such as a line printer and digital plotter, may also be utilized. ''•Tennecomp Systems, Inc., Oak Ridge, TN. Present address: Dept. of Biophysics, University of California, Berkeley, CA. **FOCAL, PDP, and DEC are registered trademarks of the Digital Equipment Corporation, Maynard, MA. ***Tennecomp Systems, Inc., Model TP-1347. fc***Using a Tennecomp Systems, Inc., Model TP1517 ADC Interface. Up to 4096 (4K) channels of pulse height data may be acquired via one or two ADC s and stored in the upper IK of computer memory. The ADCs may be started and stopped under software control via FOCAL function calls, or by push buttons on the Functional Control Panel (FCP). The data region is displayed on a CRT display, which is controlled by the FCP. FOCAL programs have full access to the data region of memory for bidirectional transfers. The syntax of MCA FOCAL is the same as FOCAL LSL, and the reader is referred to the FOCAL LSL Programming Manual for a description of the language. However, Sec. IV of this report describes in detail the special functions implemented in MCA FOCAL. Section II describes the data display capabilities, and Sec. Ill describes the use of the control panel. A FOCAL program for performing simple pulse height analysis functions is described in Sec. V. MCA FOCAL is designed to operate under control of the PDP-9/PDP-15 Ad2 vanced Monitor Software System, and the reader is assumed to have some familiai-ity with the basic operation of this system. , cursor; should this be attempted, the upper cursor will remain at the lower cursor position. The data channels marked by the cursors may be determined by the FOCAL function FCUR(N), where N=l for the lower cursor and 2 for the upper cursor (see Sec. IV-G). II. DATA DISPLAY Data from the 4K data region of memory are III. FUNCTIONAL CONTROL PANEL displayed through a 256-word display buffer. If The FCP contains a series of switches for mere than 256 data channels are displayed, then input to the computer and status lamps for output. each display point represents the largest number Labels are mounted on removable overlays for each contained in a group of N data channels, where N=2 computer program utilizing the control panel. The for 512 channels up to 16 for 4096 channels. The general MCA FOCAL panel overlay is shown in display routine is entered via a clock interrupt apFig. 1. proximately every 1/30 sec, and may be disabled The uses of the various switches and status by a FC P switch in order to decrease the execution ' lamps are described in the following paragraphs. time of FOCAL programs. A. Toggle Switches Two vertical cursors are shown on the disToggle switches SI and S8 are not used; play and may be used to mark regions of data for switches S2-S7 are used as described in Table I. analysis, display expansion, etc. The cursor with B. Rotary Switches 1 the fin ? point spacing is the "active" cursor and may The positions of the four rotary switches Rl be positioned to any displayed data point by touching to R4 may be determined via the FOCAL function that point with the light pen. The inactive cursor FRSW (see Se~. IV-E). The first rotary switch, may be made active by pointing to the cursor with Rl, has no specific use and may be used to set a the light pen. The lower cursor is dominant and FOCAL variable via a function call of the form may be positioned at any displayed data point. The SET VAR=FRSW(1). upper cursor cannot be positioned below the lower © ©' SON LIN SQRT © LINEAR LOG DISPLAY OFF OVERLAY OFF CXPAI4D START START ADC 2 P8 P4 >.. P7 P3 (3) 72 12) STOP ADC 1 o [ 1.7 1 AD( 2 OWL STOP ADC 3 DISPLAY ORIGIN P5 PI Tl T2 T3 14 DISPLAY LENGTH T5 o ZERO ADC 1 LIVE TIME (, I SEC) ADC 2 LIVE TIME (. 1 SEC) Fig. 1. Functional control panel overlay for use with MCA FOCAL, TABLE I CONTROL PANEL TOGGLE SWITCHES Switch No. Use S2 Selects either a linear or nonlinear vertical scale for the data display. If the nonlinear setting is selected, the data will be displayed with the type of scale determined by switch S3. S3 Selects either a square root or logarithmic vertical scale for the display when switch S2 is set to nonlinear. S4 In conjunction with rotary switch R2, specifies the channel origin for the display. The number of channels specified by rotary switch R2 is added to the offset (0 or 2048) specified by this switch to obtain the display origin. So Initiates the displaying of data channels specified by rotary switches R2 and R3. The origin and length of the display remain fixed regardless of the settings of R2 and R3 until this switch is reset (turned off and then back on). May be left off to disable the display for faster execution of FOCAL programs. 36 Overlays the expanded display with the corresponding data channels from the data region specified by R2 and R3o Effective only when in expand mode (switch S7 on). S7 Expands the horizontal display scale to display 128 channels starting with the channel marked by the lower display cursor. Switches R2 and R3 are used to set the origin and length, respectively, of the region of data to be displayed. New settings of these switches will not affect the display (except when in the overlay mode) until switch S5 is reset. Switch R4 is used to set the vertical display scale. C. Push Buttons Push button PI is used to zero that portion of the data region currently shown on the full (not . expanded) display. P8 and P7 are used to enable ADCs 1 and 2, respectively, for preset times determined by the thumb switches. P5 and P6 are used to disable the ADCs. The status of any one of the eight push buttons may be detained by the FOCAL function FPSH(N) (see Sec. IV-D). D. Thumb Switches Thumb switches are used to set the preset live times for the ADCs when they are enabled by push buttons P7 and P8. T1 thru T5 are used to set the live-count time for ADC 1 in units of 0.1 sec, and T6 thru T10 are used with ADC 2. Note that the preset times are not determined by the thumb switches when the ADCs are enabled under software control by the function FADC. E. Status Lamps Lamps LI thru L3 are not used. L4 will be on whenever ADC 1 is enabled; L5 will come on if the maximum count ol 262,143 has been exceeded in any data channel associated with ADC 1 (ADC 1 will remain enabled). L5 will be cleared (turned off) when the data region is zeroed, or when ADC 1 is reenabled. Status lamps L6 and L7 are used to indicate the enabled and overflow status of ADC 2. IV. MCA FOCAL FUNCTIONS The standard FOCAL LSL internal functions listed in Table II are also available in MCA FOCAL. In addition, the 19 special purpose "external" functions listed in Table III are available in MCA FOCAL; the last ten of these functions are also available in FOCAL LSL. Use of the external functions is described in detail in the following sections. Remember that zero arguments need not be specified in function calls, provided that the proper number of commas are retained (refer to Chap. IV of Ref. 1). A. FADC This function is used to enable one of the two ADCs for a specified live-count time. The form of the function call is: SET DUM=FADC(N. TIM) TABLE II MCA FOCAL INTERNAL FUNCTIONS TABLE III MCA FOCAL EXTERNAL FUNCTIONS Function Description Square Root X must be s 0. FADC(N, T) Absolute Value Sign of X ignored. FSTP(N) Sign Part Return + 1 for positive X, -1 for negative X. FTIM(N) Returns the integer part of X (no rounding performed). FITR(X) Integer Part FRAN() Random Number Generates a pseudoGenerator random number between + 1 and - 1 . A nonzero argument may be used to initialize the random number sequence. Function FPSH<N) FRSW(N) FZER(LOW, HI) FCUR(N.X) FEXP(X) Exponential Computes e (e= 2.718281...). FSIN(X) Sine Sine of angle X expressed in radians. FCOS(X) Cosine X expressed in radians. FATN(X) Arc Tangent Generates the angle in radians for which X is the tangent. FLOG(X) FLOCO FPI(X) Natural Logarithm Computes Log (X); X must be > 0. Core Locations Returns the number of core locations available to the user. The argument is ignored. Multiple of PI Returns X*IT (TT= 3.14159...). where "DUM" is any variable, "N" specifies the ADC (1 or 2). and "TIM" is the desired live-count time in seconds. The count time will be truncated to the nearest 0.1 sec. For example, if one used SETX=FADC(1, 10.35), ADC 1 would be enabled for a live-time of 10. 3 sec. If the truncated value of the first argument is other than 1, ADC 2 will be selected. Error ? ? 27 will Description Enable ADC "N" (N=l or 2) for "T" seconds live-time. Disables ADC "N" and returns the elapsed live-time in seconds. Returns the elapsed live-time in seconds for ADC "N". Returns nonzero value if control panel push button "N" has been pushed. Returns position of rotary switch "N" (N=l to 4) on control panel. Zeros data channel contents l'r om channel LOW to channel HI. Returns the channel location of the specified display cursor; may also be used to position cursors on expanded display. TENNECOMP format DEC-tape I/O; I/O operation determined by value of "N". FMCA(CHAN, VAL) Stores or retrieves MCA data. FDTP(N) FSWH(N) FRDCf) FPRC(X) Returns nonzero value if sense switch "N" is on. Reads an ASCII character from the user's input device and converts it to a decimal number. Converts X to an ASCII character and prints it on the user's output device. FODT(N) Set output .DAT slot to N. FIDT(N) Set input .DAT slot to N. FPLT(N.X.Y) Plotter line drawing function. FPPL(C,S,X, Y) Point plotting function. FCON(D,NC,NI,N2) Control function for plotter alphanumeric s. FCOM(X, AC) Executes machine language instruction "X" with accumulator set to "AC"; returns value of accumulator after instruction executed. FCNT(N) Simulated skip counter used in conjunction with FCOM. be issued if "TIM" is less than zero or greater than - function argument after truncation is less than 1 or 26, 214. 3. If the selected ADC has already been en- greater than 4, the error message ? ? 27 will be abled (as, for example, from the control panel), issued. error message ? ?38 will be issued. F. FZER B. FSTP This function is used to zero the data region The ADC specified by the single argument starting with the channel specified by the first arguof this function is disabled and the function returns ment thru the channel specified by the second arguthe elapsed live-time in seconds (to the nearest 0. 1 ment. For example, sec) of the specified ADC. For example, the comSET DUM=FZER(0, 1023) mand will zero the first 1024 data channels. If the function arguments are out of range (less than 0 or TYPE FSTP(2),! greater than 4095), or if the value of the second will disable ADC 2 and print the live-count time on argument is less than the first argument, the error the user's output device. An argument value other message ? ? 27 will be issued. than 2 will select ADC 1. C. FTIM This function returns the elapsed live-time of the specified ADC without altering the status (enabled or disabled) of the ADC. Example: G. TYPE FTIM(1),FTIM(2), '. D. FPSH This function is used to interrogate the control panel push buttons (PI thru P8). Each time a push button is depressed, a software flag is set indicating which button was depressed. A function call of the form TYPE FCUR(l), FCUR(2), i will print the channel locations of the lower and upper cursors on the user's output device. Also, the statement SET DUM=FZER(FCUR(1), FCUR(2)) could be used to zero the data region bracketed by the two cursors. If the truncated value of the first argument is other than 2, the position of cursor 1 (lower) will be returned. SET VAR=FPSH(N) will set "VAR" to a nonzero value if the button specified by "N" (N=l to 8) was the last button depressed and the flag will be reset to zero. If, however, button "N" was not the last one depressed, "VAR" will be set to zero and the flag will remain unchanged. No error messages are issued. E. FR5W The control panel rotary switch specified by the function argument (1 to 4) will be read and a value from 1 to 12 corresponding to the switch position will be returned. For example, the statement 01. 50 IF (FRSW(2)-6) 1. 6, 1. 7, 1. 8 will cause a program branch to statement 1. 6 if rotary switch R2 is set at any position from 1 to 5, branch to 1. 7 if it is at position 6, and branch to 1. 8 if it is at a position greater than 6. If the FCUR The channel location of the display cursor specified by the first function argument (1 or 2) will be returned by calls to FCUR. For example, A second (nonzero) argument may be used to position the specified cursor on the expanded display; if the display is not in EXPAND mode (FCP switch S7 on), the second parameter will be ignored. The origin for the expanded display will be set automatically to 20 channels below the specified location of the lower cursor. For example, the call SET DUM=FCUR(l,642)+FCUR(2.650) will set the origin of the expanded display to channel 622, and position the upper and lower cursors at channels 650 and 642 respectively. (Remember that only 128 channels are displayed in the EXPAND mode.) If the value of the second parameter is negative or greater than 4095, the error message ? ?27 will be issued. H. FDTP • typed along with the fatal error ? ? 34 if the file is This function is used to perform DEC-tape not on the tape. input/output using a special binary file format that 4. Write a File (N=3). The user will be is compatible with other PDP-9/PDP-15 Tennecomp asked to type the file description which may consist data acquisition programs. of up to 72 characters. * This information will be The file directory is stored in tape blocks 2, 3, and 4, and data are entered in the directory, and the entire 4K data r e - stored in blocks 32-543. A 4096-word data file is g'on of memory will be written on tape. stored in 16 consecutive blocks; up to 32 files may age "TAPE FULL" and fatal error ? ?34 will be be stored on a single DEC-tape. A maximum of 72 typed if the directory is full. characters may be used to describe each file. How- 5. KU1 the Directory (N=4 to 7). The mess- If this op- ever, only the first six characters are used to iden- eration is specified, the message "DO YOU REALLY tify a file and must therefore be unique for each WANT TO DESTROY THE DIRECTORY?" will be file. typed. . DAT Slot 2 is used for data I/O and will nor- mally be assigned to DEC-tape unit 2. If the character "Y" is typed in response, all file names in the directory will be deleted; any The.DEC-tape routines are called by a state- other character typed will cause *he operation to be ignored. ment of the form SET DUM=FDTP(N). 6. Correction of Typing Errors. If a typing Parameter "N" determines the operation to be per- error is made during the typing of file names for formed as follows: the DELETE, READ, or WRITE operations, a N=0 CTRL/U may be typed to delete the present input List the directory. Delete a file. line, which may then be retyped. 2 Read a file. be used to delete single characters. 3 Write a file. cases, rubouts may bo used in the normal way.) 1 4-7 Kill (clear) the directory. 7. Rubouts may not (In all other Examples of the Use of FDTP. The fol- Only 3-bits of the truncated value of "N" are used; lowing examples are presented to help clarify the therefore N=8 has the same effect as N=0, N=9 use of the function FDTP. corresponds to N=l, etc. Each operation is des- cribed in detail in the following paragraphs. 1. Directory Listing (N=°). The data tape directory will be listed. The listing device will normally be the teletype, but may be changed to another device such as the line printer by use of the "OPERATE" instruction or the function FODT. 2. Delete a File (N=l). The user will be asked to specify a file to be deleted by typing the first six characters of the file description. If the * C TO LIST THE DATA TAPE DIRECTORY ON THE PRINTER* * 0 UPjS D=FDTPO * C EXAMPLES OF OTHER DATA TAPE COMMANDS: * S D:FDTPC2) READ F I L E : CALBfiA NOT ON TAPE T?J4 * S D=FDTP(2) READ F I L E : CALIBRATION SPECTRUM B A - l i i + HA-ZZ J / 2 5 / 7 0 * S DrFDTPCi) WRITE FILE: TEST OUTPUT SPECTRUM * S D:FDIPC5> DO YOU REALLY UANT TO DESTROY THE DIRECTORY? N * S D=FDTPU> DELETE FI LE: TES T 0 specified file is not on tape, the nonfatal error message "NOT ON TAPE" will be typed. 3. Read a File (N=2). The data file speci- fied by typing the first six characters of the file description will be read into the 4K data region of memory. The message "NOT ON TAPE" will be *Except the 11th file name which may contain only 48 characters and the 22nd file name which may contain only 24 characters. This restriction is a result of the fact that only one block of the tape directory is read at a time in order to conserve core space. I. FMCA This function gives the programmer access to the 4096-word data region of computer memory. There are two possible calls to this function: SET VAR=FMCA(CHAN) and SET VAR=FMCA(CHAN, VAL) In the first type of call, "VAR" will be set equal to the number contained in the data channel specified by "CHAN" (0 =s CHAN ^ 4095). The second type of call sets the data channel specified by "CHAN" equal to "VAL"; "VAL" must be positive and no larger than 262,143. If either parameter is not within the proper range, error ? ?27 will be issued. Function FMCA may be called recursively; for example, the statement ' M. FODT FODT is used to change the output device used by MCA FOCAL. The form of the function call is: SET DUM=FODT(N), where "DUM" is any variable and "N" is the .DAT slot number 3f a valid output device (refer to Appendix B for .DAT slot assignments). N. FIDT This function is used to change the input .DAT slot, in the same manner that FODT is used to change the output . DAT slot. O. FFLT, FPPL, and FCON These functions are used for plotter graphics and are described in detail in Chap. V of the FOCAL , LSL Programming Manual. FPLT is the basic FOR 1=1024, 2047;SET X=FMCA(I-1024,C FMCA(D-0. 5*FMCA(I+1024)]) could be used to set the contents of the first 1024 data channels equal to the contents of the second 1024 channels minus one-half the contents of the third 1024 channels. •J. FSWH This function is used to determine if a "sense switch" (one of the console accumulator switches) is turned on. If the switch specified by the function parameter (0 to 17) is on, th* function returns a nonzero value; if the specified switch is off, zero is returned. K, FRDC This function reads an ASCII character from the input device (normally the teletype) and converts it to a decimal number. A function argument is not required. L. FPRC The function argument is converted to an ASCII character and printed on the output device. The reader is referred to Chap, IV of the FOCAL LSL Programming Manual for details on the use of FRDC and FPRC. function for controlling the plotter and FPPL is used to plot special characters. Alphanumeric output to the plotter is accomplished by the standard TYPE command preceded by a call to FODT(7) and one or more calls to the special control function FCON. P. FCOM This function allows the MCA FOCAL user to execute any single machine language instruction. In the call SET ACF^FCOMUNS, ACI) "ACl" will be loaded into the accumulator before executing the instruction, "INS" is the decimal equivalent of the instruction to be executed, and "ACF" will be set equal to the content of the accumulator after the instruction has been executed. (If "ACI" is omitted, the accumulator will be zeroed prior to executing the command.) For example, the call SET DUM=FCOM(229380) could be used to execute the instruction to disable the real-time clock (octal code 700004) and hence disable the display. Several examples of useful instructions and their decimal equivalents are given in Table IV. Q. FCNT This function is used in conjunction with FCOM to reference a counter that is incremented whenever the instruction executed by FCOM produces a skip. The calling format is: SET CNT=FCNT(N) The variable "CNT" will be set equal to the contents of the skip counter; if "N" is nonzero, the counter will be reset to zero. TABLE IV EXAMPLES OF SOME INSTRUCTIONS THAT MAY BE EXECUTED BY FUNCTION FCOM Octal Code Decimal Equivalent 700004 229380 Disable the realtime clock. 700044 229412 Enable the real-time clock. 704031 231449 Turn on FCP lamp LI. 704131 231513 Turn on FCP lamp L2. 704231 231577 Turn on FCP lamp L3. 704034 231452 Turn off FCP lamp LI. 704134 231516 1 urn off FCP lamp L2. 704234 231580 Turn off FCP lamp L3. 704712 231882 Read FCP toggle switches SI thru S8. 750004 249860 Load the accumulator from the accumulator switches. Use V. MCA FOCAL PROGRAM EXAMPLE A FOCAL program that performs simple data analysis and various I/O functions in response to teletype commands is listed in Appendix A. The program consists of three segments that are loaded from a FOCAL library tape by the LIBRARY IN command. The main program is loaded by typing LIBRARY IN PHA After PHA is loaded, it asks the user to type a command. A listing and explanation of the ten available commands may be obtained by typing "HELP". The FOCAL program PHACMD will then be loaded by PHA from the library tape, and a description of the commands given on the teletype or line printer as specified by the user. At the completion of PHACMD, program PHA will be reloaded automatically. If "PLOT" is typed in response to PHA's request for a command, the FOCAL program PHAPLT will be loaded and the user may make linear, square root, or logarithmic plots of selected r e gions of data. An example of a plot produced by this program is shown in Fig. 2. At the completion of plotting, PHA will be reloaded. The area, centroid, and full-width at halfmaximum (FWHM) of a spectral peak bracketed by the display cursors may be obtained by typing "AREA" in response to PHA's command request. Contents of channels on each side of the peak, as defined by the cursor locations, are averaged to calculate the background to be subtracted in order to obtain the net area under the peak. The number of channels averaged on each side of the peak is determined by the variable "BCH". Initially, BCH is set equal to 4, but its value may be redefined at any time by stopping the program (by using a CTRL/P) and using the FOCAL "SET" command. The PHA program may then be reentered by typing "GO". The number of channels used in the background subtraction is properly taken into account when the statistical uncertainty of the net area is calculated. If the peak sits on a relatively smooth background. SAMPLE SPECTRUM PLOT :SQRT,. SCA 80000 45000 SOOO C0UN1 rs/ow 4NE _, 20000 1024 Fig. 2. Sample plot produced by PHAPLT. the statistical uncertainty may be reduced by averaging over more channels to obtain the background. The peak location is determined by calculating the peak centroid, n. as follows: where 2 = n=cl (4) c2 E n. k n=c, (1) where c, and c- are the cursor locations, and k 1 2 n is the content of the nth channel corrected for background as follows: kn = Yn - (a + b-n), (2) where Yn is the content of the nth channel, and the constants a and b are determined from the background on each side of the peak. The peak FWHM is obtained from FWHM = 2.3548 (3) and n is the centroid calculated from Eq. (1). Both Eqs. (1) and (3) assume that the peak is Gaussian; poorly shaped or partially unresolved peaks will produce anomalous results for the peak location and FWHM. Program PHA is not intended to be a completely general purpose pulse height analysis program, but rather to illustrate some of the things that may be accomplished within the MCA FOCAL environment. The modular structure of PHA does, however, allow it to be easily modified (within the limits of available core) to perform other calculations or operations required for a particular application. ACKNOWLEDGMENTS The helpful suggestions and comments made by Walter R. Burrus of Tennecomp Systems and Ronald H. Augustson of LASL during the development and debugging of the software described in this report are gratefully acknowledged. PEFERENCES L. V. East. "FOCAL LSL Programming 1. Manual, " Los Alamos Scientific Laboratory report LA-4983-MS (1972). 2. "Advanced Monitor Software System for PDP-15/20/30/40, " Digital Equipment Corporation Manual DEC-15-MR2B-D (1970). 3. "PDP-15 FOCAL Programming Manual," Digital Equipment Corporation Manual DEC15-KJZA-D (1969). APPENDIX A LISTING OF PHA PROGRAM I. MAIN PROGRAM C MCA t-'CCAL V2A 01.01 C PHA V1B - MCA FOCAL PULSE HEIGHT ANALYZER PROGRAM 01.02 C WRITTEN 7/24/72 BY L. V. EAST, LASL 01.03 C MODIFIED 8/16/72 01.04 E R A S E 01.05 C O M M O N I N T , ( L P P E R , 1 , 1 2 1 . I L L K E R , 1 , 1 2 ) , B C n 01.10 I t INT ) 2 . U S INT»-1 01.15 S BCH«4»C CONTAINS N O . OF CHANNELS TO USE FOR BKGNO. C A L C . 0 1 . 2 0 • N R ! T C F C C A l PULSE HEIGHT ANALYZER P K C G « A H " ! ! 0 1 . 3 0 T -TYPE COMMANDS FOLLOWING THE ' : • - FCR A L I S T I N G A N D " ! 01.fO T "EXPLANATION OF THE AVAILABLE CCMMANDS, TYPE ' H E L P ' " ! 02.01 C T H I S SECTION REAOS COMMANDS 02.10 C NR5A !"COMMAND ",CMO 02.20 (CO-OAREA) 2 . 3 , 4 . 1 02.30 (CMD-OTIME) 2.4,6.1 02.40 (CMD-OCALC» 2 . 5 , 8 . 1 02.50 <CKD-OCOMMENT) 2.6,10.1 02.60 (CMO-OTAPE) 2 . 7 , 1 2 , 1 02.70 (CMO-OSET) 2.8,14.1 02.80 (CVD-OAUTO) 2.9,16.1 02.90 (^D-OPRINT) 3.1,16.1 03.10 (CMD-OLOC) 3.2,20.1 03.20 (CKD-OPLDT) 3.3,3.7 03.30 (CKO-CHELP) 3.5,3.8 03.50 T "WHAT? " 03.60 G 2 . 1 03.70 0 3.9IL I P H A P L T K GO GET PLOTTING PROGRAM 03.60 D 3.9;L I PHACMD 03.85 D 3.9JL I DEC IN 03.90 T '"ONE MOMENT, PLEZ"! 04.01 C CALCULATE AREA t CENTftGIO OF REGION BETWEEN CURSORS 04.10 S J ' F C t R d M S K«FCU»<2) 04.20 C 5 04.30 S I'C/CMDiS C«0 04.35 F N«J,K;C 4.95 04.40 T ! " FWHM • • , < 4 . 0 2 , 2 . 3 5 4 8 * I SOT I C / C M C » , ! 04.50 G 2 . 1 04.90 S C M C * F M C A ( N ) ; S A > A » C M C ! S B ' O B l • B 2 » < N - J ) I S B * S * B N » S C " C » ( C W J - B N > * N 04.95 S A « F M C A I M ) 5 S B N ' B l • B 2 * ( N - J ) JS C > C • < A - B N ) « ( N - I ) « ( N - I ) 05.10 S B l > O t S B 2 > 0 05.20 F N « J - B C H , J - 1 J S B 1 » 8 1 * F M C A ( N ) 05.23 F N " K » 1 I K » B C H ; S e 2 » e 2 » F M C A ( N ) 05.25 S S 2 « i e 2 - B l » / ( B C H » ( K - J ) ) } S 6 1 « 6 1 / B C H 05.27 S A « O ; S C « O J S B - 0 05.30 F N . J . K I O 4 . 9 10 05.35 S CMC«A-B 05.40 T !*6,J,K," CTR =",%t.02,C/CMO," 9CH «".*2.BCH,! 05.45 T *8.02," A '".A," 6 «",e," A-B «*,CMD," ERR •* 05.50 T 5:3.02, 1CO*FSQT( A + 8*(K-J*1 )/(6ChUBCH> )/FAB S ( C MD I , " X" ! 06.01 c PRINT ^LAPSED TIMES 06.10 T !"ELAPSEC TIMES - AOC1 : " ,*6 .0 1, FT IK I 1 > , " SEC. ADC2 0 6 . 15 T FTIMI2 » , " S E C " ! 0 6 . 2 0 G 2.1 08.Cl C MAKE LIKE A CALCULATOR oe. io s ; T %9.ob 08.20 « 8.4,2.1 08.30 I ( C M D - J ) 08 .40 T C M 3 , ! i O H . 2 10 .01 C ALLOW COMMENTS TC 3 E T Y P E D - E N D W I T H A B E L L t CR 1C .10 T I 10 .20 S CMD*FRDC< >*FRDC( )!C NOTE ThAT BELL*CR*141•135«276 10 .30 I (CMD-27o) 1C.2,2.1,10.2 12 .01 C TENNECOMP FORMAT DEC TAPE 1/0 12 .10 A "FUNCTION ",CMD 12 .20 (CMD-OREAO) 12.3,13.1 (CPD-OWRITE ) 12.4,13.3 12 . 30 (CMO-OLIST) 12.5,13.5 12 .40 ICPD-OKILL) 12.6,13.7 12 .50 (C^D-COLT) 1 2 . 7 , 1 3 . 9 12..60 12..70 D 3 . 5 » T ! S G 1 2 . 1 13..10 S CMD«FDTP<2)fO 2 . J 13..30 S CMD'FDTPI31JG 2 . 1 13..50 A "TT OR LP? " , J 13..52 I ( J - O L P ) 1 3 . 6 , 1 3 . 5 5 , 1 3 . 6 13..55 D LP 13..60 S C M D ' F D T P U J I CJ-OLP) 2 . 1 , 1 3 . 6 5 , 2 . 1 2.1 13..65 P HZ 13. 70 S C M O " F 0 T P ( 4 ) I G 2 . 1 13. 90 S CMD«FOTP(1>16 2 . 1 14. 01 C SET UP AUTO A N A L Y S I S RE&IGNS 14. 10 S C M O ' F P S H U ) * F P S H < 3 ) K CLEAR 3UTT0NS 14. 13 T ••SET VP REF.JONS USING FIRST ROTARY SWL TCH AND"! 14. 15 T "PUSH BUTTON N O . 4 - EXIT WITH BUTTON N O . 3"!! 14. 20 S C M O « F C O M ( 2 3 1 5 1 3 ) K TJBN 0 \ R E A O Y LAMP 14. 25 S CMD*FPSH<4) JS J « F P S h ( 3 ) 14. 30 I (CMO+JI 1 4 . 2 5 , 1 4 . 2 % 14. 35 I ( J ) 1 4 . 4 . 1 4 . 4 J S C M O ' F C C M ( 2 3 1 5 1 6 ) i G 2 . 1 14. 40 S J«FRSW(1) 14. •50 S LOWER(J)«FCOR<1 )JS U P P E R ( J t ' F C U R I 2 I 14. 60 T 3 5 3 , J , * 7 , L O H ( J ) , U P P ( J ) , ! JS CMD'FPSH ( 4 ) J G 1 4 . 2 5 K LOOP BACK 16. 01 C AUTO ANALYSIS 16. 10 F I * 1 , F R S W ( 2 ) > 0 1 6 . 5 16. 30 G 2 . 1 16. 50 S J ' L O W I I I S S K ' U P P C I t J S CMO«FCUR« l . J > *FCUK I 2 ,tC) »D 5 18. 01 C PRINT DATA BETWEEN CURSORS CURSORS. TT OR L P ' ",CMD 13. 10 A "SET 20 T ! J I <CMO-OLP) 1 8 . 4 , 1 6 . 3 , 1 6 . 4 18.30 0 LP 18..40 I ' F C U R l 1 ) , B , F C U k ( 2 ) i O 19 16..50 ICHO-OLP) 2 . 1 , 1 8 . 6 , 2 . 1 18.60 P €!G 2 . 1 19.,10 J»O,7JT FMCAM+J) 1°. .20 20..01 PRINT CURSOR LOCATIONS 20. 10 !*7,FCUPI1),FCUR12),•!G 2.1 II. ROUTINE PHACMD ' MCA FCCAL V2A 01.01 C EXPLAINS COMMANDS USEC BY PHA PROGRAM 01.02 C L. V . EAST - 7/25/72 01.C3 C 0 1 . 1 0 0 NRJT !'"COMMANDS FJR PHA PROGRAM"!; 01.20 A -03 YOU WANT OUTPUT GN THE LINE PRINTER? 01.30 T !tl (ANS-CYESI 1.4,1.3b,1.4 01 .35 3 LP (YES OR NDI IANS 11 01 .40 T - A R E A - C A L C U L A T E AREA £ C E N T R C I D QF C A T A R E G I O N D E F I N E D 3 Y " ! 01 .45 T C U R S O R S CN THE O 1 S P L A Y . P R I N T O U T W I L L BE I N THE F O k M : " ! ! 01 .50 T FFF LLL CTR = M N N . U N 3CH = N" ! Cl .55 T A - NNNNNNN.NN B = NNNNNN.MM A-B' > NNNNNNN.NN" T 01 .57 , ERR » N . N N S " ! ! " WHERE THE F I R S T T h'C N U M B E R S ARE " 01, .60 T " T H E F I R S T £ L A S T C H 4 M , , E L i " ! " I N C L U D E D I N THE R E G I O N i " 01. .65 T " C T R ' P E A K C E N T R C I D , A = G S C S S A R E A , " ! " B'BACKGRGUND, " 01 .67 . T "At.D E R R ' * ERROR I N M - ~ > . " ! 01 .70 , T THE B A C K G R O U N D I S C A L C U L A T E D FROM C H A N N E L S ON 01. ,75 T " E A C H S I C E OF T H E " ! " PEAK - ThE NUMBER CF C H A N N E L S U S E D IS 01 ,80 . T " D E T E R M I N E D BY T H E " ! " C G N S T A N T ' S C H 1 , W H I C H MAY BE C H A N G E D " 01 , .es T " 3Y A ' S E T 1 S T A T E M E N T . " ! 01. ,90 T " THE PEAK F « H K I S ALSC C A L C U L A T E D £ P R I N T E D O U T . " ! 02. 10 T ! " T I M E P R I N T S T H E E L A P S E D T I M E S FOR A O C 1 £ A D C 2 " ! 03. 10 T ! " C A L C CALCULATDR MODE. EXPRESSIONS ENCLOSED W I T H I N ( ) ARE'! 03. 20 T E V A L U A T E D A.IMC T Y P E D C U T . E X I T FROM T H I S MODE B Y " ! 03. 30 T * T Y P I N G ThE WCRD C C M M A N D . " ! 04. 10 T [ " C O M M E N T - ALLOWS THE U S E R TO T Y P E COMMENTS ON THE T E L E T Y P E . " ! 04. 20 T E X I T BY T Y P I N G C T R L / B E L L F L i L L 3 h E D BY A R E T U R N . " ! 05. 10 T ! " T A P E DECTAPc I N P U T / O U T P U T OF DATA ( T E N N E C O M P F O R M A T ) . USER" W I L L BE A S K E D TO T Y P E A F U N C T I O N NAME - THE F U N C T I O N S A R E : " ! 05. 20 T " REAC - READ A DATA F I L E . " ! 05. 30 T WRITE - WRITE A F I L E . " ! 05. 35 T LIST - LIST THE DIRECTORY - USER HAY SPECIFY THE"! 05. 40 T LINE PRINTER OR TELETYPE FDR THE LISTING."! 05. 45 T KILL - ERASE THE DATA TAPE DIRECTORY."' 05. 50 T " DLT - DELETE A FILE."!' 05. 55 T DATA TAPE MUST BE MOUNTED ON DECTAPE UNIT #2."! 05. 60 T • SET UP REGIONS FOR AUTOMATIC ANALYSIS USING THE FIRST"! 06. 10 T !-SET ROTARY SWITCH AND PUSH BUTTON »4 ON THE CONTROL PANEL."! 06. 20 T BRACKET EACH REGION WITH CURSORS, THEN STORE THE CHAM^EL"! 06. 30 T LOCATIONS OF THE CURSORS IN THE REGION SELECTED SY THE"! 06. 40 T ROTARY SWITCH (1 TO 121 EY PUSHING BUTTON #4. EXIT BY"! 06. 50 T " PUSHING BUTTON »3. LIMITS OF REGIONS WILL BE PRINTED"! 06. 60 T ON THE TELETYPE."! 06. 70 T ANALYZE THE REGIONS SET UP USING THE ' S E T ' CCMMAND."! 07. 10 T !«AUTO THE NUMBER OF REGIONS ANALYZED WILL BE DETERMINED BY T H E " ! 07. 20 T " SETTING OF ThE F I R S T ROTARY SWITCH ON THE CONTROL P A N E L . " ! 07. 30 T " PRINTOUT WILL BE I N THE SAME FORMAT AS FOR ' A R E A ' . " ! 07. 40 T PRINT DATA REGICN BRACKETED BY THE D I S P L A Y " ! OB. 10 T ! " P R I N T CURSDRS. USER MAY SPECIFY THE L I N E PRINTER U P ) O R * ! 08. 20 T " THE TELETYPE ( T T ) FOR THE OUTPUT D E V I C E . " ! 08. 30 T CALLS DATA PLOT R O U T I N E . " ! 09. 10 T !"PLOT 10. 10 T !"LOC PRINT LOCATIONS OF DISPLAY C U R S O R S . " ! 15. 01 C IF NEW COMMANDS ARE ADDED, ADD EXPL1NATIONS H E R E . 20. 10 T !"CONTROL CHARACTERS H P , t C , E T C . ) HAVE THEIR USUAL E F F E C T . " ! 20. 20 T "TO RESTART PROGRAM AFTER AN ERfcCR OR AFTER I S S U I N G " ! 20. 30 T "A C T R L / P , TYPE ' G O ' . " ! 20. 50 I ( A N S - O Y E S ) 2 0 . 6 5 , 2 0 . 6 , 2 0 . 6 5 20.60 20.65 20.70 III. P t £ ; 0 NPJG 2 0 . 7 T !!• L I PHAJC RETURN TO M A I N PROGRAM. ROUTINE PHAPLT C MCA FOCAL V2A 01.01 C PHAPLT VIA - L. EAST, 7/22 01.03 C 0 1 . 0 4 0 NRST !!"SPECTRUM PLOTTING PROGRAM"!! 0 1 . 0 6 S XOF«200SS Y C F « 2 0 0 i S YMG=6C0*YCF 0 1 . 1 0 A " X - A X I S LENGTH ( I N C H E S ) ? " , X i S X r G = X e i C O * X C F 0 1 . 2 0 A " F I R S T CHANNEL NO.? " ,MNX 0 1 . 3 0 A "HOW MANY CHANNELS? " , N t P 0 1 . 4 0 A " L I N , LEG, CR SORT; - , T Y P 01.42 01.43 01.44 01.45 01.46 12 I (TYP-OLIN) 1.43,1.45 I (TYP-OLCG) 1.44,1.46 I (TYP-OSQRT) 1.4,1.47,1.4 S TYP-5JG 1.5 S TYP»6»G 1.5 01 .^.7 S TyP = 7 01.SO * "M1MMLM Y? " , MNY , " HA xl MOP Y? " , » X Y 01 . 55 I IMf'.Y ) 1 . 6 . 1 . 7 i 1 . 7 01.^0 S MNY*0 01.70 A "WHAT CHARACTER NC . ? " i C 01.75 I ICI 4 . 0 5 . 4 . C 5 Ol.rC A "CHARACTER SIZE? ",S 01.85 A "CONNECT CATA POINTS? (YES DR N D ) ". 0 1 . 9 0 I SX-OYES) 4. 03, 4 . 05 02.10 s 02.20 02.30 02.40 0:.E0 02.60 02.70 S Y*FMCA(I 1 (Y-HXYI 2.4,2.4}S Y=PXYjG 2.b I (MNY-Y) 2.5,2.5;S v=^Ny C (TYP/1O*3 ) S D V ' F P L T l N C . X t V ) » I IC) 2.6.2.6 S DV=FPPLtC,S,X,Y)*FPLT(5,X,Y) J«J*IJS 02.60 R 0 3 . 5 0 S Y«<Y-MNY)*YST+YOF 03.60 S Y'FLOGIY-MNY+1)*YST*YOF 03.70 S Y«FSaT<Y-MNYI*YST*YCF 04.01 C DRAW THE AXES 04.03 S NC«5;G 4. 1 04.05 S NC»4 04.10 S DV«FPLT(-11+FPLTl)*FPLT(5.400 ) «FPLT( )+ FPLTI5,XOF,YDF) 04.20 I (TYP-6) 4.3,6.11,4.3 04.30 S YNC«4 04.40 S YST'I YMC--YCFI/YNCSS X ST » ( XMG-XCF ) / 5 04.50 F W . Y N C i D C 4.91 04.S5 F l»l,8iC 4.93 04.60 F I'l.YNCi 0 4.95 04.65 F 1>1,8!C 4.97 0 4 . 7 0 S D V - F P L T ( 5 , X 0 F , YOF | »FC CNi( 7 , , 3 l * F C C i T I 7 1 ST * 6 04.60 G tTYP+.l) 0 4 . 9 1 S Y » l * Y S T + YDFfS DV«FPl. T ( 4 , X C F , Y ) «FPLT ( 4 ,XOF * 2 5 , Y ) * F P L T ( 4 , XOF , Y ) 0 4 . 9 3 S X « ! * X S T * X D F ? S D V ' F P L T ( 4 , X , Y K G ) * F P L T ( 4 , X , Y H G - 2 5 J + F P L T I 4 , X ,YMG) 0 4 . 9 5 S Y«YHG-1»YST|S OV'FPLT(4,XPG,YI*FPLT(4.XMG-25,YI+FPLTI4,*MC,Y» 0 4 . 9 7 S X « X H G - I * X S T J S O V « F P L T ( 4 , X , Y Q F ) * F P L T ( 4 , X , Y 0 F * 2 5 ) * F P L T ( 4 , X ,YDF ) 0 5 . 0 1 C LINEAR Y - A X I S 0 5 . 1 0 S S C f H N Y j S Y«(MXY-MNY )/YNC 0 5 . 2 0 F I ' l . Y N C S S SCLI I l ' S C H 1 - 1 t * Y 0 5 . 3 0 S Y»Y0F-9}S X«X0F-l40 0 5 . 3 5 F I.O.YNCID 5.9 0 5 . 4 0 D 8»S X . X C F - 1 4 0 J S Y»VCF-126 0 5 . 5 0 S D V ' F C Q N I 7 , 1 , 1 0 0 0 ) + F C C N I 7 , 2 , X , I Y M G - Y O F ) * , 5 +Y ) 0 5 . 6 0 T "COUNTS/CHANNEL" 0 5 . 7 0 T «;C 9 . 1 0 5 . 9 0 S D V » F C 0 N ( 7 , 2 , X , Y ) JT S C L t I ) , ! >S Y«Y*YST 0 6 . O J C LOG Y - A X I S 06.10 G 6.3 0 6 . 1 1 S I » - 1 J S Y-MNY+.5 06.13 S I«I•1JS Y.Y/IO 06.15 I U - Y I 6.13 0 6 . 1 7 S MNYMOfUS SCL'I 0 6 . 2 0 S I«OJS Y ' M X Y - . 5 06.23 0 6.13 06.25 I (1-Y) 6.23 0 6 . 2 7 S M X Y M O t l S S YNC»I-SCL 06.28 G 4.4 0 6 . 3 0 F J » 1 , Y N O S SCLIJ I ' S C L I J - l ) * 1 0 6 . 3 3 S Y'YOF-5 0 6 . 3 5 F 1»O,YNCJD 6 . 9 0 6 . 4 0 D 8>S Y « Y a F - 2 4 3 j S X ' Y D F - l O C i t 5 . 5 0 6 . 6 0 D 5 . 6 ; T - (LOG. S C A L E I * r ; G 9 . 1 0 6 . 9 0 S D V « F C 0 M 7 , 2 , X 0 F - 8 0 , Y ) JT t 2 , 1 0 , ! ! 0 o . 9 5 0 6 . 9 5 S D V » F C 0 N ( 7 , 2 , x a F - 4 5 , Y + 1 5 ) ;T X1,SCI( I I , ! ; S Y'Y»YST 0 7 . 0 1 C SORT Y - A X I S 07.10 0 5.15S Y ' Y / 4 0 7 . 2 0 S S C L I 1 > * S C L * Y i S SCL(2 ) * S C L • Y * 4 0 7 . 2 5 S S C L ( 3 ) « i C L + Y * 9 J S SCL14)«MXY 07.30 0 5.3 0 7 . 4 0 F I.C,YNCJD 5.9 07.50 D e 13 Y»YCF-252}D 5. 5 07.60 S X«XOF-14O?S C7.70 0 5 . 6 ; T " (SORT. S C A L E > " ! ; G 9'. 1 OS. 10 0 NRfT ' " T Y P E PLOT L A B E L " ! • 08.20 s D V - F D C T I 7 ) + F C 0 M 7 , 2 , x O F » S O . YMG+75) 06. 30 s X»FRDC() 08.40 s O V = F P R C ( X ) J I ( X - 1 4 1 ) 8 . 3 , 6 . 5 , 6 . 3 08.50 R 09.01 C LA5EL X - A X I S 0 9 . 10 S SCL«PNX(S X « N D P / 4 J T ?5 09.20 F i > i . 4 i s S C L I I ) = S C L I : - : i * x 09.25 S DV»FC3N(7, , 3) 0 9 . 30 S X«X0F-8CSS Y«YGF-40 09.40 F I*C,4JO 9 . 9 09.50 S DV'FCDNI7,2,(XHG-X0F J».5*XDF-56,YCF-100) O9.fcO T "CHANNEL" ! OS. 70 S DV*FPLT(5,X0F,YOF) 09.80 G 10.1 09.90 S D V F C G N ( 7 , 2 , X , Y) ;T S C L ( I ) , ! }S X=X«-XST*2 r PLOT THE DATA! 10.01 S XSTMXMG-XOF)/NDP 10.10 10.20 10.25 10.30 10.40 10.50 11.10 11.20 11.30 D (TYP/1O*1C.6>iS J*MI\iX-l S 0V>FPLT(5,XCF,YOF) F I-O.NDP-1!0 2 S DV'FPLTI5.XMG) D NRiL I PHA S YST.(YMO-YOF)/IMXY-MNY) S YST^(YHG-YOF)/FLOG(MXY-MNY) s YST«lYMG-YOFI/FSCTIMXY-MNY) APPENDIX B LOADING AND RUNNING MCA FOCAL GENERAL INFORMATION MCA FOCAL is supplied on DEC-tape as a binary file named "MFOCAL". This fUe is actually a library file containing the programs DATBLK, FOCALM, FSUBM, and TP3005, which are described in Appendix C. An additional binary file named "FAKIT" is also supplied for use in place of the library routine "ALPHA" as described in Sec. III. The .DAT Slots used by MCA FOCAL along with recommended handler assignments are given in Table B-I. Except for the FOCAL library and DEC-tape data .DAT Slots, all .DAT Slots not required may be assigned to the console teletype (T.^A handler). TABLE B-I. MCA FOCAL .DAT SLOT USAGE I. The QDUMP region of the MCA FOCAL DEC-tape contains a core-dump of MCA FOCAL with the "standard" .DAT slot assignments shown in parentheses in the last column of Table B-l. This "Dump-file" may be loaded as described in Sec. II. The system linking-loader may be used to 14 .DAT Slot -15 -14 -4 -3 -2 -1 2 3 4 5 7 10 Usage Handler Paper tape output PPA.TTA (TTA) Paper tape input PRB.TTA (TTA) Linking loader DTE (DTE1) Teletype output TTA Teletype input TTA System library DTE (DTE0) a DEC-tape Data DTE (DTE2) FOCAL library in- DTE (DTE1) put FOCAL library out- DTE (DTE1) put Card input CDB.TTA (TTA) Plotter alphanuIPA. TTA (IPA) merics Line printer LPA.TTA (LPA) Tennecomf- file format. load the binary file MFOCAL if other than the standard I/O assignments are required. Note, however, that there is not enough core available in a 16K system for more than one I/O handler in addition to TTA, DTE, and IFA to be loaded. A method of circumventing this restriction is given in Sec. III. KM9-15 V5A $L $A DTE0 -1/DTEJ $A LPA 10/TTA LOADER VSA >P-MFOCAL,FAKIT p DATBLK 50000 P FOCALM 2 0 6 7 1 P FSUBM 1 5770 P TPJ005 14074 P FAKIT 20670 P LPA.9 20206 P CDB. 13227 P .BH 201 32 P DSQRT 20062 P DSIN 20047 P DCOS 20026 P SATAN 15214 P DEXP 11201 13160 P DLOG P PPLOT 12756 P PL0T9 12101 P .0D 12112 P .BB 12011 P .DE 11712 P .OF I I 551 P .DC I I 504 P .DA I I 415 P DOUBLE 11212 P RELEAE 10156 P ,C3 tStS "DUMP-FILE" LOAD A core-image of MCA FOCAL with standard I/O assignments may be loaded from the QDUMP area of the MCA FOCAL DEC-tape as follows: 1. Load Monitor by typing CTRL/C, or by use of the Monitor bootstrap. 2. Mount the MCA FOCAL DEC-tape on unit f 1, and turn on the REMOTE switch. 3. Turn on the line printer and place it ONLINE. III. DELETING PLOTTER ALPHANUMERICS The library routine that handles plotter alphanumerics, "ALPHA", may be replaced by the much shorter i itine "FAKIT" in order to make more core available for I/O handlers or FOCAL programs. For example, the card reader and line printer handlers may both be loaded as follows: *The initial octal starting address of MCA FOCAL is 30000 for a 16K system, 40000 for a 20K system, etc. As an alternate procedure, one could type "GET 1". and then a CTRL/S (TS) after the tape stops spinning. l , 4 , - 4 / D T E 2 2/CDB 5 7,-1 4,-1 5 SLOAD II. 4. After Monitor types a "$", type "GET 1 30000" followed by a carriage return. 5. MCA FOCAL will be loaded into core, identify itself, and type an asterisk. MCA FOCAL is now ready for use; the FOCAL library tape (if different from the MCA FOCAL tape) should be placed on DEC-tape unit 1, and a data tape placed on unit 2. MCA FOWL WITH WRD INPUT AND L I N E PH1NTER OUTPUT. " F A X I T " I S USED TO DELETE PLOTTER ALPHA NUMERICS. NOTE THAT TTA MUSI BE ASSIGNED 10 .DAT 7 . NCA FOCAL V I C • T FLOCO ,1 * 1687.0000 When FAKIT is used to replace ALPHA, any attempt to use the FOCAL function FCON will r e sult in the error message ? ?00. However, the functions FPLT and FPPL may still be used. IV. CONTROL CHARACTER USE All standard control characters, including CTRL/C. may be used with MCA FOCAL. When MCA FOCAL is initialized, the monitor bootstrap is transferred to a "save area" and the region of core normally occupied by the bootstrap is overlayed by the data area. When a CTRL/C is issued, the bootstrap is restored and Monitor is then loaded in the normal manner. 15 APPENDIX C MCA FOCAL IMPLEMENTATION I. HARDWARE REQUIREMENTS A. System Tape MCA FOCAL is designed for use on a PDP- The system tape supplied with MCA FOCAL 9, PDP-9/L, or PDP-15 computer having the fol- contains the standard DEC V5A Bank Mode Monitor, lowing minimum hardware configuration: reconfigured for use with the above hardware. All 16K Memory nonstandard library routines required by MCA ASR-33 Teletype FOCAL for plotting, e t c . , have been included in the 2 DEC-tape drives system library. EAE bler, FORTRAN IV Compiler (F4S), EDITOR, e t c . , The standard DEC MACRO assem- Real Time Clock are also on the tape. In addition, a system program Display (34H or VP15) named DAPBS is included that will load a series of Light Pen machine language data acquisition programs that Functional Control Panel (TP-1347)* are on the system tape starting at tape block 700(8). ADC Interface (TP-1517)* B. FOCALM 2 Wilkinson-type ADCs The ADC interface must be operated in the "ADD-l" mode, and the offset switches set to store data in the upper 4K of computer memory. ** In addition to the above required hardware, FOCALM is a slightly modified version of the single user FOCAL LSL interpreter. The source file of FOCALM may be conditionally assembled for use with different system configurations using the parameters listed in Table C - l . the following optional devices may also be utilized: TABLE C-I. Additional 4K memory increments CONDITIONAL ASSEMBLY PARAMETERS FOR FOCALM Line Printer Card Reader Identifier Use BANK Define BANK=2. 3, etc. for 24K, 32K, etc. systems. Default assumption is BANK=1 (16K). DEC-Disk POWER Define POWER=0 if power fail r e start is to be used. SOFTWARE REQUIREMENTS PDP15 Define PDP15=0 for use with a Page Mode PDP-15 Monitor System. DDT Define DDT=0 to use Monitor's . IOPS error routine; otherwise all . IOPS errors will be handled by FOCAL. High Speed Paper Tape Reader and Punch Incremental Plotter Power Fail Protect II. All software required for operation with the above hardware is contained in the MCA FOCAL Operating System, consisting of a System Tape and the programs FOCALM, DATBLK, FSUBM, TP3005, and FAKIT. This software is described in the following paragraphs. C. -Tennecomp Systems, Inc., Oak Ridge, Tennessee. -Interface units originally designed for 8K systems may require modifications in order to store data in the proper region of memory. DATBLK Routine DATBLK is a dummy "main pro- gram" that reserves the upper 4K of memory for data and then turns control over to FOCAL. DATBLK should be loaded into the highest available 4K memory bank. 16 D. FSUBM FS UBM contains all of the external functionsused by MCA FOCAL. New functions may be added or present functions deleted by following the procedures outlined for FNEW in Chap. VI of the FOCAL3 15 manual. E. TP3005 This routine handles the updating of the data display and interrogation of the control panel. It is entered via interrupts from the real time clock. This routine contains proprietary software developed by Tennecomp Systems, Inc., for use with their hardware, and is not generally available for systems not equipped with such hardware. However, a similar routine may be written for e /•stems not equipped with Tennecomp hardware using the following program format: /DISPLAY ROUTINE FORWT /EXTERNAL GLOBALS: .GLOBL MCA.B /STARTING ADDRESS OF DATA REGION /INTERNAL GLOBALS: .GLOBL EXEC /ENTRY POINT FOR INITIALIZATION .GLOBL CBUFR /STARTING ADDRESS OF 2 5 6 WORD OR /LARGER BUFFER FOR DISPLAY - FOCAL /USES THIS FOR DIRECTORY U S TINGS /OTHER GLOBALS AS REBUIRED FOR FUNCTIONS, ETC. EXEC XX / I N I T I A L I Z A T I O N - ENTERED ONE TIME /ONLY BY JM3* FROM FOCAL .TIMER 2,CLKTIK / S E T U P REAL TIME CLOCK / I N I T I A L I Z E VAL1ABLES, SKIP CHAIN, ETC. JM»* CLXTIK EXEC /RETURN TO FOCAL XX /CONTROL TRANSFER ED HERE EVERY CLOCK U K DAC CLKAC /SAVE AC /SAVE ANY OTHER REGISTERS USED CMQ, A U T O I N C . , ETC. / U P - D A T E THE D I S P L A Y , E T C . - MUST NOT C O N T A I N / A N Y M O N I T O R C A L S ; A L L I N T E R R U P T S FROM A D C ' S , / L I G H T P E N , E T C . HANDLED BY I N T E R R U P T / R O U T I N E S I N T H E USUAL WAY. LAW -2 DAC* (7) / R E S T O R E SAVED LAC CLKAC CLON ION DBR CLKTIK / R E S E T THE CLOCK REGISTERS / R E S T O R E AC /TURN ON THE CLOCK /TURN ON INTERRUPT I F DISABLED /RETURN TO FOCAL The appropriate sections of FSUBM must also be modified if no control panel is used, or if other than a TP-1517 ADC interface is used. F. FAKIT This routine may be used to delete plotter alphanumerics, as described in Appendix B, in order to make more memory available (about 550 words) for FOCAL programs and/or I/O handlers. KT:359(120) 17
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies