Sharp PC1211/TRS80 PC1 program tapes from Radio Shack

08092021, 09:20 PM
Post: #21




RE: Sharp PC1211/TRS80 PC1 program tapes from Radio Shack
The only other snag that comes to mind at the moment would be if there's any implied multiplication of variables that just happens to spell some new reserved word in the PC1250 (implied multiplication would have to be made explicit for the 1260, 1403, etc.). Seems extremely unlikely to happen, though.


08102021, 03:13 AM
Post: #22




RE: Sharp PC1211/TRS80 PC1 program tapes from Radio Shack
(08092021 08:53 PM)Bill (Smithville NJ) Wrote:Quote:This document might be useful. I'm glad you liked it. But then, have a look at this one, you're gonna love it ! Quote:.Thanks for the PDF and comments. I knew if anyone knew of other problems I might have, it would be you. Thanks to you for your appreciation and kind words. Best of luck with your project. Regards. V. All My Articles & other Materials here: Valentin Albillo's HP Collection 

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" 

08122021, 11:43 AM
Post: #24




RE: Sharp PC1211/TRS80 PC1 program tapes from Radio Shack
Valentin,
Quote:I'm glad you liked it. But then, have a look at this one, you're gonna love it ! Wow!! You are right. I do love it. Thanks. I have just finished going through the basic source codes for the tape packages that Dave so nicely provided. I now need to load and run them on each of the emulators, typically using the the examples in the manuals. It's interesting. Some of the Tape packages made extensive use of implicit multiplication while others either made no use or very limited use. I guess it depended on who was doing the programming. 73 Bill WD9EQD Smithville, NJ 

08122021, 12:10 PM
Post: #25




RE: Sharp PC1211/TRS80 PC1 program tapes from Radio Shack
In the Surveying Package, I think there's errors in the original code for the CLOSE and TAPE programs.
For example, Lines 79 and 80 from the CLOSE program reads: 79 IF M>=360M=M360 80 IF M<0M=M+360 I think a "LET" is needed as follows: 79 IF M>=360 LET M=M360 80 IF M<0 LET M=M+360 I'm testing on a PC1251 emulator. So I'm not sure if the LET is required on a PC1211 which the program was written for. Could someone test on an actual PC1211 pr PC1. The TAPE program also as several statements that would also require the addition of a LET. 73 Bill WD9EQD Smithville, NJ 

08122021, 12:53 PM
Post: #26




RE: Sharp PC1211/TRS80 PC1 program tapes from Radio Shack
(08122021 12:10 PM)Bill (Smithville NJ) Wrote: In the Surveying Package, I think there's errors in the original code for the CLOSE and TAPE programs. I am not familiar with this specific flavor, but in many flavors of BASIC, LET can be implicit, so the two versions of the lines are functionally equivalent, with the original ones possibly being a bit smaller (in bytes). It's easy to try, give it a shot. Bob Prosperi 

08122021, 01:18 PM
Post: #27




RE: Sharp PC1211/TRS80 PC1 program tapes from Radio Shack
Hi Bob,
Quote:I am not familiar with this specific flavor, but in many flavors of BASIC, LET can be implicit, so the two versions of the lines are functionally equivalent, with the original ones possibly being a bit smaller (in bytes). It's easy to try, give it a shot. When I try it with and without the LET, I get two different answers on the PC1251 emulator. For example: 10 M=400 79 IF M>=360M=M360 100 Print M This prints 400. But if I add the LET: 10 M=400 79 IF M>=360 LET M=M360 100 Print M This prints 40. ( This is the correct answer) I think the first version has problems with the implicit multiplication of 360M. 73 Bill WD9EQD Smithville, NJ 

08122021, 01:50 PM
Post: #28




RE: Sharp PC1211/TRS80 PC1 program tapes from Radio Shack
Yes, I believe you are correct that there's an error in the original programs. The PC1211 and PC1250/1251 both require LET when making a variable assignment immediately following IF. The THEN keyword is only used as a synonym for GOTO following an IF. All of the Sharp pocket computers I've used have these same syntax rules.
Some examples: IF X>1 THEN 200 IF X>1 GOTO 200 IF X>1 LET X=X1 IF X>1 PRINT "X>1" I'm surprised that IF M>=360M=M360 doesn't throw a syntax error since there's no subordinate statement following the IF. I'm assuming the condition ends up being evaluated as something like IF (M>=(360M))=(M360). Interestingly, several of the manuals contained either a printed addendum/errata, or handwritten notes and corrections from the previous owner, but the surveying manual appears to lack either. 

08142021, 07:18 PM
Post: #29




RE: Sharp PC1211/TRS80 PC1 program tapes from Radio Shack
(08122021 01:18 PM)Bill (Smithville NJ) Wrote: For example: This might give the expected result: Code: 10 M=400 There are only 10 types of people in this world. Those who understand binary and those who don't. 

« Next Oldest  Next Newest »

User(s) browsing this thread: