Calculation of ellipse perimeter (need some help)

Calculation of ellipse perimeter (need some help)

Postby floppy_stuttgart » Fri Jun 25, 2021 6:33 pm

Hello,
I need a bit of support for transfering a function which calculate the ellipse perimeter by entering
a
ENTER
b
ENTER
XEQ "PERIMEL"
.. 85 lines
(no approximation, no long series, except the calculator precision; just pi and X² and + and - and / and SQRTs and..).
I would like to celebrate this function and its first use in a calculator especially an HP41 (not python, etc. the formula is in test phase in comparison with integral)
- program existing in a text form under linux 64 bit
- emu41 installed
- HP41CV or CX inHouse
- HP-IL and "Jeff famous box" by hand
If anybody would have 1h of his time (the week-end please), we could go through the whole process of converting text file into emu41 (running in "wine" window emulator under linux), then transfering into the HP41 and test-use. When I am complete, I will post all data here and my whole experience.
I am able to do it on my own, but it will take hours and hours before my ramp-up curve is behind me. Any kind help is welcome.
Programming is not new for me: only the process of interaction of an HP41 with a PC.
However, if there is any video anywhere or a tutorial how to do this, I welcome the submission of the links and I could do it on my own.
Last edited by floppy_stuttgart on Sun Jun 27, 2021 8:38 am, edited 1 time in total.
floppy_stuttgart
.........
.........
 
Posts: 99
Joined: Mon Mar 29, 2021 2:36 pm

Re: Calculation of ellipse perimeter (need some help)

Postby jeffcalc » Sat Jun 26, 2021 8:08 am

floppy_stuttgart wrote:Hello,
I need a bit of support for transfering the function "Pascal(D)" which calculate the ellipse perimeter by entering
a
ENTER
b
ENTER
XEQ "PERIMEL"
.. 85 lines
(no approximation, no long series, except the calculator precision; just pi and X² and + and - and / and SQRTs and..).

Quite interesting !

If anybody would have 1h of his time (the week-end please), we could go through the whole process of converting text file into emu41 (running in "wine" window emulator under linux), then transfering into the HP41 and test-use.

Transfering program text files into the 41 is not immediate. The method that comes to my mind is to use the ucc utility (http://www.hp41.org/LibView.cfm?Command=View&ItemID=32) to create a so-called raw file, or a LIF disc image file, then load it into Emu41/V41/HP41.

If you never gone into this path, it may be easier and faster to just key in the 85 lines or so of your code in emu41, V41 or the HP41 - the one you are the most comfortable with - then save it in a virtual disc and share with the other emu41/V41/HP41 platforms for further tests.

J-F
User avatar
jeffcalc
......
......
 
Posts: 25
Joined: Fri Aug 28, 2009 8:57 pm

Re: Calculation of ellipse perimeter (need some help)

Postby floppy_stuttgart » Sat Jun 26, 2021 5:23 pm

Is there any HP41 programming editor (in Geany, Eclipse, ..) for checking the HP41 programming syntax on PC? (I like PyCharm for python. Eclipse for Prolog).
Before I pass the PERIMEL.TXT through the hp41uc.exe I wanted to make a global syntax check via a pre-processor (Plan A).
I found this on excel basis but I am not use to it.. http://www.flaxcottage.com/Calculators/ ... ftware.asp

first try with hp41uc failed and this is not clear to me what I have to do because I could not find a syntax failure catalogue.
Code: Select all
wine hp41uc.exe /t=PERIMEL /r /k
txt[ Z:\home\xxxxxx\Downloads\PERIMEL.TXT ] => raw[ Z:\home\xxxxxx\Downloads\PERIMEL.raw ]
Error: unrecognized or incomplete function[ LBLΓÇ¥PERIMELΓÇ¥ ]
If [ LBLΓÇ¥PERIMELΓÇ¥ ] is an external module function, try: [ XROM mm,ff ]
Compiler error on line 1.
0 bytes written.


I know I know.. I will have to put it with my fingers into the machine if nothing works (Plan B).

the writing of an HP41C pre-processor in prolog is already on the ToDo list. But this task is only 1 of 100 and had not the highest priority (Plan C for coming back to Plan A).
floppy_stuttgart
.........
.........
 
Posts: 99
Joined: Mon Mar 29, 2021 2:36 pm

Re: Calculation of ellipse perimeter (need some help)

Postby mike-stgt » Mon Jun 28, 2021 2:41 am

floppy_stuttgart wrote:.. 85 lines

How about this? 42 steps, including END.
BTW, I don't grasp, you ask for help but know already beforehand your routine will have 85 lines -- smells funny.
floppy_stuttgart wrote:I wanted to make a global syntax check via a pre-processor
HP41 user code programs don't consist of clauses, basically they are nothing but recorded key strokes. The only global commands are END and alpha labels except for single letter A..J and a..e. They may all be used at will, therefore -- what do you expect as result of such a "global syntax check"?
floppy_stuttgart wrote:Is there any HP41 programming editor (in Geany, Eclipse, ..) for checking the HP41 programming syntax on PC?
Any virtual HP41 running on PC or under DOSBox on PC (or under some other VM on PC) will do as Ideal programming editor. All bad is sorted out, what you can't type is not possible on HP41.
mike-stgt
.........
.........
 
Posts: 142
Joined: Tue Dec 24, 2019 12:12 pm

Re: Calculation of ellipse perimeter (need some help)

Postby floppy_stuttgart » Mon Jun 28, 2021 10:35 am

the previous post is making me rethinking the use of virtual HP41.
Is existing any virtual HP41 where the programs are edited and where we can see all program lines? or at least 20 of them.
The virtual HP41, I was using till now under Linux had only 1 line visible. As an eclipse and pycharm user, its different.
floppy_stuttgart
.........
.........
 
Posts: 99
Joined: Mon Mar 29, 2021 2:36 pm

Re: Calculation of ellipse perimeter (need some help)

Postby mike-stgt » Mon Jun 28, 2021 5:19 pm

floppy_stuttgart wrote:Is existing any virtual HP41 where the programs are edited and where we can see all program lines? or at least 20 of them.

Yes, no problem -- attach a printer in trace mode. It offers even more than just program listings as you may see here. If you prefer V41 there is a IL2IR bridge simulating a 82162A.
mike-stgt
.........
.........
 
Posts: 142
Joined: Tue Dec 24, 2019 12:12 pm

Re: Calculation of ellipse perimeter (need some help)

Postby floppy_stuttgart » Mon Jun 28, 2021 8:08 pm

good idea. Looks like wine standard installation on my linux 64bits system is having an issue. I will have to solve or find another solution.
Code: Select all
wine HP82240Bv112Setup.exe

Code: Select all
xxxxxx@ProDesk:~/Downloads$ 003a:err:module:import_dll Library MFC42u.DLL (which is needed by L"C:\\Program Files (x86)\\HP-Emulators\\HP82240B\\HP82240B.exe") not found
003a:err:module:attach_dlls Importing dlls for L"C:\\Program Files (x86)\\HP-Emulators\\HP82240B\\HP82240B.exe" failed, status c0000135


Update 1: by putting the error in google, I found out here https://askubuntu.com/questions/169218/ ... tall-mfc42
first by installing winetricks with
Code: Select all
apt-get install winetricks
and using it
Code: Select all
winetricks mfc42
, now the *wine HP82240Bv112Setup.exe* started the window.

Status:
- After starting the HP41 simulator "V41"
- Uploading the Infrared_Printer-Module into V41 (could be seen HowTo in the help file of V41)
- still trying how/where to print into the printer simulator. SEND seems to be the command.
Last edited by floppy_stuttgart on Tue Jun 29, 2021 2:11 pm, edited 1 time in total.
floppy_stuttgart
.........
.........
 
Posts: 99
Joined: Mon Mar 29, 2021 2:36 pm

Re: Calculation of ellipse perimeter (need some help)

Postby mike-stgt » Tue Jun 29, 2021 1:52 pm

floppy_stuttgart wrote:Status:
- After starting the HP41 simulator "V41"
with a light hand I assume
- Uploading the Infrared_Printer-Module into V41 (could be seen HowTo in the help file of V41)
where in the V41 help file did you find a chapter "HowTo"? Or a statement about IR? Did you read the oo82162A manual I mentioned earlier? That is just the manual, if you surely do need it the program is here. Christoph offers a simpler IL2IR bridge named ILBlinky in here. Coould be enough in case you don't want print graphic and/or bar code.
- still searching in HP82240B windows file where is the icon file (.png?) for starting the printer emulator from my desktop.
You achieved to install and run V41? The process for the printer is similar.
Note: if it's there and you can see it -- it's real,
if it isn't there and you can see it -- it's virtual,
if it's there and you can't see it -- it's transparent,
it's not there and you can not see it -- did you erase it? :mrgreen:
- still trying how/where to print into the printer simulator. SEND seems to be the command.

How did you get to SEND? Pls stop violent guesswork, read enclosed descriptions. Printer commands are described in the printer manual.
mike-stgt
.........
.........
 
Posts: 142
Joined: Tue Dec 24, 2019 12:12 pm

Re: Calculation of ellipse perimeter (need some help)

Postby floppy_stuttgart » Tue Jun 29, 2021 2:57 pm

few issues with the proposal:
- link http://www.hp41.org/html/oo82162A.news.txt dont work
- I could not find the ZIP; now I have it. Thanks.
finally, my linux "wine" environment is not so easy for including all additional libraries and programs: I have to go deeper in the subject and it looks like it will take me hours (preferably I dont move for now into a windows environment).
So far achieved,
- program PEREL1.TXT created in a text editor under linux 64bits
- changed from .TXT to .RAW by using "wine hp41uc.exe /t=PEREL1 /r /k" (hp41uc is well absorbing it; unfortunately there is no extensive code analysis debugger like in pycharm but not so disturbing for now)
- program PEREL1.RAW uploaded into V41 and debugging started
- several programs starting on my desktop; see picture

ToDo for me; further support requested from here:
- connect V41 with video and printer emulation... in a wine environment under linux 64bits for having an output out of V41 which has more than 1 line in an emulated window or in an emulated printer in a windows
- making oo82162A working
- bringing this program into my HP41CV on the table
Attachments
Screenshot from 2021-07-01 16-03-10.png
floppy_stuttgart
.........
.........
 
Posts: 99
Joined: Mon Mar 29, 2021 2:36 pm

Re: Calculation of ellipse perimeter (need some help)

Postby mike-stgt » Fri Jul 02, 2021 9:40 am

floppy_stuttgart wrote:few issues with the proposal:
- link http://www.hp41.org/html/oo82162A.news.txt dont work
- I could not find the ZIP; now I have it. Thanks.
oo82162A.news.txt is in the ZIP bundle, the link will do when you unzipped it.
ToDo for me; further support requested from here:
- connect V41 with video and printer emulation...
Your screen shot looks promising. Seems you installed the whole flock of devices Christoph offers for Virtual HP-IL. Now you have to decide which of them you want to connect and in which sequence. You have to set the port numbers of the devices and V41 accordingly as described in any of the HTM files that come with the devices. For example, the two devices in the middle of your screen shot, ILPilsim and ILBlinky, doulbe the same port numbers. Which of them is meant when the controller forwards frames to port 60001?

BTW, when I see all those devices I realise, if you need a line printer only, ILPer would be sufficient. Or even the 82163A. Virtual at its max :)
Only one devide in the loop simplifies also the annoying process of setting all those port numbers correctly. Otherwise a tool like VilMA is a lifesaver. Up to now I have only published the description still awaiting an analogical solution from someone else. But it could serve as nice summarization what you have to do manually and without any faults, else it won't work :mrgreen:
mike-stgt
.........
.........
 
Posts: 142
Joined: Tue Dec 24, 2019 12:12 pm

Next

Return to Programming

Who is online

Users browsing this forum: Semrush [Bot] and 1 guest

cron