Digital PDFs
Documents
Guest
Register
Log In
DEC-LB-U70B-D
December 2000
27 pages
Original
4.1MB
view
download
Document:
dec-lb-u70b-d
Order Number:
DEC-LB-U70B-D
Revision:
Pages:
27
Original Filename:
https://svn.so-much-stuff.com/svn/trunk/pdp8/src/dec/dec-lb-u70/dec-lb-u70b-d.pdf
OCR Text
,/ user's manual digital equipment corporation BASIC/RT USER'S MANUAL For additional c opies, order DEC~LB - U7~B~D from Program Library, Bldg. 1-2, Digita l Equ ipment Corporation, Mayna rd, Ma ss. 01754 Pri ce $5. QO First Pr i nting, July 1 971 Second Printing, August 1971 Your at t ention is invited to the last two pages of this document. The "How to Obtain Software Information" page tells you how to keep up-to - date with DEC's s o ftware. The "Reader 's Comments" page, when f illed in and mailed, is beneficial to both you and DEC; a ll comments r eceived are acknowledged and are cons idered when documenting subsequent manuals . Copyright G) 1 9 71 by Digital Equipme nt Corporation The equipment descr i bed herein is covered by patents· . and patents pending. The followin g are trademarks of Digital Equi pment Corporation, Maynard , Massachusetts: DEC PDP FLIP CHIP FOCAL DIGITAL COMPUTER LAB OMNIBUS UNI BUS ,/ CONTENTS/' INTRODUCTION 1.0 SCOPE COMMANDS 1 1.1 PLOT 1 1.2 DELAY 2 1.3 CLEAR 3 1.4 DISPLAY BUFFER 3 1.5 USE 4 2.0 CLOCK COMMANDS 4 2. 1 SET RATE 5 2.2 SET CLOCK 5 .2. 3 TIM 6 2.4 WAITC 8 2. 5 CLS AND CLC 8 3.0 A/D COMMANDS 8 3.1 ADC 8 3.2 REAL TIME 8 3.3 ACCEPT AND REJECT 9 3. 4 BUFFER CAPACITY 10 3.5 ADB 10 4.0 RESPONSE COMMANDS 12 4.1 TST 12 4.2 WAIT 12 5.0 USER COMMAND {UCOM) 12 6.0 USER CODED FUNCTION 14 APPENDIX A COMMAND AND FUNCTION SUMMARY A- 1 APPENDIX B LOADING PROCEDURE B-1 APPENDIX C ERROR MESSAGES C-1 Figure 1 CLOCK ENABLE REGISTER FUNCTIONS 7 iii / INTRODUCTION BASIC/RT provides the researche r with a power fu l and complete software package for total programmable control of all LABB /e peripheral de vices: analog channels, Schmitt triggers, crystal clock and display scope. In addition, commands to specify parameters such as pulse rate and response time permit optimum experi mental flexibility. Buffer al- location commands for the disp l ay and analog channels facil i tate computer efficiency. Using the timing commands, a delay before sampling, a pause until a user response is typed on the Teletyp~, or a pause until an interrupt occurs can easily be included in a program . Another feature, the user's command, permits customized system software. Al l of the features provided by BK BASIC are also implemented in BASIC/RT, permitting total programmable I/0 control and user coded functions. The entire BASIC/RT command and function set is included in Appendix A of this manual. For additional information on BASIC fundamentals, refer to the EduSystem 10 System User's Guide; for details on 8K BASIC refer to the BK BASIC User's Manual, DEC- 08 - SKXA- D. 1.0 SCOPE COMMANDS The display scope on the LAB8/e can be programmed to plot points on its screen. Th e scope commands provide complete control for ~raP.h location and size, display time and number of points displayed . l.l PLOT When plotting on the scope, wh ich is rectangular, BASIC/RT uses these dimensions for its perimeter: ~<X<l.l .~ ~~Y<l.~ Thus, any plot must be within the above limits, which can easily be accomplished by ins e rting a sca ling factor. The PLOT command causes the appropriate point to be di spl ayed on the scope. It i s issued in the format: PLOT x,y Teletype is a registered trademark of the Te l etype Corporation . l /' where x and y are any expressions which equal the actual X and Y co ordinate s of t he point to be plotted. An acceptable sequence for p l ot- ting a straight line across the middle of the scope is: 5 B=.5 FOR A=~ TO l.l STEP PLOT A,B NEXT A 1~ 2~ 3~ -~1 • Remember that every X,Y set must be within the specified ranges. If it is not, that data set is simply not displayed. PLOT commands can also be executed as direct statements. plot a diagona l line from (.1,.1) to (1.~,1.~), Thus, to t he f o l l owing sequence c an be used: FOR L= . l TO 1.~ STEP .~~5'\..PLOT L,L,NEXT L BASIC/RT displays points on the scope when it is not doing any interna l calculations. Data is displayed, for example, while wa i t ing for i n put or outp ut. If a cal culation is required during a p lott ing se- quen ce, the da ta is not displayed until all the calculati ons are c omp l eted. Thu s, in the fo llowing example, plotting a decay i ng sine wave, the function is not displayed until a l l the points have been c a lcu l ated. 2~~ 21~ 22~ 1. 2 FOR S=~ TO l.l~ STEP .~~ 6 PLOT S, SIN(S*35)*EXP( - S*2.5)/3+.5 NEXT S DELAY BASI C/RT provides a command that will refresh t he scope after e ach c a l c ul ation so t hat the progress of the graph can be seen. This com- mand, DELAY, causes BASIC to displ ay all x,y points calcu lated up to t his statement. Thus, the decay of the sine wave above can be viewed a f ter each point is calculated by adding to the above example the command 215 DELAY The DELAY command provides the additional time for BASIC to display t h e point before continuing to the next statement. 2 1.3 / CLEAR BASIC/RT also permits e rasing the scope under program control. By in- serting the statement : CLEAR all points currently displayed are removed from the screen. Thus, if more than one plot is required by a user program and it is not necessary for them to overlap, a CLEAR command between cal culations erases the scope for the second plot. In the next example, two compounded interest sums, $400 at 7% and $450 at 6 . 25% per annum compounded yearly f o r 30 years, are plotted . If the intercept point is to be noted, then line 12¢ can be omit ted and at completion the two curves will be disp l ayed together. 1¢¢ 1~2 1~4 11~ 12~ I = - ~625 P = 4 5~ GOSUB 5~~ 15~ 5~~ STOP FOR N=l TO T X=N/35 55% 56~ 1 .4 51~ GOSUB 5¢~ CLEAR 13¢ 13 4 14¢ 51~ 52~ 53~ 54~ Lines I=.~7 P=4¢~ T=3~ Y=(P*((I+l)tN)/4~¢~) PLOT X,Y DELAY NEXT N RETURN and 52¢ inc l ude scaling factors f or the scope. DISPLAY BUFFER The technique for plotting points e mployed by BASIC/RT inc l udes c r ea ti ng a buffer in the user's area o f core to store a l l the calculate d points before they are displayed. [This buffer area is considered as a dimensioned variable; thus, executi ng the commands SCRATCH, RUN, and END removes the buffer from core. The CLEAR command does not delete the buffer, it merely e rases i ts contents.] When a PLOT command is en- countered BASIC/RT checks to see if a display buffer h a s al re ady been assigned and if not, then space sufficient for about allocated. 5%~ points is If this amount of room i s not available in core, the error message TOO BIG is p rinted. 3 1.5 / USE The area created by the PLOT command is approximately dimens i onal array. equal to a 333 - In order to conserve space , if less than a r e to be plotted, or to plot more than 5~~ 5~~ po i nts points , a b u ffe r d i mens ion- ing c ommand is provided so that core can be allocat ed opt imally. This command, USE x, is implemented as an array, as follows ( x i s a l ways a variable) : 2~ 3~ Line 3~ says : DI M P(2~~) USE P use P as a storage buffer for a futu r e PLOT command; d o not create a n addit i onal array at that time. room for about 3~~ data points 1 • Line 2~ creates enough I f a user- assigned or BAS I C/ RT gen- erat ed buffer is not large enough and overflowed dur ing exe cution, the error message TOO BIG is printed. Only one USE statement is effective for any plot sequence and, if i t is to be used, it must be issue d before t he PLOT command. The var i - ab l e associated with the USE command is ac t ive un til one o f t he buffe r remov i ng stat ements (RUN, SCRATCH, END) is encountered, but i t can be used for another purpose when not currently required for displaying. In the example in section 1.3 the maximum number o f points t o be plotted is 3~, so a considerable amount of core can be cons erved by speci fy i ng a sma l ler b u ffer. The f ollowing code can be added to opti - mize the program. l~ 2~ 2.0 DIM M(4~) USE M CLOCK COMMANDS The hardware clock provided in the LAB8/e, like all the other devi c e s, can be handled under program control t o maximize its p erformance, by specifying parameters such as pulse rate and initial pulse t i me. 1 To determine the minimum array size for point displays, cons ide r t hat each point requires two values (X and Y) and t hat every thre e values require one word of memory. To display P points an array d i mensione d for W words is necessary: W=.67(P). 4 2.1 SET RATE To set the cloc k t o interrupt at a speci f ic rate, u s e the command SET RATE mode,time wh ere mode 1 is the des i red clock speed (0 - 7 ) and t ime i s the numbe r of clock "ticks" between inte r rupts, up to 40 9 6 counts. mode value is de r ived from the next chart. mode rate 0 1 2 Stop external input 1,0- 2 seconds 10- 3 seco nds 1,0- 4 secon ds 10- 5 seconds 1,0- 6 second s Stop 3 4 5 6 7 Thus, f or t he clock The appropriate 2 to interrupt at 1 sec ond i nt erv als, a n acceptable command i s SET RATE 3, 10,00 which causes the clock to wait 1000 one msec. ti c k s. If the spec~fied clock ra t e is too fast, so that t he interrup t cannot be servi ced i n time, the error message RATE ERROR AT (line numbe r) is printed and t he clock s t opped. The line number printed is that of the s t atement cur- rently being execut ed. Not e that in t he 1 00- 20,0 ~sec elapsed total t ime ran ge BAS I C/RT is s e r - v i cin g t h e i n ter rupt correctly, but is no t execu t ing a ny BAS I C/RT commands becaus e o f t he high rate; in this c a s e, t h e processin g h as b een suspended. Type CTRL/C, wh i ch wi ll cau s e the RATE ERROR mes s age to be print ed, to restart . 2.2 SET CLOCK BASIC/RT provi des another command for setting t he clock rate for the Schmitt triggers. Its for mat is fue same as that for the SET RATE com- mand , namely 1 If an i l legal mode is requested, BASI C tri es to use the value: - 3 will be taken as 3, .,03 as ,0, e t c. 2 Refer to DKB- EP Clock Description in the PDP - 8/e Smal l Computer Handbook. 5 SET CLOCK mode.time except that mode is a 12-bit deci mal number which will be used to load the c lock enab le register 1 , thus permitting the us er to enable any function he chooses. Refer to Table l to determine t he appropriate value. The time p a rameter is specified in t he same manner as with t he SET RATE command. 2 Any time either of the SET statement s i s encount ered, the t ime c ounter i s zeroe d. Then, any t ime a clock inte rrupt occurs, this counter is incremented. ·up t o approximately 16 ,)1)1)1 ,)1)1)1 counts can occur b efore this counter rese ts itself to ze ro. 2.3 TIM At any time in the program, the current count (number o f e lap sed i n terrupts) can be determined v ia t he functi o n TI M(n ) . This fu nctio n can be u sed in conjunction wi t h any o f t he BASIC c ommands so tha t the value can be printed or the next actio n t o be perf ormed by the p ro g r am can be dependent on the count . The for mat o f the function call is TIM(n) where n is any argument (the argume nt is not checked by BASIC/ RT ). In the following pr ogra m the elapsed,time f o r the plot determines the nex t action; prin t t he count and halt or, f o r 5)1 data po ints, p ri nt the sines and th e termina ting count and then stop. In the firs t run, t he time e lap sed . table was generated. 1)1 A=l)1 2)1 SET RATE 2 ,2)1 3)1 FOR M=)1 TO l STEP .)11 4)1 PLOT M,Mt2 5)1 DELAY 6)1 NEXT M 7)1 IF A> TIM ()1) THEN 2)1)1 8)1 PRINT TIM ( 23) 9)1 STOP 2)1)1 FOR Z=)1 TO l STEP .)52 21)1 PRINT SIN(Z) 22)1 NEXT Z 23)1 PRINT TIM(C) 24)1 END 1 By changi ng line 1)1, the sine RUN 1)1 READY. 1)1 A= l 2 RUN )1 .)119998 67 .)13998933 BAS I C/RT a l ways forces the interrupt req ues t bit on . 2 The 2's comp l ement of the value of time is perfo rmed so that i t is in a f o rm suitable f or the clock. 6 • / / TABLE J CLOCK ENABLE REGISTER FUNCTIONS AC Bit Function Enables clock overf l ow to cause an interrupt . 1 & 2 3r 4 & Mode 5 ~~ Counter runs at selected rate . Overflow occurs every 4~96 counts. Flag remains set . ~l Counter runs at selected rate. Overflow causes Clock Buffer to be transferred to the Clock Counter, which continues to run. Ove rflow remains set until cleared with IOT 6135 . l~ Counter runs at selected rate . When an enabled event occurs, the Clock Counter is transferred to the Clock Buffer, and the Counter continues. ll Counter runs at selected rate. When an enabled input occurs on channe l 3, the Clock Counter is transferred to the Clock Buffer, and the Clock Counter continues to run from zero. Count Rate 111 ll~ 1~1 l~~ ~ll ~l~ ~~1 ~~~ 9, Stop l MHZ l~~ KHz l~ KHz l KHz l~~ KHz External input Stop 6 Overflow starts ADC. (When the Clock Counte r overflows, the analog-to-digital converter, type AD8-EA is started.) 7 When s et · to a l, th e Crystal Clock i s inhibited fro m generating clock pulses that incremen t the counte r. 8 Even ts in Channels l, 2, or 3 cause an interrupt re quest. 1~, & 11 Enabl e Events 1, 2, and 3 9 1~ 11 Event 3 Event 2 Event 1 • 7 2. 4 / IVAIT C / Another a pplication of the clock is t o halt progra m execution u ntil a clock inter r upt occurs . The WAITC command pe rfor ms t his function, thereby p ennitting BAS I C/RT to display on the scope while waiting f or the inte rr upt to signal continua tion of program execution . 2..5 CLS AND CLC There are two oth er f unct i ons that are used with t he Schmi tt Triggers . The first, CLS(n), obtains the status bits of the clock after the previous interrupt (those obta i ned from t h e PDP-8 CLS A (Clock Status to ACI instruction). This value can b e tested , for example, to determine how the interrupt occurred . The o t her, CLC(n), performs a CLCA (Counter to b u ffer to AC) and returns the value a s a floating point n umbe r. Refer to PDP-8/e Smal l Computer Handbook. 3.0 A/D COMMANDS 3.1 ADC Any A/D channel can be sampled at any time by using t h e si ngl e f unc tion ADC(n), whe re n is the channel numbe r , ~ to 15, to be sampled, in a direct o r indirect statement. The ADC function performs arr· i"I1U1lediate conversion; the clock, however, can b e incorpora ted so t hat sampling occurs at an estab l ishe d clock rate. In the next prog r am , BASIC/ RT wa its for a clock tick a nd t hen prints the value of the clock usi ng the TIM f u nction, and of A/D c hannels 3 and 4 for 3~~ 3 1~ 32~ 32 1 322 323 33~ 34~ 35~ 3. 2 5~ samp les . SET RATE 2,6~ FOR P=l TO 5~ WAIT C Al =ADC(3) A2=ADC(4) Tl = TIM(~) PRINT Tl,Al,A2 NEXT P STOP REAL T IME The ADC f unct i o n i s r estricted to non-time critic al work becaus e t h e fin ite amount o f t ime e l aps e d between c l ock ticks may not be s uffici en t t o p erform th e t asks reque s ted between ticks (for example, printing 3 values above) . Also, more than one channe l canno t b e samp led 8 in the same time quanta (for example, ~~mpli ng channels 3 and 4 a bove). For time cri tical operations , the REAL TIME command should be used because it provides a buffer to hold the sampled value p r ior to processing. Its format is : REAL TIME v,cl,nl,n2 where v is a subscripted variab l e to be used as the data buffer. The variable is assigned in a manner analo gous to the US E command for the scope , namely, as a dimen sioned array. Because only one value is to be taken per sample, three s amp les a re stored per buffer word. a dimension of 1~~ can store 3~~ data i tems. mensioned larger than approximately 2,2~~ po i nts. Thus, The array cannot be di - or a maximum of approx i mately 75~, The paramete r Cl is the f i rst channel to be sampled, nl is the number of cons ecut ive channels to be sampled, and n2 is the number of c lock ticks for which to sampl e . nels 1 and 2 once every millisecond for 15~ To prepare to sample chanmilliseconds, suitable code is : SET RATE 4 ,1~ DIM G(l~~) REAL TIME G, 1,2,15~ Operation of the REAL TIME command i s indepe nde n t of the BAS I C/RT statement proc essing speed; as long a s there i s su ff icient buffer space , the REAL TIME statement wi ll work. 3.3 ACCEPT AND REJECT The REAL TIME statement only creates the specified data bu f fer. To actually initiate sampling, the statement ACCEPT i s required. Then sampling will start a t the next clock tick. REAL TIME statement or the ACCEPT is ignored. There mus t be an active A REAL TIME command be- comes ina ctive whe n the clock count equal s zero. use the command REJECT. To s uspend sampling This command is also use f ul for executing subsequent REAL TIME stateme n ts. In the nex t exampl e, the ACCEPT and REJECT statements a re used to be sure sampling occ urs at the speci f i ed rate fo r only the d es i gnated number of co un t s . St a tement 5~~ stops the clock. 53~ prepares it so t hat the fir s t sample is taken after processing statement 9 54~. The / REJECT at 560 assures that after 100 coun ts no extra samples are taken at the rate o f 10 mseconds . LIST 500 SET RATE 7,0 510 DIM G(l00) 520 REAL TIME G,l,2,150 530 ACCEPT 540 SET RATE 2,10 550 IF TIM(4) < 100 THEN 550 560 REJECT 570 SET RATE 3,10 580 ACCEPT 590 END 3.4 BUFFER CAPAC ITY In the last REAL TIME example, the buffer, G, is subsc ripted to accommodate 3*100=300 items. The program, however, co uld have been required to sample a greater total number of points. If the 520 was REAL TIME G, 1,6,150 then a total of 6*150=900 items must be accommodated . To handle this variation without having to allocate large a moun ts of core as buffer space, BASIC/RT uses a ring buffer so that data can be removed from the buffer before it is overwritten by a new, incoming item. To meet this c ondition, the s ampling can be: 1. At a slow rate for a long time (consistent ti me or 2. At a f ast samp l~n g) rate for a short time . If a fast ra t e is required for a long er period, a larg e buffer can be created, provided this space is not r equi red by BASIC/RT for variables, etc. If the buffe r becomes completely ful l such that da ta is being overwritten, the message A-D FULL is printed. rate is about 4KHz or 250 ~s .; The maximum t hroughput the steady state long term ra t e i s about 50 points/second. 3.5 ADB To ret ri eve data collected by REAL TIME and ACCEP T sequence s t hat are placed in a buffer, the ADB(n) function is requir ed . Data is withd rawn from the buffer in th e same order i n which it was e n tered. Thus, if fou r A/D channels, 1 - 4 , are being sampled, the order of the data in the buffer is • 10 The argument in the ADB funct ion is ign~red. The items will be r emoved consecutively. If there is no REAL TIME or ACCEPT statement or i f there is no data remaining in the buffer (because the number of clock ticks, n2, in the REAL TIME statement had expi r ed), the error message NO A- D and a line number are printed. This example is an expansion of the one in section 3 .3 to incorpo rate the ADB function. Lines 59~ through sampled values can be printed. 5~~ 51~ 52~ 53~ 54~ 55~ 56~ 57~ 58~ 59~ 6~~ 61~ 63~ 61~ have been added so that the SET RATE 7,~ DIM G(l~~) REAL TIME G,l , 2,15~ ACCEPT SET RATE 2,1~ IF TIM(4) < l~~ THEN 55~ REJECT SET RATE 3,1~ ACCEPT FOR A=l TO 15~ PRINT ADB(l) ,ADB(2) NEXT A END The user must kee p track of the items in the bu ffer (number requested and number removed) and their ordering by channel number. In the above example there will be 75 lines printed, e ach with two data values i n the format: 1. l 2. l If line 14~ was PRINT ADB(~) ,ADB(6) ,ADB (2) , the information printed wou ld be in the order: 1. 2. 2 i+l 1 i+2 l l 1 i+3 11 4. 0 RESPONSE COMMAN OS 4.1 TST For automated environments requiring a response typed on the Teletype to determine the subsequent action, a testing function, TST(n), is available which checks the Teletype to see if a character has been typed. If i t has, a non-zero is returned; if it has not , a zero is returned. The TST function is particularly handy in conjunction with the TIM function for~ecifying a maximum response time. tion must be reset by doing a GETC function The TST func- for the TST statement to oe used more than once in a program. 4.2 WAIT If a pause time is required by a program, the WAIT command can be included in the program. terrupt occurs. BASIC/RT processing will be halted until any in- Note that a clock interrupt is sufficient to reacti - vate BASIC/RT. 5. 0 USER COMMAND [UCOM] The USER COMMAND is a feature in BASIC/RT which allows the user to insert his own code and to effective l y communicate with BASIC/RT. This command differs from the UUF funct ion in that it is more sophisticated and hence more complicated in its operat ion . differe nces: command. To briefly explain the UUF is a function, such as SIN and COS, while UCOM is a A function takes an expression in parentheses as its argu- ment and returns a value to be used later. takes 4.5 and re t urns 4.0. For exampl e, Y=INT(4.5) A command is a statement which may take arguments (such as READ or INPUT) , o r may not have any (such as CLEAR or END), or they may be optional (as with PRINT). In a function such as UUF, BASIC/RT has already evaluated the expression and left the results in the FAC before calling control over what is i n it . the function so the function has no With a command, it is up to the user code to scan and determine what is wanted. To successfully use t h is com- mand , a know l edge of PDP - 8 code and the floating point package is es sential. It is suggested that the coding for commands such as CLEAR, 12 PLOT, USE, (and any others) be studied in orde r t o understand the nature of the commands. Some brief examples a r e illustrated next to show how to insert ~me simple commands. In this example, a UCOM is created such tha t whenever it is i ssued, it will execute a 6123 (some random IOT) with the AC al l 7's. t hing to do is allocate space. The first There is room i n upper and lower core . In this case, let us overlay the EXP function with the UCOM. Put a pointer in the execute table to the location of the command. The table entry will be about location 3~6 location). (refer to a l isting for the exact Now, whenever a UCOM is given, control will trans fer to where this location points . The code wil l t h e n loo k like: *EXP CLA CMA 6123 CLA JMP I (DEVCOM /Se t the AC t o all 7's /Execute the lOT /Clear the AC /and conti nu e with BASIC The routine DEVCOM checks to s e e that the next item on the li ne is a C.R. (carriage re turn). given. If i t is not, then an e r ror message will be This is to prevent illegal user code from getting through : UCOMING HOME FOR DINNER? The previuu~ ~entence would ca l l the UCOM processor , but since the next item is not a C.R . , an error message·· would be given. There are two more routines that can be used : DEVCON and SKIPIT. DEVCON does the same thing as DEVCOM except that i t checks the p r esent item for C.R. rather than the next item. SKI PIT will skip past the rest of the line until it finds a C.R . a nd wi l l never give an error message. Now let us modify the previous exampl e . .. This time let us g i ve t wo ex- pressions and multiply the two together and t h en send out the low 12 order bits to the device via a 6123. The command would look like: UCOM A,B where A and B are any expressions. The codi ng is: l3 *EXP J MS J MS I FENTER FSTA FE XI T JMS I FE NTER FMU FE XI T J MS I CLA TAD 6123 CLA JMP I GETWD (MEVAL /ski p p a st t h e UCOM element . / e valu a te next eleme nt of line. TEMP / save a way ( MEVAL /e valuate next e lemen t of li ne . / e n te r t h e FPP package . / multip ly A*B. /exit now . /fi x t he AC n ow . /clear the AC. /p i c k u p l ow wo rd . / send to the devi ce . TEMP (FIX AC3 (DEVCON /and exit. Notice t hat the exi t is vi a DEVCON rather than DEVCOM . ~lliVAL cause Th i s is be- has evaluated the exp ress ion until it found a de l i mite r . This mu s t be a comma in the f i r st place a nd a C. R. in the s e c o nd p l ace . I f it is not, then DEVCON wil l g i ve a n e rro r mess a g e . As s t ated p re- v iously, the user should l ook at PLOT and USE a n d p erhaps a few othe r commands to full y a ppreci a te the UCOM c ommand. I t i s possible to put the UCOM code i n field l with only s ome minor c hanges. in 3~6 Since some c ommands a r e d isp a tched a gai n i n f ield 1, place a p ointer t o 7743 . (7743 i s the upper cor e dispa t cher . ) i n field l at 744, p l ace the addres s of the UCOM command cod e . UCOM , BASIC/RT will now go to t h is loc a t i o n in fi e l d l . The n , On Cros-s "field communication is done thr o ugh a var iety o f f u ncti o n s , all of which are mentioned in the i nte rnal docume n tati o n . The no v ice u s er i s a dvi sed a gainst putting i nstructions in fi e l d 1 until he has succes s f u lly r un functions and commands from field side i n field l . ~- No t e that functi ons c a n al s o re - The user should exami n e ACCEP T , T I M, and po ssibly REAL TIME to get a better un derst and ing o f cross -fi e l d c ommu ni c a tion s . It i s possible t o a l loca te mo re sp a ce i n fi e ld 1 for f unc tio ns / c ommand s by chang i ng the value o f LIMIT. core used by BASIC/RT . abou t 1 ~~~ LIMIT is t he first loc at i o n o f upper By changing PLIMIT at 25 62 to, s ay, 2~ ~~ , 8 locat i ons are g a inedbr use r f un c tio ns and commands . that t his space is lost from the use r p r og ram~ d No t e v ar iable area , but very often this is worth the s acrifice. 6. 0 USER CODED FUNCT I ON As i n 8K BASI C, the user can i nclude his o wn f unction i n BAS I C/ RT, calling it a s UUF(n), to perf orm a spe cial t a sk . 14 Th e UUF functi o n is / coded i n t he same manne r as described in t he 8K BASIC User ' s Manual , except that the s ugg e sted l ocat i ons for the code a re 0 0 6 4 to 0 177 in field 1. Other sma ll e r areas are a vai l able in fi e l d 0 a nd many more can b e c reated by delet i ng some of t he mathema tical fu n ct i ons. 15 - - -- - -- - - - - - - - - - - - - - - - APPENDIX A COMMAND AND FUNCTION SUMMARY A.l .. •• Statements ACCEPT Start A/C sampling CLEAR Erase Scope DATA Provide initial data for a program DEF Define a fu nction DELAY Display scope buffer DIM Define subscripted variables END End a prog ram FOR TO STEP Set up a program loop GOSUB Go to a subroutine GOTO Change order of program execution IF THEN Conditionally change order of program execution IF THEN nn Conditionally execute the statement nn INPUT Get variable values from the terminal LET Assign a value to a variable (LET is optional) LPT Assign line printer as output device NEXT End a program loop PLOT X,Y P lot onfue scope the point x,y PRINT Print out the ind ic ated information PTP Assi gn high speed paper tape punch as output device PTR Assign high speed paper tape reader as input device READ Initialize variables to value from the data l i st REAL TIME Create buffer fur A/D samples REJECT Stop A/D sampl ing REM Insert a program comment RESTORE Restore the data list RETURN Return from a subroutine SET CLOCK Set clock enable register SET RATE Set c lock interrupt rate STOP Stop program execution TTY IN Assig n Te letype as input device TTY OUT Assign Te letype as out put device USE Specify a d isplay buffer WAIT Pause WAITC Delay prog ram execution until next clo ck interrupt execution un til next interrupt A- 1 ,/ A. 2 Edit and Control Commands LIST List all stored program statements RUB OUTS Enable RUBOUT key NO RUBOUTS Disab l e RUBOUT key RUN Run the currently stored program SCR Delete the currently sto r ed progr am CTRLIC Stop execution and return to 8K BASIC Stop output I Resume output CTRLIO A. 3 A. 4 Functions SIN (X) Sine of x (x in radians) COS (X) Cosine of x (x in TAN (X) Tangent of x (x in radians) ATN(X) Arctangent of x EXP (X) ex= (e=2 . 718282) LOG (X) Natural log of x SGN (X) Sign of x INT (X) Integer value of x ABS (X) Absolute value of x SQR(X) Square root of x radians) (x in radians ) RND (X) Random number GET (X) Get a character PUT (X) Put a character TAB(X) Print next charac ter at space x UUF(X) User coded function (PDP-8 code) FNA(X) ADB Use r defined function (8K BASIC) Re tr l eve data from AID Buffer ADC Samp le AI D Channel CLC Obtain Trigger Counter CLS Obtain Clock Status Bits TIM Determine current clock count TST Check for character f rom Teletype Ari t hmetic Operators + Addition Subtraction * Multiplication I Division 1 Exponentiation A-2 • A.S Relational Operators In a LET (equate statement) a relational operator returns a 1 if true. 0 if false, In an IF statement, i t establishes the condition of trans- fe r . = equal to < less than =<, <= less than or equal to > greater than => 1 >= greater than or equal to < > not equal to A- 3 APPENDIX If/ LOADI NG PROCEDURE Use t he following procedure tobad BAS IC/RT. 1. Load the RI M lo ader into fi e ld l. reader may be used. Setfue data a nd instruc t i ons fields to l the EXTD ADDR LOAD key) tion. Ei t he r t he high or low s peed (use before toggling i n t he first ins truc- Note that after pressing DEP or EXAM, the LAB8/e a l ways indicates the Program Counter location, n ot l ocation, in t he upper row of l igh ts. the Memory Address To see what conten t has j ust been l oad e d , set the mul tiple register knob to MD (Memo ry Buf f er). 2. Load the BIN loader into instruction fie l d l . (Use the EXTD ADDR LOAD key to load in thi s field setting.) Steps l 3. an d 2 c an be rep l a ced by l oading the HELP Bootstrap . Read in the BASIC/RT paper tape . tion field l. ~"lhen Use data field l and instruc- loading via the BIN l oader , press START CLEAR then START CONT to i niti ate reading i n the tape . 4. I f the AC =~ ( adjust the multip l e register k nob ) after loadi ng BASIC/RT , t h e program can be s tarted . Load in~~~~ with the EXTD ADDR LOAD key then t h e start i ng add ress LOAD key. l ~~~ with t h e ADDR BASIC/RT has its own field settings punche d on the tape so i t . is not neces sary to set them i n the switches . Press START CLEAR then START CONT a n d BAS I C/ RT will indicate it is r eady . .. B-1 APEENDIX C ERROR MESSAGES The computer checks all commands before executin g t hem. reason If for some it cannot execute the command, it reports the fact by typing one of the following messages. The number of the line in which the e rror was found is also typed out . SYNTAX ERROR The command does not corr e spond to the language synt a x . Common examples of synta x errors are misspe lled commands, unmatched parentheses, and other ty pographica l e rrors . :FUNCTION ERROR A function was used which was deleted when the system was loaded and hence is not avai l able . A DEF statement will produce this error i f the DEF capacity has been deleted . TOO- BIG ERROR The combination of program and variables ex ceeds the capacity of the computer. Reducing one or the other may help. If the program has undergone extens ive revision, try punching it out, typing SCRATCH, and r eloading. SUDSCRIPT ERROR A subscript has been us ed which is o uts i de the bounds defined i n the DIM statement. LINENO ERROR A GOTO, GOSUB, or IF references a nonexistent line. FOR ERROR FOR l oops are nested too deeply . NEXT ERROR FOR and NE XT statements are not properly paired . GOSUB ERROR Subroutines are nested too deepl y . RETURN ERROR GOSUB and RETURN statements pai red. DATA ERROR There are no more items in the data line. ARGUMENT ERROR A fun ction has been given an illegal argument, for example SQR(-1). RATE ERROR Clock r a te too fast to service interrupts. A-D FULL No more room in data buffer for remaining items NO A-D No input coming fr om speci f ied analog channel. c- 1 are not properly I NDEX ACCEPT funct i on, 9, l l A/D channel samp l ing, 8 A/D comma nds, 8 ADB function, 10, ll ADC function, 8 Arithmetic operators , A-2 BIN loade r, B-1 Buffer capacity, 10 Channel sampling, 8 CLC function, 8 CLEAR command, 3 Clock commands, 4 Clock enable r egister functions, 7 CLS function, 8 Commands, clock, 4 definition , 12 edit and con trol, A-2 response, 12 scope, l summary of, A- 1 use r , 12 Commands (summary in Appendix A) CLEAR, 3 DELAY, 2 END , 3,4 PLOT, l , 4 REAL TIME 8 REJECT, 9 RUN, 3,4 SCRATCH, 3I 4 SET CLOCK, 5 SET RATE, 5 USE, 4, 9 WAIT, 12 WAITC, 8 Coordinates of poin t , 2 Cross field communication, 14 I DELAY command, 2 DEVCOM routine, 13 DEVCON routine, 13 Dimensions of scope, Display buffe r, 3 Display time, l Function clock enab l e register, 7 definiti on, 12 summary A-1 user coded, 14 Functions (summary in Appendix A) ACCEPT, 9 ADB, 10, l l 8 CLC, CLS, 8 EXP I 13 REJECT , 9 TIM, 6, 8 TST·, 12 UUF, 14 GETC statement, Gr aphs, l 12 Loading procedure, B- 1 Operat ors, A- 2, A-3 Perimeter d i mensi ons of scope, PLOT command, l , 4 P l ottinq, l Points coordinates, 2 displayed, number of, 2 plotting, 3 RATE ERROR error message, 5 REAL TIME command, 8, 9 REAL TIME statement, ll refreshing s cope , 2 REJ ECT comman d, 9 Relationa l operators, A- 3 Response commands, 12 RIM loader, B-1 Routi nes DEVCOM, 13 DEVGON, 13 SKIP IT, 13 RUN command, 3, 4 l Sampling A/D channel, Edit and cont r o l commands, A- 2 rate, 10 Scaling fac tor, l END command, 3, 4 Schmitt triggers, 8 Erasing scope, 3 Error message (summary in Appendix C) Scope commands, l RATE ERROR, 5 eras i ng, 3 TOO BIG, 3, 4 refreshing, 2 EXP function, 13 I-1 8, 9 l - - - - - -- - - - - - - - - - - / / SCRATCH command, 3, 4 SET CLOCK command, 5 SET RATE command , 5 SKIPIT routine , 13 Statement, GETC , 12 Statement summary, A- 1 Summary, commands and functions , UCOM command code, 1 2 , 1 3, 14 USE command, 4, 9 User coded fun ction, 14 User command, 12 UUF function, 12, 14 A-1 WAIT command, 12 WAITC command, 8 TIM function, 6, 8 TOO BIG error message, TST function, 12 3, 4 X,Y coordinates, I- 2 2
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies