Home » Personal collection » Acorn tapes » Commercial_Releases » boxed_acornsoft_tape13a_acorn_bbc_welcome_cassette.wav » CALCULATOR
CALCULATOR
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 tapes » Commercial_Releases » boxed_acornsoft_tape13a_acorn_bbc_welcome_cassette.wav |
Filename: | CALCULATOR |
Read OK: | ✔ |
File size: | 14CF bytes |
Load address: | FFFF0E00 |
Exec address: | FFFF8000 |
File contents
10 REM CALCULATOR 12 REM Program by Tim Dobson (ACORNSOFT) and Richard G Warner 14 REM For BBC Model A Microcomputer 16K Minimum 40 ON ERROR GOTO50 50 MODE7:IF M%=0 THEN PRINTTAB(5,16);"Press the STOP button"'" on your tape recorder":PROCSPACE 60 CLS:ON ERROR GOTO800 100 PROCTITLEPAGE 110 PROCINITIALISE 120 PROCINSTRUCTIONS 200 PROCSCREEN 210 PRINTTAB(7,4);"Enter your expression now" 220 V%=0:B$="":IN%=0:@%=0 300 VDU26:IF MEM$>"" THEN PRINTTAB(12,20);"Memories in use"''MEM$ 310 VDU28,0,19,39,5:PROCON 320 PRINTTAB(0,V%);" ] ";B$; 330 PROCGETLINE:PROCOFF 340 IF KEY%=130 THEN 200 350 B=FNEVAL(B$) 400 B$=STR$(B):F%(0)=LEN(B$):f%(0)=LEN(B$) 410 PRINT:IN%=1:V%=VPOS:GOTO300 800 IF ERR=17 THEN 900 810 IF ER$="" THEN REPORT ELSE PRINT'ER$; 820 GOTO400 900 VDU26:CLS 910 PRINTTAB(5,9); 920 PRINT"Do you want to go on to" 930 PRINT" the next program (Y/N)? "; 940 PROCYN:IF Y%<0 THEN 910 950 IF Y%=0 THEN 200 970 CLS:IF M%=0 THEN PRINTTAB(5,5);"Press the PLAY button"'" on your tape recorder" 990 CHAIN"" 1000 DEFPROCGETLINE 1200 KEY%=GET:IF KEY%=130 OR KEY%=13 THEN 1999 1210 IF KEY%<>127 THEN 1300 1220 IF IN%=0 THEN 1200 1230 IN%=IN%-1 1240 FORJ%=1TOF%(IN%):PRINTCHR$(&7F);:NEXT 1250 B$=LEFT$(B$,LEN(B$)-f%(IN%)):GOTO1200 1300 IF LEN(B$)>69 OR KEY%<32 THENVDU7:GOTO1200 1310 KEY$=CHR$(KEY%):key$=KEY$ 1320 I%=INSTR(";:=?[]{}`_",KEY$):IF I%>0 THEN KEY$=MID$("+*-/()()--",I%,1):key$=KEY$ 1330 IF KEY%>127 THEN KEY%=KEY%-127:KEY$=FUNC$(KEY%):key$=func$(KEY%) 1340 F%(IN%)=LEN(KEY$):f%(IN%)=LEN(key$) 1350 IN%=IN%+1:PRINTKEY$;:B$=B$+key$:GOTO1200 1999 ENDPROC 2000 DEFFNEVAL(Z$) 2010 LOCAL X,Y%,Z% 2020 IF ASC(Z$)=32 THEN Z$=MID$(Z$,2):GOTO2020 2030 IF Z$="" THEN =0 2040 FLAG%=0 2100 REM Check for INV 2110 Z%=INSTR(Z$,CHR$&89):IF Z%=0 THEN 2200 2120 REM Check for SIN 2130 IF MID$(Z$,Z%+1,3)=func$(6) THEN Z$=LEFT$(Z$,Z%-1)+" ASN"+MID$(Z$,Z%+4):GOTO2110 2140 REM Check for COS 2150 IF MID$(Z$,Z%+1,3)=func$(7) THEN Z$=LEFT$(Z$,Z%-1)+" ACS"+MID$(Z$,Z%+4):GOTO2110 2160 REM Check for TAN 2170 IF MID$(Z$,Z%+1,3)=func$(8) THEN Z$=LEFT$(Z$,Z%-1)+" ATN"+MID$(Z$,Z%+4):GOTO2110 2180 ER$="INV without SIN,COS or TAN":ERROR 2200 REM Check for RECALL 2210 Z%=INSTR(Z$,CHR$&82):IF Z%=0 THEN 2300 2220 ER$="Number after RECALL out of range" 2230 Y%=EVAL(MID$(Z$,Z%+1,1)):IF Y%<0 OR Y%>9 THEN ERROR 2240 X=STORE(Y%) 2250 Z$=LEFT$(Z$,Z%-1)+STR$(X)+MID$(Z$,Z%+2):GOTO2210 2300 REM Check for STORE 2310 Z%=INSTR(Z$,CHR$&81):IF Z%=0 THEN2400 2320 ER$="Invalid expression after STORE" 2330 Y%=EVAL(MID$(Z$,Z%+1)):IF Y%<0 OR Y%>9 THEN ERROR 2340 ER$="Invalid expression before STORE" 2350 X=EVAL(LEFT$(Z$,Z%-1)) 2360 STORE(Y%)=X:Y$=STR$(Y%):IF MEM$="" THEN 2380 2370 IF INSTR(MEM$,Y$)>0 THEN 2390 2380 MEM$=MEM$+" "+Y$ 2390 =X 2400 ER$="":=EVAL("0+"+Z$) 5000 DEFPROCINITIALISE 5010 DIM FUNC$(10),func$(10),STORE(9),F%(79),f%(79) 5030 DATA" STORE "," RECALL "," CLEAR ","%","SQR ","SIN ","COS ","TAN ","INV ","^" 5040 DATA"/100","SQR","SIN","COS","TAN" 5050 FORI%=1TO10:READ FUNC$(I%):NEXT 5060 FORI%=1TO10:func$(I%)=CHR$(128+I%):NEXT 5070 FORI%=4TO8:READ func$(I%):NEXT 5080 func$(10)="^" 5100 MEM$="" 5200 *KEY 0 "|!|@" 5210 *KEY 1 "|!|A" 5220 *KEY 2 "|!|B" 5230 *KEY 3 "|!|C" 5240 *KEY 4 "|!|D" 5250 *KEY 5 "|!|E" 5260 *KEY 6 "|!|F" 5270 *KEY 7 "|!|G" 5280 *KEY 8 "|!|H" 5290 *KEY 9 "|!|I" 5299 ENDPROC 6000 DEFPROCINSTRUCTIONS 6010 PROCSCREEN 6020 PRINT'" This program converts your"'" computer into a simple calculator."' 6030 PRINT''" The program makes available the" 6040 PRINT" keys 1 - 0 and the full stop key" 6050 PRINT" to enter numbers."'' 6060 PRINT" The keystrokes +, -, *, / are" 6070 PRINT" used for the operations of"'" addition, subtraction," 6080 PRINT" multiplication and division"'" respectively." 6090 PROCSPACE 6100 PROCSCREEN 6110 PRINT'" The calculator operates in"'" algebraic mode, that is, you can" 6120 PRINT" type in an expression just as you"'" would write it."' 6130 PRINT" However, multiplication and"'" division take precedence over" 6140 PRINT" addition and subtraction, so that"'" for example :"' 6150 PRINTSPC(10)"3/4+5*7.1-6/.2"''SPC(8)"is interpreted as"' 6160 PRINTSPC(7)"(3/4)+(5*7.1)-(6/.2)" 6190 PROCSPACE 6200 PROCSCREEN 6210 PRINT''" Round brackets ( ) are"'" available to override the order of" 6220 PRINT" execution."'' 6230 PRINT" Anything in brackets is worked"'" out before anything else."'' 6240 PRINT" The innermost brackets are"'" evaluated first."' 6290 PROCSPACE 6300 PROCSCREEN 6310 PRINT'" In this program the red"'" user-definable keys have special" 6320 PRINT" functions, which are:-"' 6330 PRINT" f0 - STORE"'" f1 - RECALL"'" f2 - CLEAR"'" f3 - %" 6340 PRINT" f4 - SQR (square root)"'" f5 - SIN (sine of radian angle)" 6350 PRINT" f6 - COS (cosine of radian angle)"'" f7 - TAN (tangent of radian angle)" 6360 PRINT" f8 - INV (for inverse"'TAB(13)"trigonometric functions)" 6370 PRINT" f9 - ^ (raise to power)" 6390 PROCSPACE 6400 PROCSCREEN 6410 PRINT'" The calculator has ten"'" ""memories"", numbered from 0 to 9" 6420 PRINT" in each of which can be stored a"'" number."'' 6430 PRINT" To store the result of a"'" calculation in a memory, just" 6440 PRINT" enter the expression and then"'" press key f0 (STORE) followed by" 6450 PRINT" a number from 0 to 9."'''" To recall the contents of a"'" memory, press key f1 ( RECALL )" 6460 PRINT" followed by a number from 0 to 9." 6490 PROCSPACE 6499 ENDPROC 7000 DEFPROCSCREEN 7020 VDU26:CLS 7030 PROCDBL("Calculator Program",10,1) 7089 REMVDU28,0,24,39,3 7099 ENDPROC 8000 DEFPROCDBL(X$,X,Y) 8010 PRINTTAB(X-1,Y);CHR$(141);X$ 8020 PRINTTAB(X-1,Y+1);CHR$(141);X$ 8099 ENDPROC 8100 DEFPROCWAIT(X) 8110 LOCAL Z 8120 Z=TIME 8130 REPEAT UNTIL TIME-Z>X*100 8199 ENDPROC 8200 DEFPROCSPACE 8220 PRINTTAB(3,22);"Press the SPACE BAR to continue";:PROCKCL:PROCOFF 8240 REPEAT UNTIL GET$=" " 8299 ENDPROC 8300 DEFPROCTITLEPAGE 8310 CLS:PROCDBL("CALCULATOR",13,10) 8320 PROCOFF:I%=INKEY(500) 8399 ENDPROC 8800 DEFPROCKCL 8810 REPEAT UNTIL INKEY(0)=-1 8899 ENDPROC 8900 DEFPROCOFF 8910 VDU23;8202;0;0;0;:ENDPROC 8950 DEFPROCON 8960 VDU23;29194;0;0;0;:ENDPROC 9200 DEFPROCYN 9210 Y%=-1 9220 X%=GET:IF X%=13 AND Y%>=0 THENENDPROC 9230 X%=X%AND&DF:IFX%<>78ANDX%<>89THEN9220 9240 Y%=1:IFX%=78THENY%=0 9250 PRINTCHR$X%;CHR$8;:GOTO9220
� CALCULATOR = � Program by Tim Dobson (ACORNSOFT) and Richard G Warner 0 � For BBC Model A Microcomputer 16K Minimum ( � � �Tr@ 2T �7:� M%=0 � �5,16);"Press the STOP button"'" on your tape recorder":�SPACE < �:� � �T`C d �TITLEPAGE n �INITIALISE x �INSTRUCTIONS � �SCREEN �' �7,4);"Enter your expression now" � V%=0:B$="":IN%=0:@%=0 ,5 �26:� MEM$>"" � �12,20);"Memories in use"''MEM$ 6 �28,0,19,39,5:�ON @ �0,V%);" ] ";B$; J �GETLINE:�OFF T � KEY%=130 � �dH@ ^ B=�EVAL(B$) �$ B$=�(B):F%(0)=�(B$):f%(0)=�(B$) � �:IN%=1:V%=�:�TlA � �=17 � �tDC * � ER$="" � � � �'ER$; 4 �tPA � �26:� � �5,9); � �"Do you want to go on to" �& �" the next program (Y/N)? "; � �YN:� Y%<0 � �tNC � � Y%=0 � �dH@ �K �:� M%=0 � �5,5);"Press the PLAY button"'" on your tape recorder" � �"" � ��GETLINE �' KEY%=�:� KEY%=130 � KEY%=13 � �dOG � � KEY%<>127 � �TTE � � IN%=0 � �tpD � IN%=IN%-1 � �J%=1�F%(IN%):�(&7F);:� � B$=�B$,�(B$)-f%(IN%)):�tpD # � �(B$)>69 � KEY%<32 ��7:�tpD KEY$=�(KEY%):key$=KEY$ (G I%=�";:=?[]{}`_",KEY$):� I%>0 � KEY$=�"+*-/()()--",I%,1):key$=KEY$ 2A � KEY%>127 � KEY%=KEY%-127:KEY$=FUNC$(KEY%):key$=func$(KEY%) <$ F%(IN%)=�(KEY$):f%(IN%)=�(key$) F& IN%=IN%+1:�KEY$;:B$=B$+key$:�tpD � � � ݤEVAL(Z$) � � X,Y%,Z% �! � �(Z$)=32 � Z$=�Z$,2):�ddG � � Z$="" � =0 � FLAG%=0 4 � Check for INV > Z%=�Z$,�&89):� Z%=0 � �tXH H � Check for SIN RA � �Z$,Z%+1,3)=func$(6) � Z$=�Z$,Z%-1)+" ASN"+�Z$,Z%+4):�T~H \ � Check for COS fA � �Z$,Z%+1,3)=func$(7) � Z$=�Z$,Z%-1)+" ACS"+�Z$,Z%+4):�T~H p � Check for TAN zA � �Z$,Z%+1,3)=func$(8) � Z$=�Z$,Z%-1)+" ATN"+�Z$,Z%+4):�T~H �' ER$="INV without SIN,COS or TAN":� � � Check for RECALL � Z%=�Z$,�&82):� Z%=0 � �d|H �+ ER$="Number after RECALL out of range" �( Y%=�(�Z$,Z%+1,1)):� Y%<0 � Y%>9 � � � X=STORE(Y%) �& Z$=�Z$,Z%-1)+�(X)+�Z$,Z%+2):�tbH � � Check for STORE Z%=�Z$,�&81):� Z%=0 ��D`I ) ER$="Invalid expression after STORE" & Y%=�(�Z$,Z%+1)):� Y%<0 � Y%>9 � � $* ER$="Invalid expression before STORE" . X=�(�Z$,Z%-1)) 8* STORE(Y%)=X:Y$=�(Y%):� MEM$="" � �DLI B � �MEM$,Y$)>0 � �DVI L MEM$=MEM$+" "+Y$ V =X ` ER$="":=�("0+"+Z$) � ��INITIALISE �1 � FUNC$(10),func$(10),STORE(9),F%(79),f%(79) �O �" STORE "," RECALL "," CLEAR ","%","SQR ","SIN ","COS ","TAN ","INV ","^" �$ �"/100","SQR","SIN","COS","TAN" � �I%=1�10:� FUNC$(I%):� �# �I%=1�10:func$(I%)=�(128+I%):� � �I%=4�8:� func$(I%):� � func$(10)="^" � MEM$="" P *KEY 0 "|!|@" Z *KEY 1 "|!|A" d *KEY 2 "|!|B" n *KEY 3 "|!|C" x *KEY 4 "|!|D" � *KEY 5 "|!|E" � *KEY 6 "|!|F" � *KEY 7 "|!|G" � *KEY 8 "|!|H" � *KEY 9 "|!|I" � � p ��INSTRUCTIONS z �SCREEN �R �'" This program converts your"'" computer into a simple calculator."' �/ �''" The program makes available the" �+ �" keys 1 - 0 and the full stop key" � �" to enter numbers."'' �+ �" The keystrokes +, -, *, / are" �A �" used for the operations of"'" addition, subtraction," �9 �" multiplication and division"'" respectively." � �SPACE � �SCREEN �O �'" The calculator operates in"'" algebraic mode, that is, you can" �B �" type in an expression just as you"'" would write it."' �L �" However, multiplication and"'" division take precedence over" �@ �" addition and subtraction, so that"'" for example :"' 5 �(10)"3/4+5*7.1-6/.2"''�(8)"is interpreted as"' �(7)"(3/4)+(5*7.1)-(6/.2)" . �SPACE 8 �SCREEN BP �''" Round brackets ( ) are"'" available to override the order of" L �" execution."'' VM �" Anything in brackets is worked"'" out before anything else."'' `C �" The innermost brackets are"'" evaluated first."' � �SPACE � �SCREEN �O �'" In this program the red"'" user-definable keys have special" �" �" functions, which are:-"' �B �" f0 - STORE"'" f1 - RECALL"'" f2 - CLEAR"'" f3 - %" �F �" f4 - SQR (square root)"'" f5 - SIN (sine of radian angle)" �T �" f6 - COS (cosine of radian angle)"'" f7 - TAN (tangent of radian angle)" �? �" f8 - INV (for inverse"'�13)"trigonometric functions)" �$ �" f9 - ^ (raise to power)" � �SPACE �SCREEN P �'" The calculator has ten"'" ""memories"", numbered from 0 to 9" : �" in each of which can be stored a"'" number."'' Q �" To store the result of a"'" calculation in a memory, just" (Q �" enter the expression and then"'" press key f0 (STORE) followed by" 2r �" a number from 0 to 9."'''" To recall the contents of a"'" memory, press key f1 ( RECALL )" <- �" followed by a number from 0 to 9." Z �SPACE c � X ��SCREEN l �26:� v$ �DBL("Calculator Program",10,1) � �VDU28,0,24,39,3 � � @ ��DBL(X$,X,Y) J �X-1,Y);�(141);X$ T �X-1,Y+1);�(141);X$ � � � ��WAIT(X) � � Z � Z=� � � � �-Z>X*100 � ��SPACE 9 �3,22);"Press the SPACE BAR to continue";:�KCL:�OFF 0 � � �=" " k � l ��TITLEPAGE v �:�DBL("CALCULATOR",13,10) � �OFF:I%=�(500) � � "` ��KCL "j � � �(0)=-1 "� � "� ��OFF "� �23;8202;0;0;0;:� "� ��ON # �23;29194;0;0;0;:� #� ��YN #� Y%=-1 $ X%=�:� X%=13 � Y%>=0 �� $" X%=X%�&DF:�X%<>78�X%<>89��TDd $ Y%=1:�X%=78�Y%=0 $" �X%;�8;:�TDd �
00000000 0d 00 0a 11 20 f4 20 43 41 4c 43 55 4c 41 54 4f |.... . CALCULATO| 00000010 52 0d 00 0c 3d 20 f4 20 50 72 6f 67 72 61 6d 20 |R...= . Program | 00000020 62 79 20 54 69 6d 20 44 6f 62 73 6f 6e 20 28 41 |by Tim Dobson (A| 00000030 43 4f 52 4e 53 4f 46 54 29 20 61 6e 64 20 52 69 |CORNSOFT) and Ri| 00000040 63 68 61 72 64 20 47 20 57 61 72 6e 65 72 0d 00 |chard G Warner..| 00000050 0e 30 20 f4 20 46 6f 72 20 42 42 43 20 4d 6f 64 |.0 . For BBC Mod| 00000060 65 6c 20 41 20 4d 69 63 72 6f 63 6f 6d 70 75 74 |el A Microcomput| 00000070 65 72 20 31 36 4b 20 4d 69 6e 69 6d 75 6d 0d 00 |er 16K Minimum..| 00000080 28 0e 20 ee 20 85 20 e5 8d 54 72 40 0d 00 32 54 |(. . . ..Tr@..2T| 00000090 20 eb 37 3a e7 20 4d 25 3d 30 20 8c 20 f1 8a 35 | .7:. M%=0 . ..5| 000000a0 2c 31 36 29 3b 22 50 72 65 73 73 20 74 68 65 20 |,16);"Press the | 000000b0 53 54 4f 50 20 62 75 74 74 6f 6e 22 27 22 20 20 |STOP button"'" | 000000c0 20 20 20 6f 6e 20 79 6f 75 72 20 74 61 70 65 20 | on your tape | 000000d0 72 65 63 6f 72 64 65 72 22 3a f2 53 50 41 43 45 |recorder":.SPACE| 000000e0 0d 00 3c 10 20 db 3a ee 20 85 20 e5 8d 54 60 43 |..<. .:. . ..T`C| 000000f0 0d 00 64 0f 20 f2 54 49 54 4c 45 50 41 47 45 0d |..d. .TITLEPAGE.| 00000100 00 6e 10 20 f2 49 4e 49 54 49 41 4c 49 53 45 0d |.n. .INITIALISE.| 00000110 00 78 12 20 f2 49 4e 53 54 52 55 43 54 49 4f 4e |.x. .INSTRUCTION| 00000120 53 0d 00 c8 0c 20 f2 53 43 52 45 45 4e 0d 00 d2 |S.... .SCREEN...| 00000130 27 20 f1 8a 37 2c 34 29 3b 22 45 6e 74 65 72 20 |' ..7,4);"Enter | 00000140 79 6f 75 72 20 65 78 70 72 65 73 73 69 6f 6e 20 |your expression | 00000150 6e 6f 77 22 0d 00 dc 1a 20 56 25 3d 30 3a 42 24 |now".... V%=0:B$| 00000160 3d 22 22 3a 49 4e 25 3d 30 3a 40 25 3d 30 0d 01 |="":IN%=0:@%=0..| 00000170 2c 35 20 ef 32 36 3a e7 20 4d 45 4d 24 3e 22 22 |,5 .26:. MEM$>""| 00000180 20 8c 20 f1 8a 31 32 2c 32 30 29 3b 22 4d 65 6d | . ..12,20);"Mem| 00000190 6f 72 69 65 73 20 69 6e 20 75 73 65 22 27 27 4d |ories in use"''M| 000001a0 45 4d 24 0d 01 36 16 20 ef 32 38 2c 30 2c 31 39 |EM$..6. .28,0,19| 000001b0 2c 33 39 2c 35 3a f2 4f 4e 0d 01 40 18 20 f1 8a |,39,5:.ON..@. ..| 000001c0 30 2c 56 25 29 3b 22 20 20 20 5d 20 22 3b 42 24 |0,V%);" ] ";B$| 000001d0 3b 0d 01 4a 12 20 f2 47 45 54 4c 49 4e 45 3a f2 |;..J. .GETLINE:.| 000001e0 4f 46 46 0d 01 54 16 20 e7 20 4b 45 59 25 3d 31 |OFF..T. . KEY%=1| 000001f0 33 30 20 8c 20 8d 64 48 40 0d 01 5e 10 20 42 3d |30 . .dH@..^. B=| 00000200 a4 45 56 41 4c 28 42 24 29 0d 01 90 24 20 42 24 |.EVAL(B$)...$ B$| 00000210 3d c3 28 42 29 3a 46 25 28 30 29 3d a9 28 42 24 |=.(B):F%(0)=.(B$| 00000220 29 3a 66 25 28 30 29 3d a9 28 42 24 29 0d 01 9a |):f%(0)=.(B$)...| 00000230 17 20 f1 3a 49 4e 25 3d 31 3a 56 25 3d bc 3a e5 |. .:IN%=1:V%=.:.| 00000240 8d 54 6c 41 0d 03 20 12 20 e7 20 9f 3d 31 37 20 |.TlA.. . . .=17 | 00000250 8c 20 8d 74 44 43 0d 03 2a 1a 20 e7 20 45 52 24 |. .tDC..*. . ER$| 00000260 3d 22 22 20 8c 20 f6 20 8b 20 f1 27 45 52 24 3b |="" . . . .'ER$;| 00000270 0d 03 34 0a 20 e5 8d 74 50 41 0d 03 84 0a 20 ef |..4. ..tPA.... .| 00000280 32 36 3a db 0d 03 8e 0c 20 f1 8a 35 2c 39 29 3b |26:..... ..5,9);| 00000290 0d 03 98 1f 20 f1 22 44 6f 20 79 6f 75 20 77 61 |.... ."Do you wa| 000002a0 6e 74 20 74 6f 20 67 6f 20 6f 6e 20 74 6f 22 0d |nt to go on to".| 000002b0 03 a2 26 20 f1 22 20 20 20 20 20 74 68 65 20 6e |..& ." the n| 000002c0 65 78 74 20 70 72 6f 67 72 61 6d 20 28 59 2f 4e |ext program (Y/N| 000002d0 29 3f 20 22 3b 0d 03 ac 16 20 f2 59 4e 3a e7 20 |)? ";.... .YN:. | 000002e0 59 25 3c 30 20 8c 20 8d 74 4e 43 0d 03 b6 12 20 |Y%<0 . .tNC.... | 000002f0 e7 20 59 25 3d 30 20 8c 20 8d 64 48 40 0d 03 ca |. Y%=0 . .dH@...| 00000300 4b 20 db 3a e7 20 4d 25 3d 30 20 8c 20 f1 8a 35 |K .:. M%=0 . ..5| 00000310 2c 35 29 3b 22 50 72 65 73 73 20 74 68 65 20 50 |,5);"Press the P| 00000320 4c 41 59 20 62 75 74 74 6f 6e 22 27 22 20 20 20 |LAY button"'" | 00000330 20 20 6f 6e 20 79 6f 75 72 20 74 61 70 65 20 72 | on your tape r| 00000340 65 63 6f 72 64 65 72 22 0d 03 de 08 20 d7 22 22 |ecorder".... .""| 00000350 0d 03 e8 0e 20 dd f2 47 45 54 4c 49 4e 45 0d 04 |.... ..GETLINE..| 00000360 b0 27 20 4b 45 59 25 3d a5 3a e7 20 4b 45 59 25 |.' KEY%=.:. KEY%| 00000370 3d 31 33 30 20 84 20 4b 45 59 25 3d 31 33 20 8c |=130 . KEY%=13 .| 00000380 20 8d 64 4f 47 0d 04 ba 17 20 e7 20 4b 45 59 25 | .dOG.... . KEY%| 00000390 3c 3e 31 32 37 20 8c 20 8d 54 54 45 0d 04 c4 13 |<>127 . .TTE....| 000003a0 20 e7 20 49 4e 25 3d 30 20 8c 20 8d 74 70 44 0d | . IN%=0 . .tpD.| 000003b0 04 ce 0e 20 49 4e 25 3d 49 4e 25 2d 31 0d 04 d8 |... IN%=IN%-1...| 000003c0 1d 20 e3 4a 25 3d 31 b8 46 25 28 49 4e 25 29 3a |. .J%=1.F%(IN%):| 000003d0 f1 bd 28 26 37 46 29 3b 3a ed 0d 04 e2 20 20 42 |..(&7F);:.... B| 000003e0 24 3d c0 42 24 2c a9 28 42 24 29 2d 66 25 28 49 |$=.B$,.(B$)-f%(I| 000003f0 4e 25 29 29 3a e5 8d 74 70 44 0d 05 14 23 20 e7 |N%)):..tpD...# .| 00000400 20 a9 28 42 24 29 3e 36 39 20 84 20 4b 45 59 25 | .(B$)>69 . KEY%| 00000410 3c 33 32 20 8c ef 37 3a e5 8d 74 70 44 0d 05 1e |<32 ..7:..tpD...| 00000420 1b 20 4b 45 59 24 3d bd 28 4b 45 59 25 29 3a 6b |. KEY$=.(KEY%):k| 00000430 65 79 24 3d 4b 45 59 24 0d 05 28 47 20 49 25 3d |ey$=KEY$..(G I%=| 00000440 a7 22 3b 3a 3d 3f 5b 5d 7b 7d 60 5f 22 2c 4b 45 |.";:=?[]{}`_",KE| 00000450 59 24 29 3a e7 20 49 25 3e 30 20 8c 20 4b 45 59 |Y$):. I%>0 . KEY| 00000460 24 3d c1 22 2b 2a 2d 2f 28 29 28 29 2d 2d 22 2c |$=."+*-/()()--",| 00000470 49 25 2c 31 29 3a 6b 65 79 24 3d 4b 45 59 24 0d |I%,1):key$=KEY$.| 00000480 05 32 41 20 e7 20 4b 45 59 25 3e 31 32 37 20 8c |.2A . KEY%>127 .| 00000490 20 4b 45 59 25 3d 4b 45 59 25 2d 31 32 37 3a 4b | KEY%=KEY%-127:K| 000004a0 45 59 24 3d 46 55 4e 43 24 28 4b 45 59 25 29 3a |EY$=FUNC$(KEY%):| 000004b0 6b 65 79 24 3d 66 75 6e 63 24 28 4b 45 59 25 29 |key$=func$(KEY%)| 000004c0 0d 05 3c 24 20 46 25 28 49 4e 25 29 3d a9 28 4b |..<$ F%(IN%)=.(K| 000004d0 45 59 24 29 3a 66 25 28 49 4e 25 29 3d a9 28 6b |EY$):f%(IN%)=.(k| 000004e0 65 79 24 29 0d 05 46 26 20 49 4e 25 3d 49 4e 25 |ey$)..F& IN%=IN%| 000004f0 2b 31 3a f1 4b 45 59 24 3b 3a 42 24 3d 42 24 2b |+1:.KEY$;:B$=B$+| 00000500 6b 65 79 24 3a e5 8d 74 70 44 0d 07 cf 06 20 e1 |key$:..tpD.... .| 00000510 0d 07 d0 0f 20 dd a4 45 56 41 4c 28 5a 24 29 0d |.... ..EVAL(Z$).| 00000520 07 da 0e 20 ea 20 58 2c 59 25 2c 5a 25 0d 07 e4 |... . X,Y%,Z%...| 00000530 21 20 e7 20 97 28 5a 24 29 3d 33 32 20 8c 20 5a |! . .(Z$)=32 . Z| 00000540 24 3d c1 5a 24 2c 32 29 3a e5 8d 64 64 47 0d 07 |$=.Z$,2):..ddG..| 00000550 ee 11 20 e7 20 5a 24 3d 22 22 20 8c 20 3d 30 0d |.. . Z$="" . =0.| 00000560 07 f8 0c 20 46 4c 41 47 25 3d 30 0d 08 34 14 20 |... FLAG%=0..4. | 00000570 f4 20 43 68 65 63 6b 20 66 6f 72 20 49 4e 56 0d |. Check for INV.| 00000580 08 3e 1f 20 5a 25 3d a7 5a 24 2c bd 26 38 39 29 |.>. Z%=.Z$,.&89)| 00000590 3a e7 20 5a 25 3d 30 20 8c 20 8d 74 58 48 0d 08 |:. Z%=0 . .tXH..| 000005a0 48 14 20 f4 20 43 68 65 63 6b 20 66 6f 72 20 53 |H. . Check for S| 000005b0 49 4e 0d 08 52 41 20 e7 20 c1 5a 24 2c 5a 25 2b |IN..RA . .Z$,Z%+| 000005c0 31 2c 33 29 3d 66 75 6e 63 24 28 36 29 20 8c 20 |1,3)=func$(6) . | 000005d0 5a 24 3d c0 5a 24 2c 5a 25 2d 31 29 2b 22 20 41 |Z$=.Z$,Z%-1)+" A| 000005e0 53 4e 22 2b c1 5a 24 2c 5a 25 2b 34 29 3a e5 8d |SN"+.Z$,Z%+4):..| 000005f0 54 7e 48 0d 08 5c 14 20 f4 20 43 68 65 63 6b 20 |T~H..\. . Check | 00000600 66 6f 72 20 43 4f 53 0d 08 66 41 20 e7 20 c1 5a |for COS..fA . .Z| 00000610 24 2c 5a 25 2b 31 2c 33 29 3d 66 75 6e 63 24 28 |$,Z%+1,3)=func$(| 00000620 37 29 20 8c 20 5a 24 3d c0 5a 24 2c 5a 25 2d 31 |7) . Z$=.Z$,Z%-1| 00000630 29 2b 22 20 41 43 53 22 2b c1 5a 24 2c 5a 25 2b |)+" ACS"+.Z$,Z%+| 00000640 34 29 3a e5 8d 54 7e 48 0d 08 70 14 20 f4 20 43 |4):..T~H..p. . C| 00000650 68 65 63 6b 20 66 6f 72 20 54 41 4e 0d 08 7a 41 |heck for TAN..zA| 00000660 20 e7 20 c1 5a 24 2c 5a 25 2b 31 2c 33 29 3d 66 | . .Z$,Z%+1,3)=f| 00000670 75 6e 63 24 28 38 29 20 8c 20 5a 24 3d c0 5a 24 |unc$(8) . Z$=.Z$| 00000680 2c 5a 25 2d 31 29 2b 22 20 41 54 4e 22 2b c1 5a |,Z%-1)+" ATN"+.Z| 00000690 24 2c 5a 25 2b 34 29 3a e5 8d 54 7e 48 0d 08 84 |$,Z%+4):..T~H...| 000006a0 27 20 45 52 24 3d 22 49 4e 56 20 77 69 74 68 6f |' ER$="INV witho| 000006b0 75 74 20 53 49 4e 2c 43 4f 53 20 6f 72 20 54 41 |ut SIN,COS or TA| 000006c0 4e 22 3a 85 0d 08 98 17 20 f4 20 43 68 65 63 6b |N":..... . Check| 000006d0 20 66 6f 72 20 52 45 43 41 4c 4c 0d 08 a2 1f 20 | for RECALL.... | 000006e0 5a 25 3d a7 5a 24 2c bd 26 38 32 29 3a e7 20 5a |Z%=.Z$,.&82):. Z| 000006f0 25 3d 30 20 8c 20 8d 64 7c 48 0d 08 ac 2b 20 45 |%=0 . .d|H...+ E| 00000700 52 24 3d 22 4e 75 6d 62 65 72 20 61 66 74 65 72 |R$="Number after| 00000710 20 52 45 43 41 4c 4c 20 6f 75 74 20 6f 66 20 72 | RECALL out of r| 00000720 61 6e 67 65 22 0d 08 b6 28 20 59 25 3d a0 28 c1 |ange"...( Y%=.(.| 00000730 5a 24 2c 5a 25 2b 31 2c 31 29 29 3a e7 20 59 25 |Z$,Z%+1,1)):. Y%| 00000740 3c 30 20 84 20 59 25 3e 39 20 8c 20 85 0d 08 c0 |<0 . Y%>9 . ....| 00000750 10 20 58 3d 53 54 4f 52 45 28 59 25 29 0d 08 ca |. X=STORE(Y%)...| 00000760 26 20 5a 24 3d c0 5a 24 2c 5a 25 2d 31 29 2b c3 |& Z$=.Z$,Z%-1)+.| 00000770 28 58 29 2b c1 5a 24 2c 5a 25 2b 32 29 3a e5 8d |(X)+.Z$,Z%+2):..| 00000780 74 62 48 0d 08 fc 16 20 f4 20 43 68 65 63 6b 20 |tbH.... . Check | 00000790 66 6f 72 20 53 54 4f 52 45 0d 09 06 1e 20 5a 25 |for STORE.... Z%| 000007a0 3d a7 5a 24 2c bd 26 38 31 29 3a e7 20 5a 25 3d |=.Z$,.&81):. Z%=| 000007b0 30 20 8c 8d 44 60 49 0d 09 10 29 20 45 52 24 3d |0 ..D`I...) ER$=| 000007c0 22 49 6e 76 61 6c 69 64 20 65 78 70 72 65 73 73 |"Invalid express| 000007d0 69 6f 6e 20 61 66 74 65 72 20 53 54 4f 52 45 22 |ion after STORE"| 000007e0 0d 09 1a 26 20 59 25 3d a0 28 c1 5a 24 2c 5a 25 |...& Y%=.(.Z$,Z%| 000007f0 2b 31 29 29 3a e7 20 59 25 3c 30 20 84 20 59 25 |+1)):. Y%<0 . Y%| 00000800 3e 39 20 8c 20 85 0d 09 24 2a 20 45 52 24 3d 22 |>9 . ...$* ER$="| 00000810 49 6e 76 61 6c 69 64 20 65 78 70 72 65 73 73 69 |Invalid expressi| 00000820 6f 6e 20 62 65 66 6f 72 65 20 53 54 4f 52 45 22 |on before STORE"| 00000830 0d 09 2e 13 20 58 3d a0 28 c0 5a 24 2c 5a 25 2d |.... X=.(.Z$,Z%-| 00000840 31 29 29 0d 09 38 2a 20 53 54 4f 52 45 28 59 25 |1))..8* STORE(Y%| 00000850 29 3d 58 3a 59 24 3d c3 28 59 25 29 3a e7 20 4d |)=X:Y$=.(Y%):. M| 00000860 45 4d 24 3d 22 22 20 8c 20 8d 44 4c 49 0d 09 42 |EM$="" . .DLI..B| 00000870 19 20 e7 20 a7 4d 45 4d 24 2c 59 24 29 3e 30 20 |. . .MEM$,Y$)>0 | 00000880 8c 20 8d 44 56 49 0d 09 4c 16 20 4d 45 4d 24 3d |. .DVI..L. MEM$=| 00000890 4d 45 4d 24 2b 22 20 20 22 2b 59 24 0d 09 56 07 |MEM$+" "+Y$..V.| 000008a0 20 3d 58 0d 09 60 17 20 45 52 24 3d 22 22 3a 3d | =X..`. ER$="":=| 000008b0 a0 28 22 30 2b 22 2b 5a 24 29 0d 13 88 11 20 dd |.("0+"+Z$).... .| 000008c0 f2 49 4e 49 54 49 41 4c 49 53 45 0d 13 92 31 20 |.INITIALISE...1 | 000008d0 de 20 46 55 4e 43 24 28 31 30 29 2c 66 75 6e 63 |. FUNC$(10),func| 000008e0 24 28 31 30 29 2c 53 54 4f 52 45 28 39 29 2c 46 |$(10),STORE(9),F| 000008f0 25 28 37 39 29 2c 66 25 28 37 39 29 0d 13 a6 4f |%(79),f%(79)...O| 00000900 20 dc 22 20 53 54 4f 52 45 20 22 2c 22 20 52 45 | ." STORE "," RE| 00000910 43 41 4c 4c 20 22 2c 22 20 43 4c 45 41 52 20 22 |CALL "," CLEAR "| 00000920 2c 22 25 22 2c 22 53 51 52 20 22 2c 22 53 49 4e |,"%","SQR ","SIN| 00000930 20 22 2c 22 43 4f 53 20 22 2c 22 54 41 4e 20 22 | ","COS ","TAN "| 00000940 2c 22 49 4e 56 20 22 2c 22 5e 22 0d 13 b0 24 20 |,"INV ","^"...$ | 00000950 dc 22 2f 31 30 30 22 2c 22 53 51 52 22 2c 22 53 |."/100","SQR","S| 00000960 49 4e 22 2c 22 43 4f 53 22 2c 22 54 41 4e 22 0d |IN","COS","TAN".| 00000970 13 ba 1b 20 e3 49 25 3d 31 b8 31 30 3a f3 20 46 |... .I%=1.10:. F| 00000980 55 4e 43 24 28 49 25 29 3a ed 0d 13 c4 23 20 e3 |UNC$(I%):....# .| 00000990 49 25 3d 31 b8 31 30 3a 66 75 6e 63 24 28 49 25 |I%=1.10:func$(I%| 000009a0 29 3d bd 28 31 32 38 2b 49 25 29 3a ed 0d 13 ce |)=.(128+I%):....| 000009b0 1a 20 e3 49 25 3d 34 b8 38 3a f3 20 66 75 6e 63 |. .I%=4.8:. func| 000009c0 24 28 49 25 29 3a ed 0d 13 d8 12 20 66 75 6e 63 |$(I%):..... func| 000009d0 24 28 31 30 29 3d 22 5e 22 0d 13 ec 0c 20 4d 45 |$(10)="^".... ME| 000009e0 4d 24 3d 22 22 0d 14 50 12 20 2a 4b 45 59 20 30 |M$=""..P. *KEY 0| 000009f0 20 22 7c 21 7c 40 22 0d 14 5a 12 20 2a 4b 45 59 | "|!|@"..Z. *KEY| 00000a00 20 31 20 22 7c 21 7c 41 22 0d 14 64 12 20 2a 4b | 1 "|!|A"..d. *K| 00000a10 45 59 20 32 20 22 7c 21 7c 42 22 0d 14 6e 12 20 |EY 2 "|!|B"..n. | 00000a20 2a 4b 45 59 20 33 20 22 7c 21 7c 43 22 0d 14 78 |*KEY 3 "|!|C"..x| 00000a30 12 20 2a 4b 45 59 20 34 20 22 7c 21 7c 44 22 0d |. *KEY 4 "|!|D".| 00000a40 14 82 12 20 2a 4b 45 59 20 35 20 22 7c 21 7c 45 |... *KEY 5 "|!|E| 00000a50 22 0d 14 8c 12 20 2a 4b 45 59 20 36 20 22 7c 21 |".... *KEY 6 "|!| 00000a60 7c 46 22 0d 14 96 12 20 2a 4b 45 59 20 37 20 22 ||F".... *KEY 7 "| 00000a70 7c 21 7c 47 22 0d 14 a0 12 20 2a 4b 45 59 20 38 ||!|G".... *KEY 8| 00000a80 20 22 7c 21 7c 48 22 0d 14 aa 12 20 2a 4b 45 59 | "|!|H".... *KEY| 00000a90 20 39 20 22 7c 21 7c 49 22 0d 14 b3 06 20 e1 0d | 9 "|!|I".... ..| 00000aa0 17 70 13 20 dd f2 49 4e 53 54 52 55 43 54 49 4f |.p. ..INSTRUCTIO| 00000ab0 4e 53 0d 17 7a 0c 20 f2 53 43 52 45 45 4e 0d 17 |NS..z. .SCREEN..| 00000ac0 84 52 20 f1 27 22 20 20 20 20 20 20 54 68 69 73 |.R .'" This| 00000ad0 20 70 72 6f 67 72 61 6d 20 63 6f 6e 76 65 72 74 | program convert| 00000ae0 73 20 79 6f 75 72 22 27 22 20 20 20 63 6f 6d 70 |s your"'" comp| 00000af0 75 74 65 72 20 69 6e 74 6f 20 61 20 73 69 6d 70 |uter into a simp| 00000b00 6c 65 20 63 61 6c 63 75 6c 61 74 6f 72 2e 22 27 |le calculator."'| 00000b10 0d 17 8e 2f 20 f1 27 27 22 20 20 20 20 20 20 54 |.../ .''" T| 00000b20 68 65 20 70 72 6f 67 72 61 6d 20 6d 61 6b 65 73 |he program makes| 00000b30 20 61 76 61 69 6c 61 62 6c 65 20 74 68 65 22 0d | available the".| 00000b40 17 98 2b 20 f1 22 20 20 20 6b 65 79 73 20 31 20 |..+ ." keys 1 | 00000b50 2d 20 30 20 61 6e 64 20 74 68 65 20 66 75 6c 6c |- 0 and the full| 00000b60 20 73 74 6f 70 20 6b 65 79 22 0d 17 a2 1e 20 f1 | stop key".... .| 00000b70 22 20 20 20 74 6f 20 65 6e 74 65 72 20 6e 75 6d |" to enter num| 00000b80 62 65 72 73 2e 22 27 27 0d 17 ac 2b 20 f1 22 20 |bers."''...+ ." | 00000b90 20 20 20 20 20 54 68 65 20 6b 65 79 73 74 72 6f | The keystro| 00000ba0 6b 65 73 20 2b 2c 20 2d 2c 20 2a 2c 20 2f 20 61 |kes +, -, *, / a| 00000bb0 72 65 22 0d 17 b6 41 20 f1 22 20 20 20 75 73 65 |re"...A ." use| 00000bc0 64 20 66 6f 72 20 74 68 65 20 6f 70 65 72 61 74 |d for the operat| 00000bd0 69 6f 6e 73 20 6f 66 22 27 22 20 20 20 61 64 64 |ions of"'" add| 00000be0 69 74 69 6f 6e 2c 20 73 75 62 74 72 61 63 74 69 |ition, subtracti| 00000bf0 6f 6e 2c 22 0d 17 c0 39 20 f1 22 20 20 20 6d 75 |on,"...9 ." mu| 00000c00 6c 74 69 70 6c 69 63 61 74 69 6f 6e 20 61 6e 64 |ltiplication and| 00000c10 20 64 69 76 69 73 69 6f 6e 22 27 22 20 20 20 72 | division"'" r| 00000c20 65 73 70 65 63 74 69 76 65 6c 79 2e 22 0d 17 ca |espectively."...| 00000c30 0b 20 f2 53 50 41 43 45 0d 17 d4 0c 20 f2 53 43 |. .SPACE.... .SC| 00000c40 52 45 45 4e 0d 17 de 4f 20 f1 27 22 20 20 20 20 |REEN...O .'" | 00000c50 20 20 54 68 65 20 63 61 6c 63 75 6c 61 74 6f 72 | The calculator| 00000c60 20 6f 70 65 72 61 74 65 73 20 69 6e 22 27 22 20 | operates in"'" | 00000c70 20 20 61 6c 67 65 62 72 61 69 63 20 6d 6f 64 65 | algebraic mode| 00000c80 2c 20 74 68 61 74 20 69 73 2c 20 79 6f 75 20 63 |, that is, you c| 00000c90 61 6e 22 0d 17 e8 42 20 f1 22 20 20 20 74 79 70 |an"...B ." typ| 00000ca0 65 20 69 6e 20 61 6e 20 65 78 70 72 65 73 73 69 |e in an expressi| 00000cb0 6f 6e 20 6a 75 73 74 20 61 73 20 79 6f 75 22 27 |on just as you"'| 00000cc0 22 20 20 20 77 6f 75 6c 64 20 77 72 69 74 65 20 |" would write | 00000cd0 69 74 2e 22 27 0d 17 f2 4c 20 f1 22 20 20 20 20 |it."'...L ." | 00000ce0 20 20 48 6f 77 65 76 65 72 2c 20 6d 75 6c 74 69 | However, multi| 00000cf0 70 6c 69 63 61 74 69 6f 6e 20 61 6e 64 22 27 22 |plication and"'"| 00000d00 20 20 20 64 69 76 69 73 69 6f 6e 20 74 61 6b 65 | division take| 00000d10 20 70 72 65 63 65 64 65 6e 63 65 20 6f 76 65 72 | precedence over| 00000d20 22 0d 17 fc 40 20 f1 22 20 20 20 61 64 64 69 74 |"...@ ." addit| 00000d30 69 6f 6e 20 61 6e 64 20 73 75 62 74 72 61 63 74 |ion and subtract| 00000d40 69 6f 6e 2c 20 73 6f 20 74 68 61 74 22 27 22 20 |ion, so that"'" | 00000d50 20 20 66 6f 72 20 65 78 61 6d 70 6c 65 20 3a 22 | for example :"| 00000d60 27 0d 18 06 35 20 f1 89 28 31 30 29 22 33 2f 34 |'...5 ..(10)"3/4| 00000d70 2b 35 2a 37 2e 31 2d 36 2f 2e 32 22 27 27 89 28 |+5*7.1-6/.2"''.(| 00000d80 38 29 22 69 73 20 69 6e 74 65 72 70 72 65 74 65 |8)"is interprete| 00000d90 64 20 61 73 22 27 0d 18 10 20 20 f1 89 28 37 29 |d as"'... ..(7)| 00000da0 22 28 33 2f 34 29 2b 28 35 2a 37 2e 31 29 2d 28 |"(3/4)+(5*7.1)-(| 00000db0 36 2f 2e 32 29 22 0d 18 2e 0b 20 f2 53 50 41 43 |6/.2)".... .SPAC| 00000dc0 45 0d 18 38 0c 20 f2 53 43 52 45 45 4e 0d 18 42 |E..8. .SCREEN..B| 00000dd0 50 20 f1 27 27 22 20 20 20 20 20 20 52 6f 75 6e |P .''" Roun| 00000de0 64 20 20 62 72 61 63 6b 65 74 73 20 20 28 20 29 |d brackets ( )| 00000df0 20 61 72 65 22 27 22 20 20 20 61 76 61 69 6c 61 | are"'" availa| 00000e00 62 6c 65 20 74 6f 20 6f 76 65 72 72 69 64 65 20 |ble to override | 00000e10 74 68 65 20 6f 72 64 65 72 20 6f 66 22 0d 18 4c |the order of"..L| 00000e20 17 20 f1 22 20 20 20 65 78 65 63 75 74 69 6f 6e |. ." execution| 00000e30 2e 22 27 27 0d 18 56 4d 20 f1 22 20 20 20 20 20 |."''..VM ." | 00000e40 20 41 6e 79 74 68 69 6e 67 20 69 6e 20 62 72 61 | Anything in bra| 00000e50 63 6b 65 74 73 20 69 73 20 77 6f 72 6b 65 64 22 |ckets is worked"| 00000e60 27 22 20 20 20 6f 75 74 20 62 65 66 6f 72 65 20 |'" out before | 00000e70 61 6e 79 74 68 69 6e 67 20 65 6c 73 65 2e 22 27 |anything else."'| 00000e80 27 0d 18 60 43 20 f1 22 20 20 20 20 20 20 54 68 |'..`C ." Th| 00000e90 65 20 20 69 6e 6e 65 72 6d 6f 73 74 20 20 62 72 |e innermost br| 00000ea0 61 63 6b 65 74 73 20 20 61 72 65 22 27 22 20 20 |ackets are"'" | 00000eb0 20 65 76 61 6c 75 61 74 65 64 20 66 69 72 73 74 | evaluated first| 00000ec0 2e 22 27 20 0d 18 92 0b 20 f2 53 50 41 43 45 0d |."' .... .SPACE.| 00000ed0 18 9c 0c 20 f2 53 43 52 45 45 4e 0d 18 a6 4f 20 |... .SCREEN...O | 00000ee0 f1 27 22 20 20 20 20 20 20 49 6e 20 20 74 68 69 |.'" In thi| 00000ef0 73 20 20 70 72 6f 67 72 61 6d 20 20 74 68 65 20 |s program the | 00000f00 72 65 64 22 27 22 20 20 20 75 73 65 72 2d 64 65 |red"'" user-de| 00000f10 66 69 6e 61 62 6c 65 20 6b 65 79 73 20 68 61 76 |finable keys hav| 00000f20 65 20 73 70 65 63 69 61 6c 22 0d 18 b0 22 20 f1 |e special"..." .| 00000f30 22 20 20 20 66 75 6e 63 74 69 6f 6e 73 2c 20 77 |" functions, w| 00000f40 68 69 63 68 20 61 72 65 3a 2d 22 27 0d 18 ba 42 |hich are:-"'...B| 00000f50 20 f1 22 20 20 20 66 30 20 2d 20 53 54 4f 52 45 | ." f0 - STORE| 00000f60 22 27 22 20 20 20 66 31 20 2d 20 52 45 43 41 4c |"'" f1 - RECAL| 00000f70 4c 22 27 22 20 20 20 66 32 20 2d 20 43 4c 45 41 |L"'" f2 - CLEA| 00000f80 52 22 27 22 20 20 20 66 33 20 2d 20 25 22 0d 18 |R"'" f3 - %"..| 00000f90 c4 46 20 f1 22 20 20 20 66 34 20 2d 20 53 51 52 |.F ." f4 - SQR| 00000fa0 20 28 73 71 75 61 72 65 20 72 6f 6f 74 29 22 27 | (square root)"'| 00000fb0 22 20 20 20 66 35 20 2d 20 53 49 4e 20 28 73 69 |" f5 - SIN (si| 00000fc0 6e 65 20 6f 66 20 72 61 64 69 61 6e 20 61 6e 67 |ne of radian ang| 00000fd0 6c 65 29 22 0d 18 ce 54 20 f1 22 20 20 20 66 36 |le)"...T ." f6| 00000fe0 20 2d 20 43 4f 53 20 28 63 6f 73 69 6e 65 20 6f | - COS (cosine o| 00000ff0 66 20 72 61 64 69 61 6e 20 61 6e 67 6c 65 29 22 |f radian angle)"| 00001000 27 22 20 20 20 66 37 20 2d 20 54 41 4e 20 28 74 |'" f7 - TAN (t| 00001010 61 6e 67 65 6e 74 20 6f 66 20 72 61 64 69 61 6e |angent of radian| 00001020 20 61 6e 67 6c 65 29 22 0d 18 d8 3f 20 f1 22 20 | angle)"...? ." | 00001030 20 20 66 38 20 2d 20 49 4e 56 20 28 66 6f 72 20 | f8 - INV (for | 00001040 69 6e 76 65 72 73 65 22 27 8a 31 33 29 22 74 72 |inverse"'.13)"tr| 00001050 69 67 6f 6e 6f 6d 65 74 72 69 63 20 66 75 6e 63 |igonometric func| 00001060 74 69 6f 6e 73 29 22 0d 18 e2 24 20 f1 22 20 20 |tions)"...$ ." | 00001070 20 66 39 20 2d 20 5e 20 20 20 28 72 61 69 73 65 | f9 - ^ (raise| 00001080 20 74 6f 20 70 6f 77 65 72 29 22 0d 18 f6 0b 20 | to power)".... | 00001090 f2 53 50 41 43 45 0d 19 00 0c 20 f2 53 43 52 45 |.SPACE.... .SCRE| 000010a0 45 4e 0d 19 0a 50 20 f1 27 22 20 20 20 20 20 20 |EN...P .'" | 000010b0 54 68 65 20 20 63 61 6c 63 75 6c 61 74 6f 72 20 |The calculator | 000010c0 20 68 61 73 20 20 74 65 6e 22 27 22 20 20 20 22 | has ten"'" "| 000010d0 22 6d 65 6d 6f 72 69 65 73 22 22 2c 20 6e 75 6d |"memories"", num| 000010e0 62 65 72 65 64 20 66 72 6f 6d 20 30 20 74 6f 20 |bered from 0 to | 000010f0 39 22 0d 19 14 3a 20 f1 22 20 20 20 69 6e 20 65 |9"...: ." in e| 00001100 61 63 68 20 6f 66 20 77 68 69 63 68 20 63 61 6e |ach of which can| 00001110 20 62 65 20 73 74 6f 72 65 64 20 61 22 27 22 20 | be stored a"'" | 00001120 20 20 6e 75 6d 62 65 72 2e 22 27 27 0d 19 1e 51 | number."''...Q| 00001130 20 f1 22 20 20 20 20 20 20 54 6f 20 20 73 74 6f | ." To sto| 00001140 72 65 20 20 74 68 65 20 20 72 65 73 75 6c 74 20 |re the result | 00001150 20 6f 66 20 61 22 27 22 20 20 20 63 61 6c 63 75 | of a"'" calcu| 00001160 6c 61 74 69 6f 6e 20 20 69 6e 20 20 61 20 20 6d |lation in a m| 00001170 65 6d 6f 72 79 2c 20 20 6a 75 73 74 22 0d 19 28 |emory, just"..(| 00001180 51 20 f1 22 20 20 20 65 6e 74 65 72 20 20 74 68 |Q ." enter th| 00001190 65 20 20 65 78 70 72 65 73 73 69 6f 6e 20 20 61 |e expression a| 000011a0 6e 64 20 74 68 65 6e 22 27 22 20 20 20 70 72 65 |nd then"'" pre| 000011b0 73 73 20 6b 65 79 20 66 30 20 28 53 54 4f 52 45 |ss key f0 (STORE| 000011c0 29 20 66 6f 6c 6c 6f 77 65 64 20 62 79 22 0d 19 |) followed by"..| 000011d0 32 72 20 f1 22 20 20 20 61 20 6e 75 6d 62 65 72 |2r ." a number| 000011e0 20 66 72 6f 6d 20 30 20 74 6f 20 39 2e 22 27 27 | from 0 to 9."''| 000011f0 27 22 20 20 20 20 20 20 54 6f 20 72 65 63 61 6c |'" To recal| 00001200 6c 20 20 74 68 65 20 20 63 6f 6e 74 65 6e 74 73 |l the contents| 00001210 20 20 6f 66 20 20 61 22 27 22 20 20 20 6d 65 6d | of a"'" mem| 00001220 6f 72 79 2c 20 20 70 72 65 73 73 20 20 6b 65 79 |ory, press key| 00001230 20 20 66 31 20 28 20 52 45 43 41 4c 4c 20 29 22 | f1 ( RECALL )"| 00001240 0d 19 3c 2d 20 f1 22 20 20 20 66 6f 6c 6c 6f 77 |..<- ." follow| 00001250 65 64 20 62 79 20 61 20 20 6e 75 6d 62 65 72 20 |ed by a number | 00001260 66 72 6f 6d 20 30 20 74 6f 20 39 2e 22 0d 19 5a |from 0 to 9."..Z| 00001270 0b 20 f2 53 50 41 43 45 0d 19 63 06 20 e1 0d 1b |. .SPACE..c. ...| 00001280 58 0d 20 dd f2 53 43 52 45 45 4e 0d 1b 6c 0a 20 |X. ..SCREEN..l. | 00001290 ef 32 36 3a db 0d 1b 76 24 20 f2 44 42 4c 28 22 |.26:...v$ .DBL("| 000012a0 43 61 6c 63 75 6c 61 74 6f 72 20 50 72 6f 67 72 |Calculator Progr| 000012b0 61 6d 22 2c 31 30 2c 31 29 0d 1b b1 15 20 f4 56 |am",10,1).... .V| 000012c0 44 55 32 38 2c 30 2c 32 34 2c 33 39 2c 33 0d 1b |DU28,0,24,39,3..| 000012d0 bb 06 20 e1 0d 1f 40 12 20 dd f2 44 42 4c 28 58 |.. ...@. ..DBL(X| 000012e0 24 2c 58 2c 59 29 0d 1f 4a 17 20 f1 8a 58 2d 31 |$,X,Y)..J. ..X-1| 000012f0 2c 59 29 3b bd 28 31 34 31 29 3b 58 24 0d 1f 54 |,Y);.(141);X$..T| 00001300 19 20 f1 8a 58 2d 31 2c 59 2b 31 29 3b bd 28 31 |. ..X-1,Y+1);.(1| 00001310 34 31 29 3b 58 24 0d 1f a3 06 20 e1 0d 1f a4 0f |41);X$.... .....| 00001320 20 dd f2 57 41 49 54 28 58 29 20 0d 1f ae 08 20 | ..WAIT(X) .... | 00001330 ea 20 5a 0d 1f b8 08 20 5a 3d 91 0d 1f c2 12 20 |. Z.... Z=..... | 00001340 f5 20 fd 20 91 2d 5a 3e 58 2a 31 30 30 0d 20 07 |. . .-Z>X*100. .| 00001350 06 20 e1 0d 20 08 0c 20 dd f2 53 50 41 43 45 0d |. .. .. ..SPACE.| 00001360 20 1c 39 20 f1 8a 33 2c 32 32 29 3b 22 50 72 65 | .9 ..3,22);"Pre| 00001370 73 73 20 74 68 65 20 53 50 41 43 45 20 42 41 52 |ss the SPACE BAR| 00001380 20 74 6f 20 63 6f 6e 74 69 6e 75 65 22 3b 3a f2 | to continue";:.| 00001390 4b 43 4c 3a f2 4f 46 46 0d 20 30 0e 20 f5 20 fd |KCL:.OFF. 0. . .| 000013a0 20 be 3d 22 20 22 0d 20 6b 06 20 e1 0d 20 6c 10 | .=" ". k. .. l.| 000013b0 20 dd f2 54 49 54 4c 45 50 41 47 45 0d 20 76 1f | ..TITLEPAGE. v.| 000013c0 20 db 3a f2 44 42 4c 28 22 43 41 4c 43 55 4c 41 | .:.DBL("CALCULA| 000013d0 54 4f 52 22 2c 31 33 2c 31 30 29 0d 20 80 13 20 |TOR",13,10). .. | 000013e0 f2 4f 46 46 3a 49 25 3d a6 28 35 30 30 29 0d 20 |.OFF:I%=.(500). | 000013f0 cf 06 20 e1 0d 22 60 0a 20 dd f2 4b 43 4c 0d 22 |.. .."`. ..KCL."| 00001400 6a 10 20 f5 20 fd 20 a6 28 30 29 3d 2d 31 0d 22 |j. . . .(0)=-1."| 00001410 c3 06 20 e1 0d 22 c4 0a 20 dd f2 4f 46 46 0d 22 |.. ..".. ..OFF."| 00001420 ce 16 20 ef 32 33 3b 38 32 30 32 3b 30 3b 30 3b |.. .23;8202;0;0;| 00001430 30 3b 3a e1 0d 22 f6 09 20 dd f2 4f 4e 0d 23 00 |0;:..".. ..ON.#.| 00001440 17 20 ef 32 33 3b 32 39 31 39 34 3b 30 3b 30 3b |. .23;29194;0;0;| 00001450 30 3b 3a e1 0d 23 f0 09 20 dd f2 59 4e 0d 23 fa |0;:..#.. ..YN.#.| 00001460 0a 20 59 25 3d 2d 31 0d 24 04 1c 20 58 25 3d a5 |. Y%=-1.$.. X%=.| 00001470 3a e7 20 58 25 3d 31 33 20 80 20 59 25 3e 3d 30 |:. X%=13 . Y%>=0| 00001480 20 8c e1 0d 24 0e 22 20 58 25 3d 58 25 80 26 44 | ...$." X%=X%.&D| 00001490 46 3a e7 58 25 3c 3e 37 38 80 58 25 3c 3e 38 39 |F:.X%<>78.X%<>89| 000014a0 8c 8d 54 44 64 0d 24 18 15 20 59 25 3d 31 3a e7 |..TDd.$.. Y%=1:.| 000014b0 58 25 3d 37 38 8c 59 25 3d 30 0d 24 22 13 20 f1 |X%=78.Y%=0.$". .| 000014c0 bd 58 25 3b bd 38 3b 3a e5 8d 54 44 64 0d ff |.X%;.8;:..TDd..| 000014cf