USE CURSOR KEYS TO SCROLL TEXT. USE CURSOR KEYS TO SCROLL TEXT. 8-Bit Software 8-Bit Software Issue 38 Program Documentation. Issue 38 Program Documentation. To: 999 (all members) From: K6Q (Leslie Roberts) Subject: 'FASTBAK' disk backer One of the most popular kinds of utility appears to be disk backers; well here's one that is slightly different. This one cuts down on disk swapping by backing-up only those tracks which contain files. It doesn't waste your time swapping disks simply to copy blank tracks. It achieves this by reading the disk catalogue, calculating the number of the last track used, and only copying up to that one. Please note that it will only work correctly with a properly ordered catalogue (which means most), if the last file in the catalogue is not the last file on the disk, results will be unpredictable. As with all disk-backups it is very wise to make certain that the Source disk is write-protected; you never know, accidents can so easily happen. Users of 40 track drives will need to change the number 80 (twice) in line 490 to 40. EDITOR........ I have made great use of this utility already. There are a number of "improvements" that I have made to the program to suit my needs. I have changed the program so that it requests only the source disc (0 or 1), the destination disc can then be assumed. It then copies both surfaces. It tells me which drive it is presently copying. I removed disc change prompts. The program automatically re-runs. This will save me hours and will save disc drive wear and tear. Bear in mind that the disc will copy more rapidly if it is *COMPACTed to remove gaps between programs first. ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, To: 999 (all members) From: K6N (Brian Raw) Subject: BRACKETS INFO As an exercise in string handling it was suggested I have a go at differentiation of functions in str$. I haven't completed this yet but as a starting point I thought expansion of brackets should be done first. The program deals with such as - (A+B)(C+D) result A*C+A*D+B*C+B*D As it turns out since we are dealing with strings then (SOFT+HARD)(WOOD+WATER) will also work result SOFT*WOOD+SOFT*WATER+ HARD*WOOD+HARD*WATER also any number of terms may be used (A+B+C)(D+E+F) result A*D+A*E+A*F+ B*D+B*E+B*F+ C*D+C*E+C*F also A*(B+C) result A*B+A*C and (A+B)*C result C*A+C*B ^ on the bracket should prevent expansion ie A*(B+C)^2 or 2^(A+B) or A^B*(C+D) cancellation of equal terms should be possible ie (A+B+C)(A-B+C) result A*A-A*B+A*C+ B*A-B*B+B*C+ C*A-C*B+C*C becomes A*A+A*C-B*B+C*A+C*C Functions are also allowed SIN(X)*(COS(X)+TAN(X)) and where n is a constant SIN(X+n)*(COS(X+n)+TAN(X+n)) The program is recursive so multiple expressions are allowed A*(B+C)(D+E)*F*SIN(X) I hope this is explanatory enough, try the expressions given and any others you can think of. DIFFERENTIATION IS ANOTHER MATTER ALTOGETHER AND TO BE QUITE FRANK I AM NOT SURE IT CAN BE DONE WITHIN THIS PROGRAM, HOWEVER SHOULD ANYBODY ATTEMPT IT PLEASE DO LET ME KNOW. Now to make this program worthwhile as it stands I have included the graph plotter and calculation of intersects. To use these you must keep your expressions in terms of X. Two graphs are plotted and it was intended that the differential be the second function but for now it can check that the expressions are still equal after being expanded since they should be on top of each other. However to make this facility more useful it is possible to plot two different graphs for comparison......... On running the program you are asked for the first expression ENTER F1(X) Enter something and then you are asked if the second expression is to be 0*X this will become the expanded version if required. F2(X)=0 Y/N Entering N here will cause the prompt ENTER F2(X) Enter something. Then you are asked if the differential (brackets expansion) is required. Entering N here will cause the prog to go straight to the graph routine And finally for the uninitiated to calculus some basic rules: Where F2(X) is the differential and F2(X) is the original expression F2(X)=0 then F1(X) at turning point F2(X)+ve then F1(X) is rising F2(X)-ve then F1(X) is falling Here's a few to try and see if they fit these rules for now they need to be put in as two graphs F1(X) F2(X) X^n n*X^(n-1) n^X n^X*LN(n) SIN(X) COS(X) COS(X) -SIN(X) TAN(X) (1/COS(X))^2 ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, To: 999 (all members) From: K2J (D.Lowless) Magic Eye program Original Version by L Knight This version by David Lowless Further adapted by C.J.Richardson. This program produces 3D magic eye stereogram type screens from Mode 1 bitmap files (screen dumps from mode 1 to disc). To produce a file suitable for the program prepare a mode 1 screen and type *SAVE FFFF3000+5000. 3DED is provided for this purpose. Use the demo screen option from the program menu or load in your own screen. Alternatively, you could use the *LDPIC option to load screens such as those on The Acorn User Discs. The program uses the loaded screen to produce an image taking the black to be deepest, red to be higher, then yellow then white. That is logical colours in order of depth 0,1,2,3. I have written a quick art program to draw screens: filename "3DED". Use keys ZX:/ to move. RETURN to plot a point. 0123 to select colour. The red flashing dot is the cursor. Use S to save and L to load. C clears the screen. Once you have a mode 1 screen produced by 3DED or otherwise. Simply : CH."3DEye-2". The menu gives you 3 options: 1. Use the demo screen. 2. Load a picture. 3. *LDPIC a picture. 4. Toggle Depth Direction. Use option 1 for a quick demo. Use option 2 to try out your own screen. Use option 3 if you have a disc of pictures such as those in the TAU section of the 8BS library that use *LDPIC to load. Option 4 toggles between the picture "standing out" and "going in". Some people see these Magic Eyes as standing out, others (the minority I think) see them as being set back. This option allows you to change the depth so that you can view the picture either way to see which suits you best. The plotting then begins. This may take quite a long time. Once finished, the screen is saved by the name "FIN". You can load it at any time with: MODE1:*LOAD FIN Alternatively you can print it out with a printer dump such as DUMP provided on this disc. These programs are PUBLIC DOMAIN and may be copied freely. I must stress that the main skeleton of the program is L Knight's work, not mine. David Lowless 25.9.94 EDITOR..... I must also add here that I have changed the programs and above text quite substantially for ease of use and compatibility. ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, To: 999 (all members) From: 483 (D.Shimmin.) "PalinSq" and "PalinCu" by Daniel Shimmin (483) After a suggestion from a member a few issues ago, I wrote "PalinSq" to find Palindromic numbers that have Palindromic squares. (If you don't know what a palindrome is, I will give you a clue by saying that "Bob", "mum", and "dad" are palindromes, then suggest you try running the program). The program will probably take several minutes on a 6502, finding a number of palindromic squares before reaching a number that is too large for BASIC. If you wish to stop before getting to that point, simply press . I would be interested to know why the program only finds Palindromic numbers that have Palindromic squares with an odd number of digits, or if all Palindromic squares of Palindromic numbers necessarily have an odd number of digits. Any ideas, anyone? "PalinCu" is a development of "PalinSq" which, as well as printing any Palindromic numbers that have Palindromic squares, also prints Palindromic numbers which have Palindromic cubes. Interestingly, all Palindromic numbers which have Palindromic cubes also seem to have Palindromic squares. The reason that I have supplied two separate programs, rather than simply using "PalinCu" which lists both squares and cubes, is that "PalinSq" can list more squares because it does not run into the "Number too big" error as soon. These programs are under the filenames "PalinSq" and "PalinCu", are written in BASIC II (I think), and should run on all systems with BBC BASIC (but rather faster on an Archimedes). The programs are filetyped as Archimedes BASIC, so Archimedes owners should simply double-click on the icons (or run them under the emulator from the 8BS menu), while BBC owners can run them from the 8BS menu or simply use CHAIN"" . Presentation has been kept deliberately minimal to prevent wastage of disk space and programming time. PRESS BREAK