HP71B: lets come to speed
|
10-04-2021, 03:47 PM
Post: #1
|
|||
|
|||
HP71B: lets come to speed
Hello,
I would like to use the HP71B for having a better numerical precision than few programs running for now on my HP41. (NO, I will not use python or others in my Debian 64bits PC ;-). For example, I would like to rewrite the basic program from ellipse perimeter calculation in http://www.numericana.com/answer/ellipse.htm#elliptic chapter "(2001-01-25) Very Precise Fast Computations" into an HP71B like basic. Is there any editor similar to the hp41uc, compiling any TXT file into other files format for direct upload into the HP71 emulator? Ok ok, using my fingers direct into the HP71 is possible. However, any advice how to use a wide PC Text-Editor would be good (I can open several programs in parallel and make a quicker creation of routines). If there is nothing for Basic, then I can invest time and move directly to HP71B FORTH: is there any PC editor for it? (same: PC TXT editor or others to be compiled into a file format for upload into EMU71). Thanks. HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
10-04-2021, 03:59 PM
Post: #2
|
|||
|
|||
RE: HP71B: lets come to speed
Yes. Edit your text file using your favorite editor, copy it to Emu71, and TRANSFORM the file into BASIC.
|
|||
10-04-2021, 07:57 PM
(This post was last modified: 10-04-2021 08:25 PM by floppy.)
Post: #3
|
|||
|
|||
RE: HP71B: lets come to speed
ah ok.
with this help? http://www.namirshammas.com/HP71B/EMU71.htm I will try later. I am now in the editor in the PC. So far, I made 3 different functions in 1 file. More to come. Question 1: all variables of the 3 functions will be "local" or "global"? Are all variables in BASIC local for the separate functions? (I am using the same letters A or B or C or D.. in the functions and would not like it would have collisions; in an HP41 this is clear: a register used will be used from everywhere. Not sure if the variables in HP71B are like registers in HP41 it means unique and will be overwritten from other routines). Question 2: several functions or several subroutines can be in 1 file or they should be separated one function or one subroutine in one file? Question 3: how many calls of calls of calls.. can make a BASIC program in HP71B? Question 4: can make an HP71B BASIC program a call of itself? how many time? Sorry for the weird questions but I am a beginner. HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
10-04-2021, 09:54 PM
(This post was last modified: 10-05-2021 12:07 AM by Albert Chan.)
Post: #4
|
|||
|
|||
RE: HP71B: lets come to speed
Question 1, Except for arguments of function, variables are global.
This is similar to Awk programming language Example, for perimeter of ellipse AGM code, updated with all local variables. (Awk style, with spaces separating arguments from local variables) Code: 10 DEF FNP(A,B) = FNQ(A,B,A*A+B*B,1,0) >RUN >FNP(20,10) 96.8844822058 >FNP(20,5) 85.7842177517 >FNP(20,1) 80.3885123826 |
|||
10-04-2021, 10:41 PM
Post: #5
|
|||
|
|||
RE: HP71B: lets come to speed
(10-04-2021 07:57 PM)floppy Wrote: Question 1: all variables of the 3 functions will be "local" or "global"? Are all variables in BASIC local for the separate functions? Functions, DEF FN : variables used within the function definition are global, except for the function parameters, ¡f any, which are local. Subprograms, SUB: all variables defined or used within the subprogram are local; parameters can have their values passed by value (so they are local) or by reference (so they are global). Quote:Question 2: several functions or several subroutines can be in 1 file or they should be separated one function or one subroutine in one file? I think that by "subroutines" you actually mean "subprograms". Any number of function definitions and/or subprograms may be present in a single file or on multiple files. Functions can only be called from their own file, you can't call from one file a function which is defined in another file. On the contrary, subprograms can be called from their own file or from any other. Quote:Question 3: how many calls of calls of calls.. can make a BASIC program in HP71B? No limit, i.e., limited only by available memory. The calls may be recursive, i.e., the subprogram can call itself, also no limit on the recursion levels depth except available memory. Functions can also be recursive but you have to be very careful with the variables used inside, as they are global for all levels of recursion. Even non multi-line functions can be recursive (tricky). Quote:Question 4: can make an HP71B BASIC program a call of itself? how many time? I think you mean "subprogram" instead of "program". The answer is the same as the previous question, there's no limit on the number of recursive calls except available memory. V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
10-06-2021, 10:15 AM
Post: #6
|
|||
|
|||
RE: HP71B: lets come to speed
(10-04-2021 03:59 PM)Dave Frederickson Wrote: copy it to Emu71How? My doing so far under Linux Debian11 64bits and Wine/Emu71 with pyILPER connected with Emu71: - Page 4 of http://www.jeffcalc.hp41.eu/hpil/files/doslink.pdf was used - Error at the Emu71: "HPIL ERR L50:Device Not Found" DOSLINK is probably an issue in my environment. A workaround is welcome. HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
10-07-2021, 12:03 AM
(This post was last modified: 10-07-2021 12:04 AM by Dave Frederickson.)
Post: #7
|
|||
|
|||
RE: HP71B: lets come to speed
(10-06-2021 10:15 AM)floppy Wrote:(10-04-2021 03:59 PM)Dave Frederickson Wrote: copy it to Emu71How? DOSLINK is one option. Don't forget to add a LIF file header to your text file using aLIFhdr. https://hp.giesselink.com/Pcuti/alifhdr32.zip Maybe someone with Linux experience can help out. Another method is to copy the text file to a LIF disk image then mount the image and copy the file. I use HPDir under Windows but there is a Linux version. https://www.hp9845.net/9845/projects/hpdir/ Alternatively, lifutils will run under Linux. https://github.com/bug400/lifutils Dave |
|||
10-07-2021, 07:57 AM
Post: #8
|
|||
|
|||
RE: HP71B: lets come to speed
(10-07-2021 12:03 AM)Dave Frederickson Wrote: Don't forget to add a LIF file header to your text file using aLIFhdr. No. It's either you use a plain text file and read it line per line with a short program (as I've documented in the DOSLINK presentation), OR you transform the plain text file into a LIF TEXT file using Christoph's alifhdr32 utility option /T (not my aLIFhdr version that doesn't support this option), and then just do COPY :DOSLINK. The alifhdr32 path is simpler, sure. But not sure it will run the OP environment. J-F |
|||
10-07-2021, 08:17 AM
Post: #9
|
|||
|
|||
RE: HP71B: lets come to speed
(10-07-2021 07:57 AM)J-F Garnier Wrote:(10-07-2021 12:03 AM)Dave Frederickson Wrote: Don't forget to add a LIF file header to your text file using aLIFhdr. I've never used the short program method. I either use ILPer from Christoph's site, which includes a DOSLINK interface, or HPDir, which optionally converts the file to LIF TEXT. But I run Windows, not Linux. Dave |
|||
10-08-2021, 10:43 AM
Post: #10
|
|||
|
|||
RE: HP71B: lets come to speed
Hello,
Thanks. hpdir is installed under linux 64bits. It starts. See below. Now: what is the full command to use? in a terminal; ./hpdir Quote:Usage: hpdir [<action>][<options>] <parameters> ./hpdir -c PERCS.TXT -lif PERE.LIF Error: Unsupported format HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
10-08-2021, 02:32 PM
Post: #11
|
|||
|
|||
RE: HP71B: lets come to speed
(10-08-2021 10:43 AM)floppy Wrote: Hello, Close! ./hpdir -add -c PERCS.TXT PERE.LIF Note: PERE.LIF must exist. You can create a blank lif disc image using: ./hpdir -initialize -lif -9122 _new.lif Dave |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)