Digital PDFs
Documents
Guest
Register
Log In
DEC-8E-ALOSA-A-D
December 2000
42 pages
Original
1.8MB
view
download
Document:
dec-8e-alosa-a-d
Order Number:
DEC-8E-ALOSA-A-D
Revision:
Pages:
42
Original Filename:
https://svn.so-much-stuff.com/svn/trunk/pdp8/src/dec/dec-8e-alosa/dec-8e-alosa-a-d.pdf
OCR Text
Eflfiflflafl Functions For CS OISC digital equipment corporation ©©©©©©©fl L DEC-BE-ALOSA-A-D LAB8/E FUNCTIONS OS/8 FOR BASIC additional copies, order No. DEC-8E-ALOSA-A-D Distribution Center, Digital Equipment Corporation, 01754 Massachusetts For from Software Maynard, First Printing September, 1972 Copyright <:) 1972 by Digital Equipment Corporation The material in this tion purposes and is is document subject to for informa- change without notice. following are trademarks of Digital Equipment Corporation, Maynard, Massachusetts: The CDP Digital LAB-8/e RAD-8 Computer Lab DNC OMNIBUS RSTS Comtex Flip Chip OS/8 RSX DEC IDAC PDP RTM DECtape Indac PHA SABR Dibol KAlO PS/8 Quickpoint Typeset 8 Unibus CONTENTS Page INTRODUCTION SECTION DESCRIPTION I GENERAL II PREPARING BASIC III DEFINITION OF SAMPLE GETTING LAB8/E FOR LABB/E LAB8/E FUNCTIONS SUPPORT FUNCTIONS 12 PROGRAMS ON THE AIR WITH FUNCTION SUMMARY OS/8 BASIC 31 31 INTRODUCTION The LABS/E functions addition of solve real-time range of a using lems with the BASIC are little or of the approaching using novice programmer can solve assembly language expertise, and in A to user a real-time prob- required for specific problems effort programming enables BASIC real-time problems pseudo numerous. no 08/8 benefits The higher-level language. lems and to is prob- general, dramatically reduced. The tional to to was able This Another to each stress contains BASIC to VC8-E for of bit patterns when allows is display- masking a reading digital conversion of easy data and received decimal from decimal LAB8/E's digital input registers utilize the with the of twelve display control, digital I/O. reside understanding DK8-ES All (DR8-E's). function is the in by suitable three-character name, given functions, entire use. followed of of by user (34flfl- BASIC functions is an is regulations on arguments passed by the any necessary argu- user functions in package: 1. All arguments must lie within the following range: a:ARGUMENT_<_4 I?! 9 5 Hence, error, negative arguments (<fi) will cause FM; and positive arguments greater (>4¢95) will errors user to cause terminate the fatal program command mode. error, execution FO. and in called . General A/D and DR8—EA contained in funCtion Each a LAB8/E: a clock, area set enable on real-time in the overlay that whenever a functions which following peripherals core this Schmitt LAB8/E functions the incorporate to was the Slaving single precision design goal set a BASIC.UF, overlay called ments for func— DESCRIPTION lZ-channel buffered a maximize to was simplicity. design goals format when interfaced to the function accomplished by recognizing example, floating point converter, 4577) for feature, GENERAL 08/8 the recognition the This program of of One arrays. data into I. is utilize memory efficiently ability for devices than external events ‘firings'. data data. specifying rather flexibility computer Trigger for taken approach a fatal than Fatal return 4¢95 the Furthermore, certain functions in this package require that the arguments be further restricted. These re- 2. strictions will be stated along with the discussion each function later on. Argument errors due to these added restrictions will cause the fatal error, of (illegal argument). IA PREPARING II. (see section 10.3.2) area a System Basic Run Time The LAB8/E FOR BASIC of set made (BRTS) has of BASIC the used functions infrequently User's Manual) into three Since assembly language subroutines exists, BASIC.UF functions twelve last overlay BRTS be are given tines. order overlay Since core addresses it is that the UDEF statements will for each of appear overlay, the is It the of this that necessary subrou- user critical that links or addresses be in the these specifying last contains subroutines the determined apart from BRTS, a that same in the program that calls functions. the Consequently, before writing is last (See section 10.10 of BASIC Manual.) order of the this LAB8/E support. for list of a is divided and has logical need for a reserved. It overlay one separate overlays; user-written was for provision and BASIC.FF. BASIC.SF namely, BASIC.AF, FUNCTIONS absolutely necessary is illustrates how this the end that ordering 05/8 or current of ODT of a list of is .GET here. A set location which the names to _:bD.J the of right 1/****54¢2 3454 3473 *4 -4 -4 '% _4 '4 *I -4 .4 four to be *‘s for the response by indicates the changed with functions as the link associated with the sake used for of clarity onlyl. symbol indicates interrupts INI PLY DLY DIS SAM CLK CLW ADC GET PUT 3 that the LINE FEED of any same ‘) 15627*;** 15637**** 36¢¢ 15647**** 4¢¢¢ 15657**** 41¢¢ """156'67'*'* *"'* 3541 15677**** 3521 157§7**** 44¢¢ 157l7**** 4432 15727**;; 4271 I5737*;;* 4313 19 _._SAVE SYS BRTS.SV ) The example the at programs . ¢¢§27**** 4456 I§€77***? 34gg cates is the is test <1 BRTS.SV 1561/**** the In it functions, following example in the notice in the UDEF statements specified SYS The BRTS. Take underlined. will be A address order done. addresses the contents addresses. each the modify to these using any program DRI DRO that the RETURN key is pressed. 2 key is pressed, and the —4 symbol indi- A Since many of BASIC's warning: one is cautioned about using set of functions overlayed be to functions reside also function that will a and in overlays, cause the thereby destroy current useful any information. cannot calculate a set of cosine values and pass them to the.PLY function to be stored away, because COS resides in BASIC.AF overlay and PLY resides in BASIC.UF. EXl One EXZ- Refer to TST18A.PG at the end. Notice that the INI call of line #29 occurs after the file funcIf INI were specified instead tions were called. at line #lfl, its information would have been destroyed by the file functions. DEFINITION III. has BRTS A. Once the BASIC.UF may be written. the twelve trating the recognize BASIC Part of use it is UDEF statements B Part in function user of complete description of a set of BASIC If to must a list of defined by precede statements 1g UDEF ll UDEF reiterate a program programs rule concerning links, UDEF the requires the first (N-l) the statements defining of use of illus- the must the functions a set of the Nth function. or be: INI(N),PLY(Y),DLY(N),DIS(S,E,N,X) SAM(C,N,P,T),CLK(R,O,S),CLW(N),ADC(N) OR 1a 11. of each (N-l) Referring to the ordered list of functions in the previous section, if the ADC function is the only one to be used in a particular BASIC program, the UDEF from functions these functions. important ordered list must be EX. making the use (see NOTE of section 10.10 of the BASIC User's the functions a contains C various the very programs contains DEC-S8-LBASA-A-D). function named been modified to functions. again the FUNCTIONS overlay, Once Manual LAB8/E SUPPORT OF UDEF DUA(N),DUB(N),DUC(N),DUD(N) UDEF DUE(N) ,DUF(N) ,DUG(N) ,ADUN) Nth of dummy- However, UDEF's it each is recommended that time is recommended This is done B. FUNCTIONS l. requires one one This to solely in each of IngNz: one always the or programs The initialize Its main purpose is complete in omissions a to set of program. a minimum. illustrated in Part C. function has specified by array the functions more careless keep BASIC use a twofold purpose. to locate the address of BASIC's USE statement and the retain that address until BASIC.UF is overlayed one of the other three overlays. by secondary purpose is to set a pointer to the first location of the array. Consequently, an array may be used to store one set of data followed immediately by a second set of data, provided the INI function was called only once. This means that displayable data (10 bits), and fixed point data (12 bits) may share the user If, however, array at the user's discretion. the INI function was again specified at the end of the first data run, the first set of data is overwritten by the second set of data. Hence, INI effectively zeros the array in this case. Whenever an array is to be used in conjunction with one or more of the functions in the BASIC.UF overlay, one first dimensions the A eventually employs the array and USE statement (see section 10.8.1 of the 08/8 BASIC User‘s Manual) before the INI function can have meaning. DIM A(3) Ex. X=INI(¢) The argument N, may be N.B. 1. any INI, 1, is 2, a dummy argument, and ... Whenever the functions PLY, DIS, SAM, GET, and PUT are used, make sure that the INI function has been previously called at yleast 2. for integer; fl, once. reminder: when an array is given the dimension N, BASIC allocates (n+1) floating point words of memory which is actually 3(N+1) single memory locations. Thus, in the example above, BASIC allocates 4 floating point words or 12 single memory locations for the array. A Each data value deposited into the user's array by the user functions is a single precision value (uses one memory word). 3. 2. PLY(Y): purpose of the plot function is to enable a program to create y-data values and enter them into the user array sequentially, beginning Each with the first unused location of the array. floating point value is fixed to a ten (1g) bit single precision value before it is put into the The BASIC array. The of range the values y-data must be: ¢5y<l-¢ is This easily accomplished by inserting (Refer factor. TESTfiA.PG in Part The data in it is being passed and/or have 3. DLYgN): line numbers to be been the 26 a 64 and scaling of C.) user array can the array to be displayed (see refreshed continuously entered into the array as function) DLY once all values (see DIS function). The delay function is used only in conjunction with the PLY function. It causes the scope to be refreshed with the contents of the user array after each point is processed, so that the graphical progress of data can be observed. is an integer such that lgNglfiZ4. It specifies the maximum number of points to be eventually Implied here is the fact that the displayed. display will contain only the first N points even if the arrays contain more than N points. N BASIC programs DLY are TESTflA and 4. . in Part C PG , TESTZA . illustrating PG , TEST7A . PG , the use of TEST9A .PG TST19A.PG. The display function is used to set up DIS(S,E,N,X): parameters for the displaying of yhdata stored The display will begin with starting point, S of the array and display every Nth point while not exceeding the desired endpoint, E (where N l, 2, 3, ...). in the user the desired array. = Depending on the value of X, the DIS function has two separate operations. a. Operation when X equals zero (X=¢): Indication is given to the user-overlay-functions that a SAM function will be the next BASIC instruction. Consequently the parameters mentioned above are set up so that exactly one of the sampled To channels can be displayed 'on the fly'. .understand the use of the arguments S,E,N,X; it is necessary to know how the A/D data is stored in the user array. lflfl samples/channel in each Assume EX. CASE SAM ARRAY 2 CASE CH#g SAM CH WD6 CH#H CH#fl CH#H CH#fl CH#fi CH#E CH#3 CH#4 CH#S CH#3 CH#4 CH#S wfilgg CH#a CH#3 WDl WD2 WD3 WD4 WD5 To 1 display CASEl, case. #3,4,5 sampling begins: once ‘ DIS(1plggrlrg) To display CH#4 of CASEZ, sampling begins: once DIS(2,1¢¢,3,¢) b. Operation when X is greater than zero A user array of y-data is to be (XSfi): The display is displayed immediately. continually refreshed (no return to BASIC) until the operator types CTRL/N on the keyboard. ‘ Note 1. Displayable y-data values 1a -bit single precision be to are assumed data words. The x-coordinate for each y—data value 2. is determined by a DELTAX value found as follows: DELTAX the = 1g23/[(E—S)/N] of DELTAX, the display may not always use the full width of the scope. However, the display is always centered. Due '3. 5. SAM(C,N,P,T): to outcome 531; E35; (E-S)/Ngl¢23. one point must be than lfl24 points The displayed may be least no more disolayed. function is used sample At and solely to set 'up parameters for subsequent sampling of the ABC's or for subsequent sampling of digital (fir1,2) depending on the value input registers of a. T. TASK (T=¢): First C N l = gumber P Number of # be sampled; ¢§C§l7 8. consecutive channels to channel sample; the ADC's Sample to lfN§(2¢8—C). of sample points/channel; P#¢. Sample digital input registers. (T#g): 2 TASK b. C = First N = Number P = register # figCgZ. lgN5(3-C). samples/register; P#¢. of Number sampled; input registers consecutive of sample; to be to 1. Anytime a SAM instruction is used to sample the ABC's, exactly one channel must be displayed on the However, the sampling rate is not fly. Hence a D18 slowed down by this requirement. function call must precede a SAM function Note call whenever TASK l is chosen. It is possible to display digital input data as long as it is understood that only the least significant 1g bits will be 2. displayed. However, this data can be not displayed‘on the fly’and can only be displayed via the function DIS all once data is in the array. 6. CLK(R,O,S): used as or R(rate) The clock function for A/D sampling, = a for at which frequency of R lflfl mU'IubUJNI-d number = of the clock input clock running frequency, R. ¢§O§4¢95 the (S=¢) Do start to set separate tasks. = start not up ticks per interrupt the desired at Activate all Schmitt the clock when any one Schmitt triggers fires. (S#¢) and three activate any Schmitt triggers clock immediately. the mentioned above, used run 1M HZ triggers is to ng HZ 1¢¢K HZ (Schmitt trigger) As be HZ with the clock and to 1K HZ 0(overflow CNT) of the clock Frequency External S up digital input sampling, simple timing device. desired Value sets the this clock single for one function three clock of Sample the ADC's. TASKl: interrupts are turned onland the program waits in the display loop for a clock overflow; at which time the A/D channel(s) is (are) The display loop will display the data sampled. for the channel Specified by the user in the The When all channels have been function. sampled the requested number of times, the CLK function returns to BASIC. DIS Sample digital input registers. TASKZ: overflow, the digital input When all (are) sampled. been sampled the requested number of times, the CLK function returns each clock At register(s) is registers have BASIC. to The sampled data from the ADC's or the digital input registers is stored sequentially N.B. in the user's TASK3: array. simple timing device. A is set up and be started when a fires) and then returns The is The following are needed clock to illustrates what for each started (unless it Schmitt trigger to BASIC. sequence of instructions task. ' TASK3 TASKZ TASKl Z=CLK(R,O,S) A(n) l)IMZZ\(n) DIM IJSFilk USE A’ W=INI (I3) W=INI(g) Y=SAM(C,N,P,1) Z=CLK(R,O,S) X=DIS(C,N,P,T) Y=SAM(C,N,P,¢) Z=CLK(R,O,S) . 1When interrupts can is are turned on, the only possible valid interrupts Hence, any other interrupt by the keyboard or the clock. uncontrollable, spurious interrupt (faulty hardware) which will a HLT at location 4466. If this happens, do the following: be caused an cause a) set SWITCH switch on REGISTER to 4476 and hit the ADDR LOAD the console. ‘- b) Next, hit the CLEAR and CONT switches sole. c. on the con- This will return you to BASIC. Typing CTRL/C will return you to the 08/8 Monitor. 7. With the clock CLW(N): having been set up by CLK as a simple timer, this clock wait function, when called, simply returns to BASIC whenever a clock overflow occurs; and/or whenever a Schmitt trigger fires provided S was a non-zero argument in CLK. Upon return to BASIC, a number is returned to the caller indicating whether the return was due to a clock overflow, or a clock a Schmitt trigger, overflow and the firing of a Schmitt trigger The number also indicates simultaneously. whether one of the above conditions occurred before or after the CLW function was called. N is a dummy argument ). (N=¢,l,2 ... Below is a table illuStrating the various numbers returned. a. Case Overflow 1: Clock overflowed or a Schmitt trigger fired after CLW is called. only Q Schmitt l 2 3 4 5 6 7 b. Case 2: Clock Trigger Only (Trigger (Trigger (Trigger (Trigger (Trigger (Trigger (Trigger Simultaneously fired) fired) 1&2 fired) 4 fired) 1&4 fired) 2&4 fired) l,2&4 fired) 1 2 -1 -2 -3 —4 —5 -6 -7 overflowed or a Schmitt before CLW is called. trigger fired Overflow only Schmitt Trigger only, Simultaneously -9 9 —8 . 10 -1o 11 12 13 14 -11 -12 -13 -14 —15 15 In Part the CLW TEST4A.PG and TESTSA.PG make function. C, use of The CLW function has many useful applications. Subroutine timing may be accomplished by starting the clock with a specific rate and overflow count. The subroutine is called, and at the end of the subroutine the CLW function is called to see if This timing is an immediate return is obtained. empirical in so far as one would keep changing the rate and/or overflow count until Case 2 occurred. Secondly, Schmitt trigger firing may be used to branch to a particular subroutine or to notify the program to proceed with specific tasks such as reading digital data or sampling an analog Thirdly, time interval histograms and input. and post stimulus histograms are also possible (see TST2¢A.PG of Part C). 8. ADC(N): This function is N. floated and returned examination. any time one wishes to The 1g bit data value is to the caller for immediate issued sample A/D channel flngl78. The BASIC statement W=ADC(3) asks that channel #3 be sampled and the floating value be assigned to W. TESTSA.PG of Part C GET(M,L): one use of the function. ADC 9. illustrates A/D point function is used to get one 12 bit word from the user array, mask out certain bits and return the result as a floating point number This the to L = caller. location of the user array. Hence, if array has N single precision words, L can take on meaningful values of l,2,3,...,N. Lth Although an allows 0 to be a in a dimension statement such as DIM A(¢), it must be understood that L always begins with l, where 1 stands for the first single-word location of the Note: array. of one BASIC value meaningful Thus A(¢) specifies an array word (three one-word point floating DIM locations). M = This masking number such that fifM§4¢95. is to a converted number floating point 12 bit binary number between 0 and 7777. A Those bits that are zero will mask out or eliminate those bits in the array value. If M=¢, then no masking is done and the 12 bit array value is returned in tact. M=¢ and M=4¢95 have the same meaning. BASIC statement Y=GET(15,2) gets the second word of the user array, masks out all bits except bits 8,9,10,11 and assigns the floating point result to Y. Consequently, if an array is as follows: The single single single WD2 = MASK The = 12 WDl prec WD2 5678 1234 WD3 4455 prec prec 12348 1510 = = F1. pt. word 0 0010100111002 0000000011112 178 bit value = after masking 000000001100 Hence, is: = 2 12 10 Y=12 For user assistance in understanding decimal to octal to binary conversions one is referred to the Introduction to Programming Handbook. Note: 10 10. PUT(M,L): This function enables a be fixed to a single the user's array. to L 12 bit word For single precision words, L on meaningful values of l,2,3,...,N. array of N M Both GET and PUT functions that imply a an take can The floating point number to be fixed stored in the array. ¢§M§4¢95. = into and put location of the user's array. Lth = number floating point and user's locations, because of the general restriction on any argument array must not for these user The BASIC fix 128 exceed 4¢96 memory functions. statement Y=PUT(128,4) means bits (000 010 000 000 and put the value into the 4th word user to 12 ) 3f the array. TSTlSA.PG, TST16A.PG, TSTl7A.PG and TST18A.PG illustrate and PUT. the use functions of GET ll. DRI(N): This function is issued any time one wishes digital input register, N (figNgZ). The 12 bit digital value is returned to the as a floating point number. sample Basic is result DRO (M,N): user X=DRI(¢) means that input sampled and the floating point statement: register #fi 12. to a is assigned to X. This function is issued any time one wishes the bits of a digital output register, N(¢§N§2).. The output register bits are set If M=¢, the via the value of M (15M34g95). output register is cleared, otherwise the bits of the register remain set. Hence, additional bits of the register can be set while maintaining those set earlier. to set Basic 8 and 910 statement: Z=DRO(9,1) 11 register #1 = of output set bits if not already set. means 0000000010012 TST13A.PG and TST15A.PG illustrate the DRI and DRO functions. 11 the use of The the following kept as of set BASIC programs functions may be user simple illustrates a number of ways Each program has been implemented. possible. as It should be pointed out that for TST12A.PG, TST13A.PG and TST15A.PG a battery powered 'black box' was used to interact with the digital I/O registers. The box contained a set of 12 switches which could set any combination of bits for the digital input register, and it also contains a row of 12 lights that were lighted by the contents of the 12 bit digital output register. 0".“‘ND‘ When PROGRAM Rig- RE running TST18A.PG, the data NAMEITESTBA.PG ' UDEP INICNJoPLYtY)pDLY(NJpDIS(5pE.NaX) UDEF SAH(C:NpPpT)pCLK(RoUp5)ICLH(N)iADC(NJ UDEF GETtH.LJ.PUT(MpL)pDRI(N):DRO[H.N) DIM ACS42J REM. REM-GALE 1024 PTS 3 DISPLY ON FLYREM- NHEN DONE DISPLY EVERY 161H RT. RE"- 10 11 12 2% 22 2a 26 29 3m 32 NEXT él VPUIS(1Q132‘;‘Q.1) 49 59 51 REMRKH-CALC REM. '62 62 FOR USE A ZfllNICU) FDR NI: TO 1324 Y'lafiN'23/3071 leLYtYJ wnDLvtzoad) N 30 PTS I DISPLY ONLY 2-1N1(@) Nil T0 36 6t Yll2*N*1)161.1 66 ZIPLY(YJ 68 NEX1 N 7% VIUIS(1.30p1.1) , 8% use END 12 WHEN DONE. from TSTl7A.PG. nan. PROGRAM NAHEITESTIAhps REMuoEr INItNlnPLY(YJprvtN).DIS(3:EoN-X) uugp agncc,N,P,T).CLI(R.OaSJpCLhtNJIADCCNJ UDEF GET(M0L)pPUT(MaLJIDPICNJIDRO(HpN3 DIN At342) REM- RLM-sAHPLE CHAN a (1%24 REM-0N THE FLY. fihM-ifl INTERRUPTSISEC REM. USt A usINIIEJ WIDIS(1a1024a1.6) TIMES)! DISPLY ALL PTO xuSAM(B.1.1024,6) Y!CLK(6:IMUpE) ZIDISC1olfi24p1.1) REM- . -- REM-SAMPLE CHANNELS 0:1 (100 TIHES EACH). REM-12 INTERRUPTS/SECI DISPLY CHAN 0 wHILE $ANPLING. REM-thN DONE snow THREE DIFF DISPLYS! REM-DISPLAY CHAN aquIT AN DISPLAY CHAN Iq-HIT AN DISPLAY CHANS 6&1USE A usxhltfi) H3018(102@@p2o23 xQSAM(B.2.1@0.B) YECLKI3313303) zuDlStlpZOflvfiol) UIUIS(2920$0201) VIDIS(1u2B%n1nIJ ENU 13 PROGRAM NLHEITESTZAgPG REHI REM. UOEF UDEF uoer INICNJpPLYfY)oDLYlN):DIS(8uEIN0X) 5‘M(CINOF'T)'CLK(RIOOS)ICLu‘NJI‘DC(N) GETthpL).PUT(H.L).DRI(NJ.ORocnuN) DIM At3423 HtHo fitM-CALC A PARABOLA OF 601 P78 AND DISPLY ON FLY. RENO “HEN DONE DISPLY EVERY 1¢TH P1 OF PARABDL‘o REM. U5§ A Z’INI(0) FUR Nli3fifi TO azn YICN'NJIIDGUQQ XIPLYCY) upochbul) HEX? N V9013(1r691019013 ‘ REM. Run-BALE REM-NHEN A CUBIC OF 661 PTS I DISPLV DONE DISPLY EVERY IGTH PT- 0N FLY fitn- zllfiltfi) FOR Nn-aaa TO sac YI(N*NIN+27QOQBOQJISAfioaatfl XIPLY(YJ HIDLYtbul) NEXY . N VDUIS(1;6%1:10.1) END 14 PROGRAM REM- NAMEITE8T3‘.PG HEN. U05-P INI(N)9PLYCY3aDLYCNJoDIS(SnEaNnX) UDRF 3AMKCvNoPu73yCLKCNpOpS)ICLN(N)0ADC(N) “DEF 557("0L3oPUTIMaLJnofiltNJIDRDCHIN) 01H A(3‘2) REHRtM'ILLUSTRATE ABILITY TO ACCESS USER BUFFER. REM'PUT NUMBERS 1'10 IN TO BUF IN THAT ORDER REHDl READ THEM OUT IN THE REVERSE ORDER. REM. _ zlletaJ FGR Na! PRINT N tam TO ta RIPUT(TIN) NEXT N. FOR N91 T0 HFIION 16 PIGETKQIM) PRINT P NEXT N, END 15 ' REM’TEST‘A,PG RhM' UDIP OVG'G.6€~F INI(N)0PLYCY)pDLYCN)0013(5oEaNpX) U065 S‘H‘C.N.PJT)ICLK(R,O¢5)pCLutN)IADC(NJ UDEF GE1CMIL)DPUT(MIL,IDthNJIDRO(HIN) REF-SAMPLE CHAN a IF CLOCK 0.7. REN'SAMPLE CHAN_1 IF SCHPITT GNLY REM-SAMPLE CHAN 2 IF BOTH REH'IF EARLY; YELL UQER REHIfiUUTINE ALSO OUTPUTS FIRE Z XlCLfitao‘QEUI1’ FDR N81 TO 12 l-CLwth PRINT "Z'"ll IF 200 6070 36 IF 216 6070 24 1? 2‘8 6070 34 IF 2-8 GOTO 40 50 T0 40 IF 21-8 5070 60 H8AOC(2) GO TO 36 WPADC(U) 50 10 36 NIADCC1) ‘ PRINT H so 10 42 FRINT "EARLY" NEXT n END 16 PROGRAM REN- UDhP NAMEITESTSA.PG INIIN)nPLYtY)pDLYCN).OIS(8¢E.N.X) UDEF 8AM(C.NpPpY).CthfioflpSJgCLN(N3aADCIN) UDEF GET(N0LJ-PUT(HaL3uDRI(NJcDRO(NIN3 01h A(542) REH’ REM-USE CLK A8 A SIMPLE TIMER, REM-SAMPLE CHAN a EVERY 41H sec & PUT VAL 10 T1?RbM-DD YHIS 10 TIMES' \ REM- X’CLKC304GQOQQ) FOR 191 TO 1% YaCLHIU) Z'AECC9) PRINT 1 NEXT I Rt"- REM-USE CLK A8 A SIMPLE TIMER. REMoSAHPLE CHAN 1 TEN TIMES I SYNC OFF REM- XQCLK(4,4EOU.1) FUR Ill T0 10 YICLNCU) ZEADC(1) PRINT 2 NEXY 1 END 17 - ANY SCHMITT TRIG. REHPROGRAM NAMEITE$T7A.PG HEMUDiP INI(N)nPLYfY)uDLYINDaDIS($pEoNaXJ Una? aAM(C.N.P.TJ.CLK(R.0.SJ.CLucNJ.ADCCNJ UDE’ GET(M0LJoPUTfNoLJpDRICN)0590("0N3 DIN At342) us& A REM-DISPLAY ZFINIIBJ A TRIANGLE FUR NI: T0.36 YIN/30.! HIPLY(Y) Isl/36.1 UsPLYIZ) PIOLYtItB) NEXT N. FUR N01 TO nuam-N YUM/60.1 29 ulPLvtvl ‘ Ill/50.1 UsPLY(Z) PIDLYIIIB) NEXT N V'DISC1011801011 END 18 HEN“ REM” UDE? UDh‘ PROGRAM NANEITEQTSA.PG ' INltN)pPLY(YJaDLYtNDaDI3(5IEQNIX) 3AM(CpNoPpT)pCLKCROOISJOCLH(N)OADCCNJ DIM A(3423 fit"- REMUS‘HPLE CHAN 2 Fifi-HOWEVER REM ‘ SYNC 19% TIMES, OFF SCHHITT DISPLY; 73153- U$E A wIIhIIQJ u5018(1.10fio1.¢) X'QAMCQp1I1UUQQJ YICLK(3,16%01) ZIDIs(1p103p1'1) END . l9 tfir-OCRbtwflhfl”C'Uus‘ MIDF (IOHDKDNK)GWDO|§ 50 PROGRAM REHRE". NAHEITESTOA.PG UDEP INIKN).PLY(Y)pDLVCN).DIS(SnEoNpX) UDtF SAN(C0N09pT):CLF(R900539CLN(N)uADCCN) UDt? GET(”0L30PUT(N0LJIDRI(N)0090(H0N) 01H b(3‘2) HLMO . HtMrCALC A PARABOLA OF 4E1 PTS AND DISPLY ON FLY REM. U5: A Z!1NI(%) FUR Np-2GO TO 22a Y|(N*NJI4GDBI x-PLV(Y) NIDLY(401) Ntxw at”. ~ CUBIC OF 401 P78 I DISPLAY 0N FLY. SHOH PARABOLA TOO. DISPLY EVERY P1 I THEN EVERY tOTH PT. fitMoCALC A REM-HHEN REM- DONE FOR Np-20u TO ?0@ Yl(hiNvN+BOBfiQ?O)IIBUOOGIO x-PLYIY) HIDLY(802) NEXY N V'DISC1vBQ201p1) VIDIS(10892v1%p1) END 20 REW'TSTlflhnpfi REM. U02? IN1(~)OPLY(Y)JDLY(NJUD!3(3OEINIXJ UUIW QAHCCINIP07315LK(390083ICLH(N30ADC(N) UDEF 01". A 3 REM’THIS ROUTN RETURNS 4 DIGITQIBBITS/DIGIT USE A z-lnlcwl PfiINT "VALUE” INPUT Y ZQPUTtYnI) gEICMpLJpPUTIMoL)oDiI‘N30030CHoN) PIGETC7'1) PfiINT P FIGETK5501) PRINT 9 PlGETt‘laal) PEINT P PIGET(358411) PRINT P 50 TD 12 END 21 PROGRAM NAME TST12A.PG REHREHREM-THIS ROUTN SAMPLES DIGITAL BOARD a1 TEN TIFES REM-ONCE EVERY 4 Sit 8 PUTS THE VALUES INTO USER BUF REM-THEN IT PRINYS OUT THE 19 VALUES UDEF INILN).PLY(Y).DLYCN)ADXS(SAEINAX) UDEF 5AM(c.N.P,T).CLKCR.0.SJpCLthJaADCCN) UDEF GE!(HpL).PUT(NoLJoDPI(N)oDR°("aN3 DIM Atada) - uaE A AIINIIEJ x'3‘M(101'I001) YIELK‘3p‘UUa'E) FDR N31 10 10 HIGET‘W'NJ PRINT NEXT END N N 22 RENO PROGRA? NAMEIT$T13lng REM3 REH'TEST THE OUTPUT REG-SEE THE LIGHTS LITE UP 4 REH'DCT‘L INPUT LIGHTS THE LIGHTS AND THE LAMP? 5 REM. AN INPUT OF E CLEARS TH! CUTPUT REG 10 UUEF INI(N)IPLY(Y)aDLTCN)oDISCSonN0x) 11 UUEF SAHCCprP.T)cCLK(R.095)'CLW(N3.ADC(N) '12 UDEF GET(M:L).PUT(NaLJaDPI(N)oDRDCNaN) 1‘ N'DROCUglJ 16 PRINT "NUMBER” 1 2 15 19 20 22 5% . INVUT Y 17 T09 GOTO N’DFDCTpIJ 60 T0 15 14 END 23 gin. PROGRAM ~AMEITSY15A.PG Rthi ugep qutN),PLY(YJ.OLYCNDoDIS(3nEI~IX3 UDIF sAM(c.~.P.T).CLKthOnSJoCL"‘N’v‘°C‘N3 UDEF 5ET(M.LJ.PuttM.L)aDRItNJrD“°("vN3 01H Ata) afinn1H1S ROUTN nivunns a OIGITSIABITSIDIGIT(HA3K1N53 REM.11 FIRST ourpuws THE DECIHLL caurv 0! TH! NUNBER use A ZIIKIIB) waURICIJ PRINT n xaPuftwpxl PIGETC150‘) PRINT P PIGET(24@91) PRINT P PIG£T(5542.1) PRIkT PKINT INPUT F GO TO END 12 "WASTE TIME" R ” 24 RENO REM. PROGFAM NAME TSTIGA.PG U03? INIIN)IPLYCV)oDLYCN)p°15(SaEINOX) UDEF 3AM(CINIPOTJICkafiaoos)OCLW(N30ADC(N, UDEF GETCHOL)QPUT(N0L)IDRIIN)IOR°(H0N) DIN AC3) REM-THIS POUTN REM'A USER BUF USE A SHOWS VHAT ANY IS RETURNED AS NIECIN¢84095 PUT THE SAME ZIINI(U) "NUMBER" INPUT Y PRINT XIPUTIYII) ZFGETCUpl) PFINT 2 ' GD 70 EM) 12 25 VALUE. INTO UOVOQUNO- REHPROGHAM NAME! 78717l.P5 REM-FILL AN AERAY OF 3% WORDS NXTH THE FIRST REM-KRITE THE ARRAY OUT TO DECTAPE. UDE' INI(~)IPLY(Y)IDLY‘N)ODIS(8IEONOX) ”DE? 8‘”(CDNOP1T)ICLK(HIOUS)'CLN(N)p‘DCCN) UDEF GET(HIL)99UTCM0L)IDRICN)oDRo(”aN) DIN AC9) USE I XIIhI(w) to. . r-S FUR Nll T0 33 “woun- 0.9“} “”0” SGO‘” PRINT N XIFUTINpN) NEXT N FILEVN§:I"DTA::DA1A.PG" FDR IOU T0 9 PRINT “181(1) NEXT I CLOSE ~1 END 26 30 INTEGERS. REM PfiOGRAH NAME! TSTIBA.PG REH-fiEAo INTO AN ARRAY 10 FL PT unscao REH-hRITE OUT THE 36 INTEGER8 ON TTY UDEF 1N1(N)IPLY(Y)oDLVCN10013159EoNpX) OUOUDNDNDUOVOGN”O‘QODO$NU UDEF SAHKCoNoP.T).CLK(RpOpSJ.CLHCNJ,ADC(N) UDEF 01h 557("IL)nPUTC”vL)vDRI(~)IDROCHON) AC9) USE A FILEN ~18”DTA1!DATA.PG" IIU TO 9 INPUY 813A(I) FOR NEXT 1 CLOSE at x-watel FDR INTEGERs NI! TD 30 XIGETCUON) PRINT x NEXT N £ND 27 FROM MS) PROGRAM REMREH- uoar UutF UDtF NAME I T3119A.PG INICN),PLvtv).DLYIN).DIS(5uE.NaX) SAM(c,N,9,7),CLu(R.O.SJ.CLch).ADC(NJ GET(HpLJ.PUT(H.L)pDRI(NJpDRO(HaN) oxn Atlb) REM.SAMFLE CHAN n 52 TIMES! SYNC REM-1a INTERRUPTS/SECI NHEN DONE REM-THEN NRITE OUT DATA To DTAII OFF SCHMITT! DISPLY TILL USE A NILNI(0) N’DISCAISBrloe) XISAM(B,1,56,%) YICLK‘aplwfil‘) 2.018(‘0530:01, FILEVN #1:"DTAIISAM.DA" FUN I-m To 16 PNINT ~1:A(IJ NEXT I CLOSE #1 inn-DISPLAY A DNABOLA P!IN1(@J FDR Na-2b TO 25 Y![NON11625.1 stLv(v) NQDLYCSIJ NEXT N VIDIS(1a51.1.1) REM-RE‘D DATA BACK IN & DISPLAY FILEN A1:"DTA1¢3AM.DAI FOR 13a TO 16 IN?UT ~1:A(I) NEXT 1 CLOSE #1 NI1N1(W) IT Zlulstlofiwplpi) END 28 AS BEFORE. ANT 1 REM-PROGRAM NAMEIT8T20A.PG REMUDEP INICN),PLYTY)pDLY1N).DIS(8;E.N.X) ’ 2 3 UDKF SAHKCINIPOTJICL“(90003)OcLutNJp‘DC1N) UDEF GET1M,LJ.PuTtM.L).ORItN)pORO(M.N1 1O DI" 1(1OOJ;Y(122111(67) 11 REM-Janele 1N LATENCYtuEPOOHS TILL DONE) 12 REM-T1IBIN HIOThtTIH) 1N MSUMO/ELK O. F. 1 13 REM-T2IBIN NIOTH OF LATENOY1ICLK O.F./EPOCH1 16 PRINT "J1. T1 121" 18 INPUT J1IT1p T? ‘ 5 1'6 21 Jlfl 22 RED 23 YlCLK16nT1n1) 26 Zchwtwl 30 1F lua SOTO 10a 32 1F 21% GOTO 36 34 If Z¢8 GOTO sea 65 GO TO 56 36 1F Zt-B GOTO 292 2% 37 REM-INCR 38 39 99 1-9 GO TO 399 Rim-CLK O.F. UNDERFLO BIN O ONLYIBMP HIST SIN 131¢1 if 1¢?1OO GOTO 119 REM-END 0F TIME.BHP OVERFLO BIN 104‘XC1OOJIX(10$J¢1 192 122 195 166 109 110 1'9 HEM BHP LATENCY CTR K!K¢1 IF KctTZ GOTO 25 RLM-AN EPOOH 18 DONE 112 113 114 RIO 116 J'Jfi1 117 fiEH-ALL DONE? 118 IF JIJ1 GOTO see 119 Run-MOE: EPOCHS TO GO? 120 EU TO 25 199 fiEM-CLK O.F. AND SOHHITT 229 X11)!X(IJ¢1 292 YCJJIY1JJ¢1 204 GOTO 196 299 iEH-SCHMITT TRIO ONLY 300 x111-X(I)¢1 362 Y1J)!Y(JJ*1 564 493 499 50% TRIO TO 25 REF-GET LARGEST BIN VALUE TO REM-SCALE FACTOR FOR DISPLAY USE A GO 38: man 504 FOE 566 528 120 132 To BE USED 13 12¢ l!x(11 IF 0902 6070 516 519 0-2 516 NExT I 549 REM-SCALE ALL BIN 550 hIINllwl 551 FOR 1’6 T0 129 552 1'11!) VALUES FOR FAX 29 DISPLAY A 554 555 556 596 599 Y!Z/(G+1) k-FLvtv) 600 Gan FOR 1-0 To 188 2-Ytl) 1F 0>IZ 6010 610 BIZ NEXT 1 Rah-SCALE ALL LATENCY FOfi 1-0 To 10¢ Zlvtl) VIZ/(G01) 602 604 525 606 61! 699 700 702 704 796 705 NEXT I Rah-GE? LARGEST LATEACY VALUE To BE flan U320 As A scALE PACTUR $05 DISPLAY VALUES FUR HA! DISPLAY NSPLYKY) NEXT I fiEM-DISPLAY 'TIH' 71% 711 V!DIS(1;1$1.1.1) 712 Fin-DISPLAY 720 725 725 800 @2020? 1 LATEN§Y §a333§§pLAy 9&1; 'TIH' . 1 V‘DIS(1a2G2.1.1) END a LATENCY ‘ 30 SIDE av SIDE IV. GETTING A. ON DECtape THE OS/8 AIR WITH BASIC users: Transfer the user overlays, provided with the software BASIC.UF from the DECtape, kit to the 08/8 system device. LB PIP :SYS:BASIC.UF<DTAn:BASIC.UF/I (where n=¢,1,2,...,7) :+C ‘ B. Papertape users: Use the ABSLDR to read into core the user overlays which are in binary format on the paper tape, pro— vided with the software kit. Then create a fsave file' on the system device. .R ABSLDR EPTR:$: ._SAVE V. LABS/E FUNCTION FUNCTION INI(N) S symbolizes striking the (where sys BASIC.UF MODE key) SUMMARY EXPLANATION Locate the address of the user array the initialize a pointer to start of N is a dummy argument. PLY(Y) ALT 342121-4577 Y-data created via posited into the the user BASIC array and array. program is de-' sequentially. fi:¥<l.flg DLY(N) Used in conjunction with PLY, refreshed with the contents of after each point is processed. N specifies the maximum number be eventually displayed. DIS(S,E,N,X) the scope the user is array 15N51¢24 and of points to Meaning #1 Set up paramaters to display (X=¢). sampling begins. An array of y-data is to be Meaning #2 (X#fi). In both cases, the display displayed immediately. begins with point S of the array, and every Nth point is displayed while not exceeding the desired end point B. data ADC once ' SAM(C,N,P,T) parameters for subsequent sampling (T=¢) or sampling of digital input C is the first channel # or registers (T#¢). N is the number of input digital register #. P is consecutive channels or registers to sample. the number of samples per channel or register. Used of to set up the ADC's 31 FUNCTION CLK(R,O,S) EXPLANATION for A/D sampling, digital for use as a simple timer. R is the desired rate, 0 is the overflow count and S activates the Schmitt triggers. Set up the clock input sampling CLW(N) This or function returns to the caller number, a indicating whether the clock overflowed Schmitt trigger fired and whether these before ADC(N) This after CLW or one wishes to N. twelve (12) bit number from the user array location L is masked with the number M and returned to the caller. GET(M,L) A PUT(M,L) A is floating point number, M, and This stored in the user array at function is used any time sample DRO(M,N) a occurred called. function is issued any time sample A/D channel DRI(N) was or a digital input register The bits of digital output via the value of M. 32 at fixed to 12 bits location L. one wishes to N. register N are set HOW TO OBTAIN SOFTWARE INFORMATION Announcements for new and revised software, as well as programming notes, software problems, and documentation corrections Information Service in the following newsletters. are published by Software Digital Software News for the PDP-8 & PDP-l2 Digital Software News for the PDP-ll Digital Software News for the PDP-9/l5 Family These newsletters contain information applicable to software available from Digital's 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. problems concerning Digital's Software should be reported to Specialist. In cases where no Software Specialist is available, a Software Performance send Report form with details of the problem to: please Questions or the Software Software Information Service Digital Equipment Corporation I46 Main Street, Bldg. 3-5 Maynard, Massachusetts Ol754 These forms which are provided in the software kit should be fully filled out 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. and 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. U.S.A. customers may order directly from the Program 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. please write to: DECUS Digital Equipment Corporation I46 Main Street, Bldg. 3-5 Maynard, Massachusetts Ol754 For further information ' LAB8/E FUNCTIONS FOR 08/8 DEC-8E-ALOSA-A-D READER'S COMMENTS Digital Equipment Corporation maintains a continuous effort to improve the quality and usefulness To do this effectively we need user feedback your critical evaluation of of its publications. —- this manual. Please comment on this manual's completeness, accuracy, organization, usability. and read- ability. 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 BASIC ——————————————— ———————————— -—FoldHere--‘-—---—-———-—-————--——— Do Not Tear - Fold Here and Staple — —. — -— — — —- -— — —— -— —- — FIRST CLASS PERMIT NO. 33 MAYNARD. MASS. BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATES Postage will be paid by: Eflflfllafl Digital Equipment Corporation Software Information Services 146 Main Street, Bldg. 3-5 Maynard, Massachusetts 01754
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies