Sharp PC1211/TRS80 PC1 program tapes from Radio Shack

08112021, 05:50 PM
Post: #23




RE: Sharp PC1211/TRS80 PC1 program tapes from Radio Shack
(08082021 09:43 PM)Bill (Smithville NJ) Wrote: I’ve been looking at what it would take to modify the programs so that they would run on more Pocket Computers. At present, the programs will run without modifications on the Sharp PC1211 (Trs80 PC1) and the Sharp PC125x (TRS80 PC3) I think it would be nice if they could also be run on the Sharp PC126x and PC1350/1360 series. It's not too difficult to generalize PC1211 and PC125x BASIC to run on 12xx, PC13xx and PC14xx series of pocket computers with some guidance (see below). Not so to the PC1500/1600 and the E and G series that offer different BASIC interpreters, see the diagram at https://sharppocketcomputers.com/#basic For help and a more indepth comparison of BASIC across brands and types of pocket computers, see http://basic.hopto.org/basic/manual/basiccompare.pdf (the site appears down today, attached is the PDF for your convenience). These series of earlier PC support the special A() array that grows dynamically in size (and can hold 7char strings), and support the ? and √ symbols, etc. By contrast, it is nearly impossible to port later series PC with new commands to the earlier series PC that lack these commands and functions such as SQU, CUB, CUR, REC, POL, HSN, HCS, HTN, TEN. Though these can be replaced with expressions. Very good point in your post about implicit multiplication, which is something to watch out for (and not elaborated in the PDF), to replace with * or / as needed and by using parenthesis, e.g. X^2Y becomes X^(2*Y) and 1/XY becomes 1/(X*Y) or 1/X/Y and functions w/o parenthesis such as SQR XY becomes SQR(X*Y). Even SHARP's Application books made mistakes when translating older Application books to the newer nonimplicitmultiplication BASIC versions. For example, in "Computing the Sciences  Applications for the PC14xx" (and EL55xx) the Ttest program has an implicit multiplication bug, here copied verbatim from the Computing the Sciences for EL5520 (PC1450) and EL5500III (PC1403) books I own: \[ t = \frac{\bar x\mu_0}{s/\sqrt n} = \frac{\frac{\sum x}{n}\mu_0}{\sqrt{\frac{\sum x^2n(\sum x/n)^2}{n(n1)}}} = \frac{Y/ZA}{(XZ(Y/Z)^2)/Z(Z1)} \] Program: 10 PAUSE "TTEST" 20 INPUT "POP.MEAN=";A 30 T=(Y/ZA)/√((XZ*SQU(Y/Z))/Z*(Z1)) 40 USING "##.###^" 50 PRINT "T=";T The writers made a mistake to replace implicit multiplication with a * instead of a /. It is rare that SHARP made this error. I have not seen any other obvious math issues in their books and materials.  Rob "I count on old friends to remain rational" 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)