Question about HP71B Variable Names
|
01-17-2021, 03:21 AM
Post: #1
|
|||
|
|||
Question about HP71B Variable Names
Is it possible at all to enhance programming the HP-71B by making it BASIC support longer variable names? The curent variable naming scheme is very limited.
Namir |
|||
01-17-2021, 04:03 AM
Post: #2
|
|||
|
|||
RE: Question about HP71B Variable Names
What I've done is write programs in text with my text editor, with variable names being anything I want, then use the search-and-replace to substitute-in names the 71 can accept, then TRANSFORM it into BASIC. You'll need to keep a copy of the original text file so you'll still have the original names for the iterative write-transform-try cycle. Doing it this way, I can also have white space, and write without line numbers, and I have a utility to add the line numbers before it transforms the program into BASIC.
http://WilsonMinesCo.com (Lots of HP-41 links at the bottom of the links page, at http://wilsonminesco.com/links.html#hp41 ) |
|||
01-17-2021, 08:51 AM
Post: #3
|
|||
|
|||
RE: Question about HP71B Variable Names
(01-17-2021 04:03 AM)Garth Wilson Wrote: What I've done is write programs in text with my text editor, with variable names being anything I want, then use the search-and-replace to substitute-in names the 71 can accept, then TRANSFORM it into BASIC. You'll need to keep a copy of the original text file so you'll still have the original names for the iterative write-transform-try cycle. Doing it this way, I can also have white space, and write without line numbers, and I have a utility to add the line numbers before it transforms the program into BASIC. Yes I have written a similar program on the PC that replaces long variabke names with 71B-BASIC-compliant names. Namir |
|||
01-19-2021, 12:49 AM
Post: #4
|
|||
|
|||
RE: Question about HP71B Variable Names
(01-17-2021 03:21 AM)Namir Wrote: Is it possible at all to enhance programming the HP-71B by making it BASIC support longer variable names? It would break havoc on so many things that it would need a very major rewrite of the whole system, in particular the parsing of BASIC statements and functions. For instance, how would the system be able to distinguish between what you meant when entering at the keyboard this piece of code FORK=ATOX i.e., assign the value of variable "ATOX" to variable "FORK" from this other meaning ? FORK=ATOX i.e., initialize a FOR loop with index variable "K" going from the value of variable "A" to the value of variable "X" Of course that's a quick example, there's a zillion others. Another concern is speed, the HP-71B is quite a slow beast (even back at the time, as compared to the HP-75C or the HP-85, say, about 5x slower) and having long variable names would greatly worsen the situation. Decades ago, when I wrote HP-86/87 commercial programs for a living, I was happy at first that their version of BASIC allowed for long variable names, which the HP-85 didn't, but eventually decided to use the short letter-digit ones because using the long ones negatively affected the performance, as the code was interpreted, not compiled. V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
01-19-2021, 01:48 AM
Post: #5
|
|||
|
|||
RE: Question about HP71B Variable Names
Quote:Yes I have written a similar program on the PC that replaces long variable names with 71B-BASIC-compliant names. I did it on the 71 itself, before I ever had a PC. Quote:Another concern is speed, the HP-71B is quite a slow beast (even back at the time, as compared to the HP-75C or the HP-85, say, about 5x slower) Do you have any speed comparisons, for different types of benchmarks? I know it was slower for something like a FOR...NEXT loop (probably because the 75 had a wider data bus), but I think the 71 was much, much faster in math that involved the math module. The two computers had approximately the same clock speed, but the 71 could address eight times as much memory (which was great for when I had 128KB arrays plus all my programs in RAM), had a better BASIC, (I think) bigger registers (64-bit, and I can't find the 75's register size but I think it's 8-bit), and the 71 had the benefit of a ton of great LEX files not only from HP but also from the users' groups. I wrote my very capable text editor mentioned above (which includes the search-and-replace, with wildcard capability too) to include a lot of great LEX files from the Paris users' group, material that was published in the CHHU Chronicle. http://WilsonMinesCo.com (Lots of HP-41 links at the bottom of the links page, at http://wilsonminesco.com/links.html#hp41 ) |
|||
01-19-2021, 09:11 AM
(This post was last modified: 01-19-2021 09:18 AM by J-F Garnier.)
Post: #6
|
|||
|
|||
RE: Question about HP71B Variable Names
(01-19-2021 01:48 AM)Garth Wilson Wrote:Quote:Another concern is speed, the HP-71B is quite a slow beast (even back at the time, as compared to the HP-75C or the HP-85, say, about 5x slower) You can have a look at this benchmark with many machines. Results for the 71 and 75: - 46.2 HP-75C Basic / Fast Integer - 2:33 HP-71B Basic / Ver.1BBBB so a ratio of 3, mainly due to the "Fast Integer Processing" of the 75. For pure math non-integer operations, the ratio is about 2 still in favour of the 75. Reason is that the 75 CPU is internally a 8-bit machine whereas the 71 is a 4-bit one requiring twice the number of clock cycles for the same operation. However, the designers of the HP-71 Math ROM optimized the code, especially the matrix operations, to get acceptable performances, basically using pointers instead of indexes to access arrays (in C style: using *a instead of a[i]). This reduced the pointer calculation overhead but still the HP-71 is not a fast math machine. J-F |
|||
01-19-2021, 06:33 PM
Post: #7
|
|||
|
|||
RE: Question about HP71B Variable Names
.
Hi, Garth: (01-19-2021 01:48 AM)Garth Wilson Wrote: Do you have any speed comparisons, for different types of benchmarks? I know it was slower for something like a FOR...NEXT loop (probably because the 75 had a wider data bus), but I think the 71 was much, much faster in math that involved the math module. I conducted pretty exhaustive speed comparisons at the time (~35 years ago, now lost) because I had to evaluate whether the HP-75C could be useful to develop and sell our commercial engineering software for it or else the HP-71B would be preferable (significantly lower price though still very expensive). I eventually concluded that the HP-75C was much faster in general, period, but in the end we discarded them both because their price and capabilities meant too few sales and so it wasn't profitable for us to develop our software for them, as engineer firms would rather buy it for the much more capable HP-85/86/87. Quote:The two computers had approximately the same clock speed, but the 71 could address eight times as much memory [...] Most of it is correct (the registers' sizes are not) but nevertheless the HP-75C was at a minimum 2x faster than the HP-71B, usually 3x-4x faster in practice. Alas, the 71 was nevertheless much much faster than the HP-41C but at 5x-6x the price, so very few people bought it. Quote:I wrote my very capable text editor [...] to include a lot of great LEX files from the Paris users' group, material that was published in the CHHU Chronicle. Certainly. The HP-75C was a clunker, I never liked it, too big and heavy, too little RAM, a one-line display (while inexpensive SHARP models had 4 lines x 40 characters and pixel-addressable graphics), ultra-expensive, a complete failure that never sold here (Spain). I've never seen anyone own it and I never wrote a program for it other than the benchmarks. It simply had no appeal for me nor anyone else, it seems. The HP-71B on the other hand, I loved instantly and people developed tons of excellent software and language extensions for it, but in Spain it also didn't sell at all. I saw a few (you could count'em with the fingers of one hand, with some to spare) owned by wealthy engineers and that's all, no market to profitably develop anything commercial for it. And slow as molasses when compared to something like an HP-85/86/87 or even a lowly IBM PC running a Turbo-Pascal compiled executable. Plus the 1-line 22-char display was a big no-no. Regards. V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
01-19-2021, 06:57 PM
Post: #8
|
|||
|
|||
RE: Question about HP71B Variable Names
Speed comparisons from Joe Horn in the PPC Computer Journal using some common BASIC benchmarks. Attached is the PDF - Valentin, let's see if you can read this. :-)
Gene HP71B - How fast PPC Computer Journal V2N6P24-25.pdf (Size: 327.45 KB / Downloads: 22) |
|||
01-19-2021, 06:58 PM
(This post was last modified: 01-19-2021 07:31 PM by Valentin Albillo.)
Post: #9
|
|||
|
|||
RE: Question about HP71B Variable Names
.
Hi, J-F: In the linked thread you say: Quote:The Fast Integer Processing comes from the HP-85 [...] It's a shame that the same feature was not included in the HP-71B! It seems they needed the ROM space for the useless abomination called "CALC mode", as some über-imbecile people decided it would bring more sales appeal than having much faster program execution. Hey, J-F, come to it, why don't you edit CALC mode out of the System ROMs and use the recovered ROM space (5 Kb) to provide instead the super-useful keywords in the STRINGLX file and some other worthy LEX files, as you did with the enhanced Math ROM ? The resulting 1CDDD (say) System ROMs could then be available as part of your Ultimate ROM and/or the MultiMod. A dream come true ! Best regards. V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
01-19-2021, 08:13 PM
Post: #10
|
|||
|
|||
RE: Question about HP71B Variable Names
(01-19-2021 06:57 PM)Gene Wrote: Speed comparisons from Joe Horn in the PPC Computer Journal using some common BASIC benchmarks. Attached is the PDF - Valentin, let's see if you can read this. :-) It's somewhat interesting, but the speed will be affected a lot by the FOR...NEXT's which we already knew are slow, and line-number searching, but the benchmarks don't do the trig, log, and matrix operations which is where I think the 71 would shine. My longest-running project ran the 71 for weeks to calculate large tables for math functions and produce 6MB of Intel Hex files, but I suspect that a major thing slowing it down was all the text and occurrences of HTD and DTH$. (01-19-2021 06:58 PM)Valentin Albillo Wrote: It seems they needed the ROM space for the useless abomination called "CALC mode", as some über-imbecile people decided it would bring more sales appeal than having much faster program execution. I agree. I was never able to develop any liking for that CALC mode. It's pretty worthless to me. http://WilsonMinesCo.com (Lots of HP-41 links at the bottom of the links page, at http://wilsonminesco.com/links.html#hp41 ) |
|||
01-19-2021, 10:07 PM
Post: #11
|
|||
|
|||
RE: Question about HP71B Variable Names
.
Hi, Gene: (01-19-2021 06:57 PM)Gene Wrote: Speed comparisons from Joe Horn in the PPC Computer Journal using some common BASIC benchmarks. Attached is the PDF - Valentin, let's see if you can read this. :-) Yes, I could, thanks for caring ! My problem is usually restricted to Dropbox and other such obnoxious services, a simple direct link to the PDF file works as a charm every time. As for J. Horn's speed comparison, some comments. Joe says: Horn Wrote:VAL (actually evaluates a string as if it were a math expression of any complexity) Not only of any complexity but of any size too. Evaluating math expressions from the command line is limited to less than 100 characters long and a similar limit applies to expressions in program lines, but the string VAL evaluates isn't limited that way. Look at the Step the Third subchallenge in my Short & Sweet Math Challenges #23: "May the 4th Be With You !" Special (looky here), where VAL evaluates a 1,307-character string, then a 2,708-char one. The function arguments for FNROOT and INTEGRAL aren't limited in size either. Horn Wrote:CALC (a fast claculator (sic) mode) "Claculator", indeed, it does nothing but claculate, a lot, where "claculate" stands for any of the usual four-letter curses. As for "fast", Joe was surely kidding. Horn Wrote:The table below shows how fast the HP-71B and some other small computers run seven BASIC benchmark programs [...] These kind of benchmarks were useless to me to determine whether to invest a significant time and effort (i.e., money) in adapting our engineering software to run in the HP-71B or not, so I created fully-optimized benchmarks which specifically reflected what our engineering software internally needed to do, using the machine's capabilities to the fullest (variables' precision, ROMs, even LEX files). That's the kind of benchmark you need to see if the speed is adequate and avoid wasting money if not, and I saw that the HP-71B was useable but 3x slower than the slowest competitor. In the end we discarded it and the HP-75C and went for the HP-86/87, then the HP-150/150II, then the HP-9816/26/36, then the Vectra Series, etc. The HP-71B just couldn't compare for medium/large engineering projects for speed and cost reasons, amongst others. At the time, I saw it as more appropriate for such things as controlling lab instrumentation and things like that (UK's NHS, for instance). One of my friends used it to gather data from instruments atop mountain locations to afterwards transfer them to his HP-150 at home for heavy-duty processing and plotting (DIN A0) the results. Best regards. V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
01-20-2021, 12:10 PM
Post: #12
|
|||
|
|||
RE: Question about HP71B Variable Names
(01-19-2021 06:57 PM)Gene Wrote: Speed comparisons from Joe Horn in the PPC Computer Journal using some common BASIC benchmarks. Attached is the PDF - Valentin, let's see if you can read this. :-) Since credit wasn't given in the article, I'll list it here. Benchmarks B1 - B7 were written by Tom Rugg and Phil Feldman and first appeared in the June 1977 issue of the US computer magazine, Kilobaud. Tom L Cui bono? |
|||
01-20-2021, 12:45 PM
(This post was last modified: 01-20-2021 12:46 PM by Maximilian Hohmann.)
Post: #13
|
|||
|
|||
RE: Question about HP71B Variable Names
Hello!
(01-20-2021 12:10 PM)toml_12953 Wrote: Since credit wasn't given in the article, I'll list it here. Benchmarks B1 - B7 were written by Tom Rugg and Phil Feldman and first appeared in the June 1977 issue of the US computer magazine, Kilobaud. Someone even cared to write a Wikipedia article about those benchmarks: https://en.wikipedia.org/wiki/Rugg/Feldman_benchmarks But honestly, this is quite trivial programming and nothing special at all, not now and not then. Every professional software developer writes more sophisticated code than that every 10 minutes during a 10-hour workday and does not get honored with Wikipedia entries for his work... Regards Max |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)