Home » Personal collection » Acorn ADFS disks » Electron » Electrolysis.ADF » Calibrate
Calibrate
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn ADFS disks » Electron » Electrolysis.ADF |
Filename: | Calibrate |
Read OK: | ✔ |
File size: | 036F bytes |
Load address: | FFFF1D00 |
Exec address: | FFFF8023 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Personal collection » Acorn ADFS disks » Electron » Electrolysis.ADF » Calibrate
- Personal collection » Acorn hard disk » zipped_disks » elk06 » electrolys/Calibrate
File contents
5 HIMEM=&5800 10 ON ERROR CLOSE#0:REPORT:PRINT" at line ";ERL:END 20 readings=10000000 30 A$="" 40 FORpass=0 TO 2 STEP 2:P%=&5800:[OPTpass 50 LDA#0:STA&70:STA&71:STA&72:STA&73:.loop LDA#&81:LDX#&9D:LDY#&FF:JSR&FFF4:BCCsub:RTS:.sub DEC&74:LDA&74:CMP#&FF:BNEnext:DEC&75:LDA&75:CMP#&FF:BNEnext:DEC&76:LDA&76:CMP#&FF:BNEnext:RTS 60 .next LDA#&81:LDX#&8F:LDY#&FF:JSR&FFF4:BCCok:BRK:EQUB17:EQUS"Escape":BRK 70 .ok LDA#16:LDX#1:JSR&FFF4:LDA#&80:.wait LDX#0:JSR&FFF4:CPY#1:BNEwait:LDX#1:JSR&FFF4:TYA:LDY#0:CLC:ADC&70:STA&70:BCCloop:INC&71:BNEloop:INC&72:BNEloop:INC&73:JMPloop 80 ]:NEXT 90 @%=&2040A 100 INPUT"Initial temp /degC",Temp 110 File=OPENOUT("Therm"+STR$(Temp)+"C") 120 V=9:REM SUPPLY VOLTAGE 130 R=510:REM SERIES RESISTOR 140 !&74=readings 145 REPEAT UNTIL INKEY(-99)=0 150 CALL&5800 160 v=!&70/(readings-!&74)/256*1.8 170 r=v*R/(V-v) 180 Temp=Temp-.5 190 BPUT#File,INT(r*10000+.5) MOD256:BPUT#File,INT(r*10000+.5) DIV256 200 PRINT Temp,r 210 GOTO140
�=&5800 � � �#0:�:�" at line ";�:� readings=10000000 A$="" (& �pass=0 � 2 � 2:P%=&5800:[OPTpass 2� LDA#0:STA&70:STA&71:STA&72:STA&73:.loop LDA#&81:LDX#&9D:LDY#&FF:JSR&FFF4:BCCsub:RTS:.sub DEC&74:LDA&74:CMP#&FF:BNEnext:DEC&75:LDA&75:CMP#&FF:BNEnext:DEC&76:LDA&76:CMP#&FF:BNEnext:RTS <M .next LDA#&81:LDX#&8F:LDY#&FF:JSR&FFF4:BCCok:BRK:EQUB17:EQUS"Escape":BRK F� .ok LDA#16:LDX#1:JSR&FFF4:LDA#&80:.wait LDX#0:JSR&FFF4:CPY#1:BNEwait:LDX#1:JSR&FFF4:TYA:LDY#0:CLC:ADC&70:STA&70:BCCloop:INC&71:BNEloop:INC&72:BNEloop:INC&73:JMPloop P ]:� Z @%=&2040A d �"Initial temp /degC",Temp n File=�("Therm"+�(Temp)+"C") x V=9:� SUPPLY VOLTAGE � R=510:� SERIES RESISTOR � !&74=readings � � � �(-99)=0 � �&5800 �# v=!&70/(readings-!&74)/256*1.8 � r=v*R/(V-v) � Temp=Temp-.5 �8 �#File,�(r*10000+.5) �256:�#File,�(r*10000+.5) �256 � � Temp,r � �tL@ �
00000000 0d 00 05 0c 20 d3 3d 26 35 38 30 30 0d 00 0a 1f |.... .=&5800....| 00000010 20 ee 20 85 20 d9 23 30 3a f6 3a f1 22 20 61 74 | . . .#0:.:." at| 00000020 20 6c 69 6e 65 20 22 3b 9e 3a e0 0d 00 14 16 20 | line ";.:..... | 00000030 72 65 61 64 69 6e 67 73 3d 31 30 30 30 30 30 30 |readings=1000000| 00000040 30 0d 00 1e 0a 20 41 24 3d 22 22 0d 00 28 26 20 |0.... A$=""..(& | 00000050 e3 70 61 73 73 3d 30 20 b8 20 32 20 88 20 32 3a |.pass=0 . 2 . 2:| 00000060 50 25 3d 26 35 38 30 30 3a 5b 4f 50 54 70 61 73 |P%=&5800:[OPTpas| 00000070 73 0d 00 32 bb 20 4c 44 41 23 30 3a 53 54 41 26 |s..2. LDA#0:STA&| 00000080 37 30 3a 53 54 41 26 37 31 3a 53 54 41 26 37 32 |70:STA&71:STA&72| 00000090 3a 53 54 41 26 37 33 3a 2e 6c 6f 6f 70 20 4c 44 |:STA&73:.loop LD| 000000a0 41 23 26 38 31 3a 4c 44 58 23 26 39 44 3a 4c 44 |A#&81:LDX#&9D:LD| 000000b0 59 23 26 46 46 3a 4a 53 52 26 46 46 46 34 3a 42 |Y#&FF:JSR&FFF4:B| 000000c0 43 43 73 75 62 3a 52 54 53 3a 2e 73 75 62 20 44 |CCsub:RTS:.sub D| 000000d0 45 43 26 37 34 3a 4c 44 41 26 37 34 3a 43 4d 50 |EC&74:LDA&74:CMP| 000000e0 23 26 46 46 3a 42 4e 45 6e 65 78 74 3a 44 45 43 |#&FF:BNEnext:DEC| 000000f0 26 37 35 3a 4c 44 41 26 37 35 3a 43 4d 50 23 26 |&75:LDA&75:CMP#&| 00000100 46 46 3a 42 4e 45 6e 65 78 74 3a 44 45 43 26 37 |FF:BNEnext:DEC&7| 00000110 36 3a 4c 44 41 26 37 36 3a 43 4d 50 23 26 46 46 |6:LDA&76:CMP#&FF| 00000120 3a 42 4e 45 6e 65 78 74 3a 52 54 53 0d 00 3c 4d |:BNEnext:RTS..<M| 00000130 20 2e 6e 65 78 74 20 4c 44 41 23 26 38 31 3a 4c | .next LDA#&81:L| 00000140 44 58 23 26 38 46 3a 4c 44 59 23 26 46 46 3a 4a |DX#&8F:LDY#&FF:J| 00000150 53 52 26 46 46 46 34 3a 42 43 43 6f 6b 3a 42 52 |SR&FFF4:BCCok:BR| 00000160 4b 3a 45 51 55 42 31 37 3a 45 51 55 53 22 45 73 |K:EQUB17:EQUS"Es| 00000170 63 61 70 65 22 3a 42 52 4b 0d 00 46 a9 20 2e 6f |cape":BRK..F. .o| 00000180 6b 20 4c 44 41 23 31 36 3a 4c 44 58 23 31 3a 4a |k LDA#16:LDX#1:J| 00000190 53 52 26 46 46 46 34 3a 4c 44 41 23 26 38 30 3a |SR&FFF4:LDA#&80:| 000001a0 2e 77 61 69 74 20 4c 44 58 23 30 3a 4a 53 52 26 |.wait LDX#0:JSR&| 000001b0 46 46 46 34 3a 43 50 59 23 31 3a 42 4e 45 77 61 |FFF4:CPY#1:BNEwa| 000001c0 69 74 3a 4c 44 58 23 31 3a 4a 53 52 26 46 46 46 |it:LDX#1:JSR&FFF| 000001d0 34 3a 54 59 41 3a 4c 44 59 23 30 3a 43 4c 43 3a |4:TYA:LDY#0:CLC:| 000001e0 41 44 43 26 37 30 3a 53 54 41 26 37 30 3a 42 43 |ADC&70:STA&70:BC| 000001f0 43 6c 6f 6f 70 3a 49 4e 43 26 37 31 3a 42 4e 45 |Cloop:INC&71:BNE| 00000200 6c 6f 6f 70 3a 49 4e 43 26 37 32 3a 42 4e 45 6c |loop:INC&72:BNEl| 00000210 6f 6f 70 3a 49 4e 43 26 37 33 3a 4a 4d 50 6c 6f |oop:INC&73:JMPlo| 00000220 6f 70 0d 00 50 08 20 5d 3a ed 0d 00 5a 0e 20 40 |op..P. ]:...Z. @| 00000230 25 3d 26 32 30 34 30 41 0d 00 64 1f 20 e8 22 49 |%=&2040A..d. ."I| 00000240 6e 69 74 69 61 6c 20 74 65 6d 70 20 2f 64 65 67 |nitial temp /deg| 00000250 43 22 2c 54 65 6d 70 0d 00 6e 20 20 46 69 6c 65 |C",Temp..n File| 00000260 3d ae 28 22 54 68 65 72 6d 22 2b c3 28 54 65 6d |=.("Therm"+.(Tem| 00000270 70 29 2b 22 43 22 29 0d 00 78 19 20 56 3d 39 3a |p)+"C")..x. V=9:| 00000280 f4 20 53 55 50 50 4c 59 20 56 4f 4c 54 41 47 45 |. SUPPLY VOLTAGE| 00000290 0d 00 82 1c 20 52 3d 35 31 30 3a f4 20 53 45 52 |.... R=510:. SER| 000002a0 49 45 53 20 52 45 53 49 53 54 4f 52 0d 00 8c 12 |IES RESISTOR....| 000002b0 20 21 26 37 34 3d 72 65 61 64 69 6e 67 73 0d 00 | !&74=readings..| 000002c0 91 11 20 f5 20 fd 20 a6 28 2d 39 39 29 3d 30 0d |.. . . .(-99)=0.| 000002d0 00 96 0b 20 d6 26 35 38 30 30 0d 00 a0 23 20 76 |... .&5800...# v| 000002e0 3d 21 26 37 30 2f 28 72 65 61 64 69 6e 67 73 2d |=!&70/(readings-| 000002f0 21 26 37 34 29 2f 32 35 36 2a 31 2e 38 0d 00 aa |!&74)/256*1.8...| 00000300 10 20 72 3d 76 2a 52 2f 28 56 2d 76 29 0d 00 b4 |. r=v*R/(V-v)...| 00000310 11 20 54 65 6d 70 3d 54 65 6d 70 2d 2e 35 0d 00 |. Temp=Temp-.5..| 00000320 be 38 20 d5 23 46 69 6c 65 2c a8 28 72 2a 31 30 |.8 .#File,.(r*10| 00000330 30 30 30 2b 2e 35 29 20 83 32 35 36 3a d5 23 46 |000+.5) .256:.#F| 00000340 69 6c 65 2c a8 28 72 2a 31 30 30 30 30 2b 2e 35 |ile,.(r*10000+.5| 00000350 29 20 81 32 35 36 0d 00 c8 0d 20 f1 20 54 65 6d |) .256.... . Tem| 00000360 70 2c 72 0d 00 d2 0a 20 e5 8d 74 4c 40 0d ff |p,r.... ..tL@..| 0000036f