Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape18a_acorn_eu_1991_january.wav » R.Graph
R.Graph
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 » Electron_User » Electron_User_tape18a_acorn_eu_1991_january.wav |
Filename: | R.Graph |
Read OK: | ✔ |
File size: | 0395 bytes |
Load address: | FFFF1900 |
Exec address: | FFFF802B |
Duplicates
There are 2 duplicate copies of this file in the archive:
- AEW website » mu » mu_5_25_discs_Micro_User_08_11_D-MU08_11.ssd » R.Graph
- Personal collection » Acorn tapes » Electron_User » Electron_User_tape18a_acorn_eu_1991_january.wav » R.Graph
- Personal collection » Acorn tapes » Electron_User » Electron_User_tape18b_acorn_eu_1991_january.wav » R.Graph
File contents
10REM Program to graph a function 20REM by Nigel Jones 30REM (c) The Micro User 40REM January 1991 50MODE 0:VDU 22,7:@%=&20205 60PRINT TAB(7)"Graph Plotter by Nigel Jones"'TAB(6);CHR$145;STRING$(28,",") 70REPEAT:INPUT TAB(0,6)"Function to be plotted: Y="func$:UNTIL func$<>"" 80REPEAT:PRINT TAB(0,9)STRING$(120," "):INPUT TAB(0,9)"Minimum X value: "minx:INPUT TAB(0,11)"Maximum X value: "maxx:UNTIL maxx>minx 90REPEAT:PRINT TAB(0,14)STRING$(120," "):INPUT TAB(0,14)"Minimum Y value: "miny:INPUT TAB(0,16)"Maximum Y value: "maxy:UNTIL maxy>miny 100MODE 0:VDU19,0,7;0;19,1,4;0;:rangex=maxx-minx:rangey=maxy-miny:cx=rangex/1280:cy=rangey/1024:IF miny<0 THEN ay=ABS(miny) ELSE ay=0 110ay=ay/cy:MOVE 0,ay:DRAW 1280,ay:IF minx<0 THEN ax=ABS(minx) ELSE ax=0 120ax=ax/cx:MOVE ax,0:DRAW ax,1024:VDU 5:FOR inc=0 TO 7:MOVE 160*inc,ay:PRINT STR$(INT(((160*inc*cx)+minx)*10+0.5)/10):MOVE ax+4,128*inc:PRINT STR$(INT(((128*inc*cy)+miny)*10+0.5)/10) 130NEXT:PRINT TAB(1,1)"Graph of Y="func$:GCOL 0,1:X=minx+0*cx:Y=(EVAL(func$)-miny)/cy:MOVE X,Y 140FOR inc=0 TO 1280 STEP 2:X=minx+inc*cx:Y=(EVAL(func$)-miny)/cy:DRAW inc,Y:NEXT:VDU 4:PRINT TAB(0,5);:END
!� Program to graph a function � by Nigel Jones � (c) The Micro User (� January 1991 2� 0:� 22,7:@%=&20205 <9� �7)"Graph Plotter by Nigel Jones"'�6);�145;�28,",") F:�:� �0,6)"Function to be plotted: Y="func$:� func$<>"" Pa�:� �0,9)�120," "):� �0,9)"Minimum X value: "minx:� �0,11)"Maximum X value: "maxx:� maxx>minx Zc�:� �0,14)�120," "):� �0,14)"Minimum Y value: "miny:� �0,16)"Maximum Y value: "maxy:� maxy>miny dx� 0:�19,0,7;0;19,1,4;0;:rangex=maxx-minx:rangey=maxy-miny:cx=rangex/1280:cy=rangey/1024:� miny<0 � ay=�(miny) � ay=0 n:ay=ay/cy:� 0,ay:� 1280,ay:� minx<0 � ax=�(minx) � ax=0 x�ax=ax/cx:� ax,0:� ax,1024:� 5:� inc=0 � 7:� 160*inc,ay:� �(�(((160*inc*cx)+minx)*10+0.5)/10):� ax+4,128*inc:� �(�(((128*inc*cy)+miny)*10+0.5)/10) �L�:� �1,1)"Graph of Y="func$:� 0,1:X=minx+0*cx:Y=(�(func$)-miny)/cy:� X,Y �R� inc=0 � 1280 � 2:X=minx+inc*cx:Y=(�(func$)-miny)/cy:� inc,Y:�:� 4:� �0,5);:� �
00000000 0d 00 0a 21 f4 20 50 72 6f 67 72 61 6d 20 74 6f |...!. Program to| 00000010 20 67 72 61 70 68 20 61 20 66 75 6e 63 74 69 6f | graph a functio| 00000020 6e 0d 00 14 14 f4 20 62 79 20 4e 69 67 65 6c 20 |n..... by Nigel | 00000030 4a 6f 6e 65 73 0d 00 1e 18 f4 20 28 63 29 20 54 |Jones..... (c) T| 00000040 68 65 20 4d 69 63 72 6f 20 55 73 65 72 0d 00 28 |he Micro User..(| 00000050 12 f4 20 4a 61 6e 75 61 72 79 20 31 39 39 31 0d |.. January 1991.| 00000060 00 32 18 eb 20 30 3a ef 20 32 32 2c 37 3a 40 25 |.2.. 0:. 22,7:@%| 00000070 3d 26 32 30 32 30 35 0d 00 3c 39 f1 20 8a 37 29 |=&20205..<9. .7)| 00000080 22 47 72 61 70 68 20 50 6c 6f 74 74 65 72 20 62 |"Graph Plotter b| 00000090 79 20 4e 69 67 65 6c 20 4a 6f 6e 65 73 22 27 8a |y Nigel Jones"'.| 000000a0 36 29 3b bd 31 34 35 3b c4 32 38 2c 22 2c 22 29 |6);.145;.28,",")| 000000b0 0d 00 46 3a f5 3a e8 20 8a 30 2c 36 29 22 46 75 |..F:.:. .0,6)"Fu| 000000c0 6e 63 74 69 6f 6e 20 74 6f 20 62 65 20 70 6c 6f |nction to be plo| 000000d0 74 74 65 64 3a 20 59 3d 22 66 75 6e 63 24 3a fd |tted: Y="func$:.| 000000e0 20 66 75 6e 63 24 3c 3e 22 22 0d 00 50 61 f5 3a | func$<>""..Pa.:| 000000f0 f1 20 8a 30 2c 39 29 c4 31 32 30 2c 22 20 22 29 |. .0,9).120," ")| 00000100 3a e8 20 8a 30 2c 39 29 22 4d 69 6e 69 6d 75 6d |:. .0,9)"Minimum| 00000110 20 58 20 76 61 6c 75 65 3a 20 22 6d 69 6e 78 3a | X value: "minx:| 00000120 e8 20 8a 30 2c 31 31 29 22 4d 61 78 69 6d 75 6d |. .0,11)"Maximum| 00000130 20 58 20 76 61 6c 75 65 3a 20 22 6d 61 78 78 3a | X value: "maxx:| 00000140 fd 20 6d 61 78 78 3e 6d 69 6e 78 0d 00 5a 63 f5 |. maxx>minx..Zc.| 00000150 3a f1 20 8a 30 2c 31 34 29 c4 31 32 30 2c 22 20 |:. .0,14).120," | 00000160 22 29 3a e8 20 8a 30 2c 31 34 29 22 4d 69 6e 69 |"):. .0,14)"Mini| 00000170 6d 75 6d 20 59 20 76 61 6c 75 65 3a 20 22 6d 69 |mum Y value: "mi| 00000180 6e 79 3a e8 20 8a 30 2c 31 36 29 22 4d 61 78 69 |ny:. .0,16)"Maxi| 00000190 6d 75 6d 20 59 20 76 61 6c 75 65 3a 20 22 6d 61 |mum Y value: "ma| 000001a0 78 79 3a fd 20 6d 61 78 79 3e 6d 69 6e 79 0d 00 |xy:. maxy>miny..| 000001b0 64 78 eb 20 30 3a ef 31 39 2c 30 2c 37 3b 30 3b |dx. 0:.19,0,7;0;| 000001c0 31 39 2c 31 2c 34 3b 30 3b 3a 72 61 6e 67 65 78 |19,1,4;0;:rangex| 000001d0 3d 6d 61 78 78 2d 6d 69 6e 78 3a 72 61 6e 67 65 |=maxx-minx:range| 000001e0 79 3d 6d 61 78 79 2d 6d 69 6e 79 3a 63 78 3d 72 |y=maxy-miny:cx=r| 000001f0 61 6e 67 65 78 2f 31 32 38 30 3a 63 79 3d 72 61 |angex/1280:cy=ra| 00000200 6e 67 65 79 2f 31 30 32 34 3a e7 20 6d 69 6e 79 |ngey/1024:. miny| 00000210 3c 30 20 8c 20 61 79 3d 94 28 6d 69 6e 79 29 20 |<0 . ay=.(miny) | 00000220 8b 20 61 79 3d 30 0d 00 6e 3a 61 79 3d 61 79 2f |. ay=0..n:ay=ay/| 00000230 63 79 3a ec 20 30 2c 61 79 3a df 20 31 32 38 30 |cy:. 0,ay:. 1280| 00000240 2c 61 79 3a e7 20 6d 69 6e 78 3c 30 20 8c 20 61 |,ay:. minx<0 . a| 00000250 78 3d 94 28 6d 69 6e 78 29 20 8b 20 61 78 3d 30 |x=.(minx) . ax=0| 00000260 0d 00 78 95 61 78 3d 61 78 2f 63 78 3a ec 20 61 |..x.ax=ax/cx:. a| 00000270 78 2c 30 3a df 20 61 78 2c 31 30 32 34 3a ef 20 |x,0:. ax,1024:. | 00000280 35 3a e3 20 69 6e 63 3d 30 20 b8 20 37 3a ec 20 |5:. inc=0 . 7:. | 00000290 31 36 30 2a 69 6e 63 2c 61 79 3a f1 20 c3 28 a8 |160*inc,ay:. .(.| 000002a0 28 28 28 31 36 30 2a 69 6e 63 2a 63 78 29 2b 6d |(((160*inc*cx)+m| 000002b0 69 6e 78 29 2a 31 30 2b 30 2e 35 29 2f 31 30 29 |inx)*10+0.5)/10)| 000002c0 3a ec 20 61 78 2b 34 2c 31 32 38 2a 69 6e 63 3a |:. ax+4,128*inc:| 000002d0 f1 20 c3 28 a8 28 28 28 31 32 38 2a 69 6e 63 2a |. .(.(((128*inc*| 000002e0 63 79 29 2b 6d 69 6e 79 29 2a 31 30 2b 30 2e 35 |cy)+miny)*10+0.5| 000002f0 29 2f 31 30 29 0d 00 82 4c ed 3a f1 20 8a 31 2c |)/10)...L.:. .1,| 00000300 31 29 22 47 72 61 70 68 20 6f 66 20 59 3d 22 66 |1)"Graph of Y="f| 00000310 75 6e 63 24 3a e6 20 30 2c 31 3a 58 3d 6d 69 6e |unc$:. 0,1:X=min| 00000320 78 2b 30 2a 63 78 3a 59 3d 28 a0 28 66 75 6e 63 |x+0*cx:Y=(.(func| 00000330 24 29 2d 6d 69 6e 79 29 2f 63 79 3a ec 20 58 2c |$)-miny)/cy:. X,| 00000340 59 0d 00 8c 52 e3 20 69 6e 63 3d 30 20 b8 20 31 |Y...R. inc=0 . 1| 00000350 32 38 30 20 88 20 32 3a 58 3d 6d 69 6e 78 2b 69 |280 . 2:X=minx+i| 00000360 6e 63 2a 63 78 3a 59 3d 28 a0 28 66 75 6e 63 24 |nc*cx:Y=(.(func$| 00000370 29 2d 6d 69 6e 79 29 2f 63 79 3a df 20 69 6e 63 |)-miny)/cy:. inc| 00000380 2c 59 3a ed 3a ef 20 34 3a f1 20 8a 30 2c 35 29 |,Y:.:. 4:. .0,5)| 00000390 3b 3a e0 0d ff |;:...| 00000395