Home » CEEFAX disks » telesoftware17.adl » 25-08-89/Curio
25-08-89/Curio
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 » CEEFAX disks » telesoftware17.adl |
Filename: | 25-08-89/Curio |
Read OK: | ✔ |
File size: | 05B1 bytes |
Load address: | FFFF0E00 |
Exec address: | FFFF802B |
File contents
1 REM final program 10 REM program to produce tables multiplied and products of the result. 15 REM get table to calculate 20CLS:INPUT"which table to calculate";table% 22 REM set variables 25LET flag%=1:LET x%=300:LET y%=400:MODE0:MOVEx%,y% 27VDU23,8202;0;0;0;0; 30tablelimit%=40 31 REM get step or continuous mode 32PRINT"Do you want step mode Y/N?" 33PROCyn 34IF KEY$="Y"THEN mode%=TRUE ELSE mode%=FALSE 40counter%=1 45 REM splits result into single units 50LET answer$=STR$(table%*counter%) 60REPEAT:product%=0 70FOR I%=1 TO LEN(answer$) 80product%=product%+VAL(MID$(answer$,I%,1)) 90NEXT 100IFproduct%>9THEN LET answer$=STR$(product%) 120UNTIL product%<10 131 REM adjust start position 132 IF counter%=1 AND product%=2 THEN LETx%=600:LETy%=392:MOVEx%,y% 136 REM print results and call drawing procedure 140PRINTTAB(0,0);table%;" times ";counter%;"=";table%*counter%;TAB(20);".... product=";product%;SPC10:PROCdraw 145IF mode%=TRUE THEN REPEAT A$=INKEY$(0):UNTIL A$=" " 150LET counter%=counter%+1 160IF counter%<=tablelimit% THEN GOTO 50 169 REM offer option to run program again 170PRINTTAB(30,27);"RUN program again Y/N" 180PROCyn 190IF KEY$="Y"THEN GOTO 20 200END 999 REM procedure to draw line in correct direction given by 'flag' 1000DEFPROCdraw 1005 LET product%=product%*35 1010IF flag%=1THEN LET y%=y%+product% 1020IF flag%=2THEN LET x%=x%+product% 1030IF flag%=3THEN LET y%=y%-product% 1040IF flag%=4THEN LET x%=x%-product% 1050DRAW x%,y% 1059 REM change flag direction and check limit (4) 1060LET flag%=flag%+1:IF flag%=5 THEN LETflag%=1 1070ENDPROC 1999 REM procedure to get Y or N key pressed 2000DEFPROCyn 2010REPEAT 2020KEY$=INKEY$(0) 2030UNTIL KEY$="Y" OR KEY$="N" 2040ENDPROC
� final program M � program to produce tables multiplied and products of the result. � get table to calculate (�:�"which table to calculate";table% � set variables )� flag%=1:� x%=300:� y%=400:�0:�x%,y% �23,8202;0;0;0;0; tablelimit%=40 " � get step or continuous mode !�"Do you want step mode Y/N?" !�yn "!� KEY$="Y"� mode%=� � mode%=� (counter%=1 -& � splits result into single units 2 � answer$=�(table%*counter%) <�:product%=0 F� I%=1 � �(answer$) P'product%=product%+�(�answer$,I%,1)) Z� d&�product%>9� � answer$=�(product%) x� product%<10 � � adjust start position �7 � counter%=1 � product%=2 � �x%=600:�y%=392:�x%,y% �/ � print results and call drawing procedure �`�0,0);table%;" times ";counter%;"=";table%*counter%;�20);".... product=";product%;�10:�draw �"� mode%=� � � A$=�(0):� A$=" " �� counter%=counter%+1 �$� counter%<=tablelimit% � � �Tr@ �( � offer option to run program again �$�30,27);"RUN program again Y/N" ��yn �� KEY$="Y"� � �TT@ �� �B � procedure to draw line in correct direction given by 'flag' � ��draw � � product%=product%*35 �� flag%=1� � y%=y%+product% �� flag%=2� � x%=x%+product% � flag%=3� � y%=y%-product% � flag%=4� � x%=x%-product% � x%,y% #0 � change flag direction and check limit (4) $(� flag%=flag%+1:� flag%=5 � �flag%=1 .� �* � procedure to get Y or N key pressed ���yn �� � KEY$=�(0) �� KEY$="Y" � KEY$="N" �� �
00000000 0d 00 01 14 20 f4 20 66 69 6e 61 6c 20 70 72 6f |.... . final pro| 00000010 67 72 61 6d 0d 00 0a 4d 20 f4 20 70 72 6f 67 72 |gram...M . progr| 00000020 61 6d 20 74 6f 20 70 72 6f 64 75 63 65 20 74 61 |am to produce ta| 00000030 62 6c 65 73 20 20 20 20 20 20 20 6d 75 6c 74 69 |bles multi| 00000040 70 6c 69 65 64 20 61 6e 64 20 70 72 6f 64 75 63 |plied and produc| 00000050 74 73 20 6f 66 20 74 68 65 20 72 65 73 75 6c 74 |ts of the result| 00000060 2e 0d 00 0f 1d 20 f4 20 67 65 74 20 74 61 62 6c |..... . get tabl| 00000070 65 20 74 6f 20 63 61 6c 63 75 6c 61 74 65 0d 00 |e to calculate..| 00000080 14 28 db 3a e8 22 77 68 69 63 68 20 74 61 62 6c |.(.:."which tabl| 00000090 65 20 74 6f 20 63 61 6c 63 75 6c 61 74 65 22 3b |e to calculate";| 000000a0 74 61 62 6c 65 25 0d 00 16 14 20 f4 20 73 65 74 |table%.... . set| 000000b0 20 76 61 72 69 61 62 6c 65 73 0d 00 19 29 e9 20 | variables...). | 000000c0 66 6c 61 67 25 3d 31 3a e9 20 78 25 3d 33 30 30 |flag%=1:. x%=300| 000000d0 3a e9 20 79 25 3d 34 30 30 3a eb 30 3a ec 78 25 |:. y%=400:.0:.x%| 000000e0 2c 79 25 0d 00 1b 15 ef 32 33 2c 38 32 30 32 3b |,y%.....23,8202;| 000000f0 30 3b 30 3b 30 3b 30 3b 0d 00 1e 12 74 61 62 6c |0;0;0;0;....tabl| 00000100 65 6c 69 6d 69 74 25 3d 34 30 0d 00 1f 22 20 f4 |elimit%=40..." .| 00000110 20 67 65 74 20 73 74 65 70 20 6f 72 20 63 6f 6e | get step or con| 00000120 74 69 6e 75 6f 75 73 20 6d 6f 64 65 0d 00 20 21 |tinuous mode.. !| 00000130 f1 22 44 6f 20 79 6f 75 20 77 61 6e 74 20 73 74 |."Do you want st| 00000140 65 70 20 6d 6f 64 65 20 59 2f 4e 3f 22 0d 00 21 |ep mode Y/N?"..!| 00000150 07 f2 79 6e 0d 00 22 21 e7 20 4b 45 59 24 3d 22 |..yn.."!. KEY$="| 00000160 59 22 8c 20 6d 6f 64 65 25 3d b9 20 8b 20 6d 6f |Y". mode%=. . mo| 00000170 64 65 25 3d a3 0d 00 28 0e 63 6f 75 6e 74 65 72 |de%=...(.counter| 00000180 25 3d 31 0d 00 2d 26 20 f4 20 73 70 6c 69 74 73 |%=1..-& . splits| 00000190 20 72 65 73 75 6c 74 20 69 6e 74 6f 20 73 69 6e | result into sin| 000001a0 67 6c 65 20 75 6e 69 74 73 0d 00 32 20 e9 20 61 |gle units..2 . a| 000001b0 6e 73 77 65 72 24 3d c3 28 74 61 62 6c 65 25 2a |nswer$=.(table%*| 000001c0 63 6f 75 6e 74 65 72 25 29 0d 00 3c 10 f5 3a 70 |counter%)..<..:p| 000001d0 72 6f 64 75 63 74 25 3d 30 0d 00 46 17 e3 20 49 |roduct%=0..F.. I| 000001e0 25 3d 31 20 b8 20 a9 28 61 6e 73 77 65 72 24 29 |%=1 . .(answer$)| 000001f0 0d 00 50 27 70 72 6f 64 75 63 74 25 3d 70 72 6f |..P'product%=pro| 00000200 64 75 63 74 25 2b bb 28 c1 61 6e 73 77 65 72 24 |duct%+.(.answer$| 00000210 2c 49 25 2c 31 29 29 0d 00 5a 05 ed 0d 00 64 26 |,I%,1))..Z....d&| 00000220 e7 70 72 6f 64 75 63 74 25 3e 39 8c 20 e9 20 61 |.product%>9. . a| 00000230 6e 73 77 65 72 24 3d c3 28 70 72 6f 64 75 63 74 |nswer$=.(product| 00000240 25 29 0d 00 78 11 fd 20 70 72 6f 64 75 63 74 25 |%)..x.. product%| 00000250 3c 31 30 0d 00 83 1c 20 f4 20 61 64 6a 75 73 74 |<10.... . adjust| 00000260 20 73 74 61 72 74 20 70 6f 73 69 74 69 6f 6e 0d | start position.| 00000270 00 84 37 20 e7 20 63 6f 75 6e 74 65 72 25 3d 31 |..7 . counter%=1| 00000280 20 80 20 70 72 6f 64 75 63 74 25 3d 32 20 8c 20 | . product%=2 . | 00000290 e9 78 25 3d 36 30 30 3a e9 79 25 3d 33 39 32 3a |.x%=600:.y%=392:| 000002a0 ec 78 25 2c 79 25 0d 00 88 2f 20 f4 20 70 72 69 |.x%,y%.../ . pri| 000002b0 6e 74 20 72 65 73 75 6c 74 73 20 61 6e 64 20 63 |nt results and c| 000002c0 61 6c 6c 20 64 72 61 77 69 6e 67 20 70 72 6f 63 |all drawing proc| 000002d0 65 64 75 72 65 0d 00 8c 60 f1 8a 30 2c 30 29 3b |edure...`..0,0);| 000002e0 74 61 62 6c 65 25 3b 22 20 74 69 6d 65 73 20 22 |table%;" times "| 000002f0 3b 63 6f 75 6e 74 65 72 25 3b 22 3d 22 3b 74 61 |;counter%;"=";ta| 00000300 62 6c 65 25 2a 63 6f 75 6e 74 65 72 25 3b 8a 32 |ble%*counter%;.2| 00000310 30 29 3b 22 2e 2e 2e 2e 20 70 72 6f 64 75 63 74 |0);".... product| 00000320 3d 22 3b 70 72 6f 64 75 63 74 25 3b 89 31 30 3a |=";product%;.10:| 00000330 f2 64 72 61 77 0d 00 91 22 e7 20 6d 6f 64 65 25 |.draw...". mode%| 00000340 3d b9 20 8c 20 f5 20 41 24 3d bf 28 30 29 3a fd |=. . . A$=.(0):.| 00000350 20 41 24 3d 22 20 22 0d 00 96 19 e9 20 63 6f 75 | A$=" "..... cou| 00000360 6e 74 65 72 25 3d 63 6f 75 6e 74 65 72 25 2b 31 |nter%=counter%+1| 00000370 0d 00 a0 24 e7 20 63 6f 75 6e 74 65 72 25 3c 3d |...$. counter%<=| 00000380 74 61 62 6c 65 6c 69 6d 69 74 25 20 8c 20 e5 20 |tablelimit% . . | 00000390 8d 54 72 40 0d 00 a9 28 20 f4 20 6f 66 66 65 72 |.Tr@...( . offer| 000003a0 20 6f 70 74 69 6f 6e 20 74 6f 20 72 75 6e 20 70 | option to run p| 000003b0 72 6f 67 72 61 6d 20 61 67 61 69 6e 0d 00 aa 24 |rogram again...$| 000003c0 f1 8a 33 30 2c 32 37 29 3b 22 52 55 4e 20 70 72 |..30,27);"RUN pr| 000003d0 6f 67 72 61 6d 20 61 67 61 69 6e 20 59 2f 4e 22 |ogram again Y/N"| 000003e0 0d 00 b4 07 f2 79 6e 0d 00 be 16 e7 20 4b 45 59 |.....yn..... KEY| 000003f0 24 3d 22 59 22 8c 20 e5 20 8d 54 54 40 0d 00 c8 |$="Y". . .TT@...| 00000400 05 e0 0d 03 e7 42 20 f4 20 70 72 6f 63 65 64 75 |.....B . procedu| 00000410 72 65 20 74 6f 20 64 72 61 77 20 6c 69 6e 65 20 |re to draw line | 00000420 69 6e 20 63 6f 72 72 65 63 74 20 64 69 72 65 63 |in correct direc| 00000430 74 69 6f 6e 20 67 69 76 65 6e 20 62 79 20 27 66 |tion given by 'f| 00000440 6c 61 67 27 0d 03 e8 0a dd f2 64 72 61 77 0d 03 |lag'......draw..| 00000450 ed 1b 20 e9 20 70 72 6f 64 75 63 74 25 3d 70 72 |.. . product%=pr| 00000460 6f 64 75 63 74 25 2a 33 35 0d 03 f2 1f e7 20 66 |oduct%*35..... f| 00000470 6c 61 67 25 3d 31 8c 20 e9 20 79 25 3d 79 25 2b |lag%=1. . y%=y%+| 00000480 70 72 6f 64 75 63 74 25 0d 03 fc 1f e7 20 66 6c |product%..... fl| 00000490 61 67 25 3d 32 8c 20 e9 20 78 25 3d 78 25 2b 70 |ag%=2. . x%=x%+p| 000004a0 72 6f 64 75 63 74 25 0d 04 06 1f e7 20 66 6c 61 |roduct%..... fla| 000004b0 67 25 3d 33 8c 20 e9 20 79 25 3d 79 25 2d 70 72 |g%=3. . y%=y%-pr| 000004c0 6f 64 75 63 74 25 0d 04 10 1f e7 20 66 6c 61 67 |oduct%..... flag| 000004d0 25 3d 34 8c 20 e9 20 78 25 3d 78 25 2d 70 72 6f |%=4. . x%=x%-pro| 000004e0 64 75 63 74 25 0d 04 1a 0b df 20 78 25 2c 79 25 |duct%..... x%,y%| 000004f0 0d 04 23 30 20 f4 20 63 68 61 6e 67 65 20 66 6c |..#0 . change fl| 00000500 61 67 20 64 69 72 65 63 74 69 6f 6e 20 61 6e 64 |ag direction and| 00000510 20 63 68 65 63 6b 20 6c 69 6d 69 74 20 28 34 29 | check limit (4)| 00000520 0d 04 24 28 e9 20 66 6c 61 67 25 3d 66 6c 61 67 |..$(. flag%=flag| 00000530 25 2b 31 3a e7 20 66 6c 61 67 25 3d 35 20 8c 20 |%+1:. flag%=5 . | 00000540 e9 66 6c 61 67 25 3d 31 0d 04 2e 05 e1 0d 07 cf |.flag%=1........| 00000550 2a 20 f4 20 70 72 6f 63 65 64 75 72 65 20 74 6f |* . procedure to| 00000560 20 67 65 74 20 59 20 6f 72 20 4e 20 6b 65 79 20 | get Y or N key | 00000570 70 72 65 73 73 65 64 0d 07 d0 08 dd f2 79 6e 0d |pressed......yn.| 00000580 07 da 05 f5 0d 07 e4 0d 4b 45 59 24 3d bf 28 30 |........KEY$=.(0| 00000590 29 0d 07 ee 19 fd 20 4b 45 59 24 3d 22 59 22 20 |)..... KEY$="Y" | 000005a0 84 20 4b 45 59 24 3d 22 4e 22 0d 07 f8 05 e1 0d |. KEY$="N"......| 000005b0 ff |.| 000005b1