Decus: Patch to Focal-W for Linc-8 A-D Converter
Total Page:16
File Type:pdf, Size:1020Kb
/.\DECUS \ / PROGRAM LIBRARY DECUS NO. FOCAL8- 10 TITLE PATCH TO FOCAL-W FOR LINC-8 A-D CONVERTER Although this program has been tested by the contributor, no warranty, express or implied, is made by the contributor, Digital Equipment Computer Users Society or Digital Equipment Corporation as to the accuracy or functioning of the program or related program material, and no responsibility is assumed by these parties in connection therewith. PATCH TO FOCAL-W FOR LINC-8 A-D CONVERTER DECUS Program Library Write-up DECUS NO. FOCAL-10 INTRODUCTION The following patch allows FOCAL-W programs to use the LINC-8 analog-to-digital converter. Calls to the function are in the format: SET A=FADC (K) where A is any FOCAL variable, and K is the decimal number of the channel to be sampled. The function returns values in the range of -256 to $256, corresponding to minus and plus 1 volt respectively. Execution of each function call requires approximately 10 milli- seconds, limiting the maximum sampling rate to 100 SPC. Minor changes to the patch will allow the execution of any single LINC instruction (stored at LINSTR) by FOCAL programs. Such a function could be designated FNEW by placing its starting address in FNTABF 4- 15 (location 413 in TOCAL-W). /SAM PATCH FOR FOCAL /8-68. /TLN 28 FEB 69 *27 0027 5200 5200 "404 0404 5201 5201 /ADC FUNCTION EFUN31=100 INTEGER= 5 2 FLAC=44 IACF=6 17 5 ICON=6 141 ISSP=6165 IAAC= 617 1 "5201 5201 4452 XFADC, JMS I INTEGER 5202 1377 TADfalOO /SAM INST 5203 3307 DCA LINSTR 5204 4212 JMS LINCDO 5205 7200 CLA 5206 6171 IAAC 5207 3045 DCA FLAC+l 5210 4232 JMS FLOAT 5211 5500 JMP I EFUN3I /DO 1 LINC INSTR. 5212 0000 LINCDO, 0 5213 7200 CLA 5214 1376 TAD B1370 5215 6165 ISSP /SET LINC P 5216 7200 CLA 5217 1375 TAD %3 5220 6175 IACF /SET IBI 5221 7200 CLA 5222 1374 TADa10 5223 6141 ICON 5224 1373 TAD a2 5225 6141 ICON /GO DO LINSTR 5226 7000 NOP 5227 1372 TAD m-1 5230 6141 ICON /DESEL LINC 5231 5612 JMP I LINCDO /SR TO FLOAT FAC 5232 0000 FLOAT, 0 5233 3046 DCA 46 5234 1371 TAD B13 5235 3044 DCA 44 5236 4407 JMS I 7 5237 7000 FNOR 5240 0000 FEXT 5241 5632 JMP I FLOAT "5370 5370 0000 LINSTR, 0 5371 e 5372 5373 0002 5374 0010 5375 QO.Q3 5376 1370 5377 ' 10 -~ CHANGES TO FOCAL8-10 The command at locution 5203 calls for a DCA from location 5307. There is no location 5307. Secondly, there is no specific return io PDP-8 mode from the LINCDO routine. Both of these deficiencies can be corrected by the following changes and additions: 5203 3367 DCA- L f NCST R 5367 0000 LINSTR, 0 5370 0000 PDP-8 Return 5376 1367 The attached sheet is u renumbering of this program so that it can be used with FOCAL 1969. One comment should be included and that is, the questions in the initial dialogue in FOCAL should be answered with No's so that no extended functions are in memory before these patches are keyed in. /SAM PATCH FOR FOCAL /%-68 /TLN 28 FEB 69 *27 0027 5200 5200 “404 0404 5201 520? /ADC FUNCTION EFUN3 [=IO0 3 NTEGER=52 FLAC=44 iAGF=6175 ICON4141 ISSP4165 IAAC4171 *5201 5201 4452 XFADC, JMS I INTEGER 5202 1377 ”ADB 100 /SAM INST -+ 5203 3367 DCA LiNSTR 5204 421 2 JMS LINCDO 5205 7200 CLA 5206 61 71 OAAC 5207 3045 DCA FLAC+l 521 0 4232 JMS FLOAT 521 1 5500 JMP I €FUN31 /DO I LINC INSTR. 521 2 0000 LiNCDO, 0 521 3 a 7200 CLA 521 4 1376 378 521 5 61 65 ET LINC P 521 6 7200 CLA 521 7 1375 TAW3 5220 61 75 1ACF /SET 181 5221 7200 c LA 5222 1374 TAD^ IO 5223 6141 fCON 5224 1 373 TA5B2 5225 61 41 ICON /GO DO LINSTR 5226 7000 NOP 5227 1372 5230 61 41 5231 561 2 JMP I LINCDO /SR TO FLOAT FAC 5232 0000 FLOAT, 0 5233 3046 5234 1372 3 5235 3044 DCA 44 5236 4407 JMS I7 5237 7000 FNOR 5240 0000 FEXT 5241 5632 JMP I FLOAT "5370 + 53b7 0000 5370 0000 LiNSTR,Q 5371 001 3 5372 7777 5373 0002 5374 001 0 5375 0003 Ea 5376 1367 5377 01 00 /FADC PATCH,’FOCA1-1969 0035 5320 0401 5325 5321 4453 JMS I INTEGER 5322 1372 TAD ($100 5323 3362 DCA L1NSTR 5324 4332 JMS LJNCDO 5325 7X)O C LA 5326 61 71 WAC LINC ACC TO PDP-8 ACC 5327 3045 DCA FLAC+l 5330 4352 JMS FLOAT 5331 5536 JMP I EFUN3i TO FOCAL LINCBO 5332 0000 5333 7200 C LA 5334 1371 TAD@ 1362 5335 6165 ISSP SET LINC PROG COUNTER 5336 7200 c LA 5337 1370 TAD@ 3 5340 6175 JACF SET IBI 5341 7200 CLA 5342 1367 TAD@ 10 5343 6141 ICON ENABLE LING 5344 1366 TAD@ 2 5345 6141 ICON START LINC 5346 7000 NOP 5347 13165 TAD@ -1 5350 6141 ICON DESELECT LINC 5351 5732 JMP I LfNCDO FLOAT 5352 0000 5353 3046 DCA46 FLAC+2-0 5354 1364 TAD@ 13 5355 3044 DCA44 FLAC=I3 5356 4407 JMS I 7 GO TO PROC 5357 7000 FNOR NORMALIZE ANSWER 5360 0000 FEXT COME BACK 536 9 5752 JMP I FLOAT 5362 0000 LINSTR, 0 5363 OOQO LINC HALT: BACK TO PDP-8 5364 001 3 5365 7777 5366 0002 5367 001 0 5370 0003 5391 1362 5372 01 00 END .