Transferring programs to and from a HP41
|
04-12-2024, 12:43 PM
(This post was last modified: 04-12-2024 12:45 PM by ThomasF.)
Post: #1
|
|||
|
|||
Transferring programs to and from a HP41
Hi all,
Long story in short format: I can now send a program from my 41 that is saved as a RAW file on my PC - ready to be used in an emulator or in the DM41X without any translation - in shorter time then it takes to read this line! Just as a teaser and because it could be done ... I have always been looking for a simple way to down- and up-load programs to my 41. As can be found in other posts I have e.g. implemented the Wand in my Tiny41 board, so I can "scan" any barcode on my PC and directly download it to the 41 by emulating the Wand (i.e. I don't need a Wand - i just transfer the bytes in the same format as from the real 82153A into the 41). I got inspired by another thread dealing with the 41CL and started to look into the other way, ie. how to save programs from the 41 into the PC? Well, printing can't be used, since some information is lost in the process (i.e. synthetic string etc). Then I thought of making the Tiny41 as a new peripheral to the 41, and send data to it. So I implemented some new instructions to handle the bytes in the Pico and a program to save the file on the PC. To receive the file on my PC I start the program stating a file name to save the program into: Code: $ getraw my_prog.raw Then on the 41 I execute the new command SENDP: Code: XEQ ALPHA SENDP ALPHA Done - that's it! The file is transferred! For anyone interested, below is the complete MCODE program in the 41 to send the file. It finds the start and length of the given program, then sends all bytes to the Tiny41 board. In the Tiny41 the bytes are extracted and just sent over USB to a virtual COM-port on the PC, which the getraw program reads and then stores the bytes in the named raw file. The IR-led on the board could also be used so that the program could be transmitted that way instead, having a program looking at the IR-receiver on the PC instead - or another 41 with a similar board (with an IR-receiver) receiving the file - and voila: easy file-transfer between two 41's! The trick I use is some new instructions which are interpreted by the Tiny41 board, right now I use 3 instructions:
In this example I use command 002 to init the transfer (program size is in M): Code: C=0 ALL Sending a complete program to the PC is now as easy as printing it and it just takes a second or two ... Happy coding! Cheers, Thomas Note - this is just a proof of concept and there are room for improvements, e.g. I have not dealt with FOCAL code in ROM. But it works as an example for the flexibility and the power of the Tiny41 (Pico) module and what could be done with it! Code: #090 ; "P" [35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X] |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Transferring programs to and from a HP41 - ThomasF - 04-12-2024 12:43 PM
RE: Transferring programs to and from a HP41 - PeterP - 04-12-2024, 01:55 PM
RE: Transferring programs to and from a HP41 - ThomasF - 04-12-2024, 02:08 PM
RE: Transferring programs to and from a HP41 - MeindertKuipers - 04-13-2024, 11:30 AM
RE: Transferring programs to and from a HP41 - Ángel Martin - 04-13-2024, 05:42 PM
|
User(s) browsing this thread: 1 Guest(s)