You can use the Free42 to convert code from txt to raw and vice versa. Copy the code from the editor to the clipboard, switch to program mode in Free42 and paste the code. After this you can export the code to a Raw file. This works also the other way round from raw to txt.
Regards
Bernd
Stand alone Encoder/Decoder
Re: Stand alone Encoder/Decoder
No work, it's really fun. If it was work, then tho co pilot (or first officer) had to do it.toml_12953 wrote: ↑Sun Mar 18, 2018 3:53 amIs he paid for this fun? If so, it's more like work (the kind of work I'd come out of retirement for!)
Günter
Günter
DM42 SN:00004 and SN:00184 -- DM41X SN:00013 and SN:00955
DM42 SN:00004 and SN:00184 -- DM41X SN:00013 and SN:00955
Re: Stand alone Encoder/Decoder
I use Free42 v2.0.16 on Ubuntu Mate for this purpose.
In this version of Free42 You can copy/paste plain text in PRGM mode.
Note that the latest version in Ubuntu's repository is version 1.4.77-1.1, that does not implement this copy/paste feature. So get the latest version from Thomas' site.
Re: Stand alone Encoder/Decoder
Indeed, that works in all versions of Free42 2.0.x on all platforms except DM42.jayhawk wrote: ↑Tue Mar 20, 2018 3:53 pmI use Free42 v2.0.16 on Ubuntu Mate for this purpose.
In this version of Free42 You can copy/paste plain text in PRGM mode.
Note that the latest version in Ubuntu's repository is version 1.4.77-1.1, that does not implement this copy/paste feature. So get the latest version from Thomas' site.
Re: Stand alone Encoder/Decoder
Exactly.ijabbott wrote: ↑Tue Mar 20, 2018 8:42 pmIndeed, that works in all versions of Free42 2.0.x on all platforms except DM42.jayhawk wrote: ↑Tue Mar 20, 2018 3:53 pmI use Free42 v2.0.16 on Ubuntu Mate for this purpose.
In this version of Free42 You can copy/paste plain text in PRGM mode.
Note that the latest version in Ubuntu's repository is version 1.4.77-1.1, that does not implement this copy/paste feature. So get the latest version from Thomas' site.
From the version history for Free42:
Versions prior to 2.0 only copy/paste from the X register.2017-04-22: release 2.0 (beta)
* Copy & Paste now handle matrices, ALPHA mode, and PRGM mode.
And this:
is really cool. Makes You able to write complex programs in a txt editor.2018-01-07: release 2.0.9
* Program Paste no longer requires line numbers.
As text editor I recommend Geany, an ultra lightweight all-purpose IDE. It has the cool feature of column-select (ALT+SHFT+cursor arrows) so You can quickly remove line numbers of programs pasted from Free42. Also don't forget to remove the first line: '00 { xxx-Byte Prgm }'
Re: Stand alone Encoder/Decoder
I threw together a quick hack to be able to get Free42 to convert a program from text to binary on the command line: https://github.com/RobFisher/free42-lin ... 0def4fb07f
Probably this could be developed further, such as removing the dependency on GTK and adding the option to convert raw back to text.
In fact a completely command-line Free42 would be nice. You could have it act like a filter (pipe in the program and arguments and it prints out X); and have an interactive mode for debugging. A fun project for anyone with spare time (I rarely do, these days). Oh, and an Emacs mode for editing, and have Free42 validate the code for flymake-mode to work...
Probably this could be developed further, such as removing the dependency on GTK and adding the option to convert raw back to text.
In fact a completely command-line Free42 would be nice. You could have it act like a filter (pipe in the program and arguments and it prints out X); and have an interactive mode for debugging. A fun project for anyone with spare time (I rarely do, these days). Oh, and an Emacs mode for editing, and have Free42 validate the code for flymake-mode to work...
Re: Stand alone Encoder/Decoder
Is there any reason why DM42 can't be persuaded to load programs in either .raw or .txt format?
Surely there there is already an interpreter which converts the programs we type in on the keyboard to machine language?
Surely there there is already an interpreter which converts the programs we type in on the keyboard to machine language?
HP50G HP35s Free42 DM42.
Testing WP43S, C43.
Testing WP43S, C43.
Re: Stand alone Encoder/Decoder
The programs are not converted to machine language, they are stored in an internal format, (likely very) close to .raw format, at least in the case of the 42S -Thomas is this the same for Free42?
The 42s ROM and Free42 program "interpret" the FOCAL code on-the-fly (though some things like jump addresses are stored to make program execution faster).
--bob p
DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
-
- Posts: 1107
- Joined: Tue May 02, 2017 5:48 pm
- Location: Netherlands
- Contact:
Re: Stand alone Encoder/Decoder
The format used internally by Free42 is completely different from that used inside the HP-42S. Without going into details, the Free42 format uses roughly twice as much memory, but is much easier to decode for program execution.
Free42 converts from the HP-42S format to its own format while importing raw files, and does the reverse when exporting raw files. The internal format is only used in memory and in the state files.
Could the DM42 be modified so that it could load and save programs in text format? Absolutely. In Free42 2.0, I added code that performs those conversions, for copying and pasting programs using the clipboard. That code, currently unused in the DM42 because it has no clipboard, could be used for loading and saving programs from and to text files as well.
Free42 converts from the HP-42S format to its own format while importing raw files, and does the reverse when exporting raw files. The internal format is only used in memory and in the state files.
Could the DM42 be modified so that it could load and save programs in text format? Absolutely. In Free42 2.0, I added code that performs those conversions, for copying and pasting programs using the clipboard. That code, currently unused in the DM42 because it has no clipboard, could be used for loading and saving programs from and to text files as well.
Re: Stand alone Encoder/Decoder
You are right to point this out. I drew Michael's attention to this issue a long time ago.
It used to be possible to download the web page as HTML (complete), but now there seems to be an explicit dependency on a web site.
The dependency on a central server is crippling, IMHO there should be no reason to make users dependent on a web site to provide such services. Making users dependent is the pathway to programmed obsolescence.
The solution is to publish this kind of tools via eg Git or similar versioning, so that anyone can clone and/or download them, stay up-to-date, be able to archive such tools for future, post-apocalypse use (I'm kidding, but I deeply believe in the idea of archival and am convinced such hardware will outlive the makers, and therefore also the websites), and even contribute to ameliorate the tools.
It used to be possible to download the web page as HTML (complete), but now there seems to be an explicit dependency on a web site.
The dependency on a central server is crippling, IMHO there should be no reason to make users dependent on a web site to provide such services. Making users dependent is the pathway to programmed obsolescence.
The solution is to publish this kind of tools via eg Git or similar versioning, so that anyone can clone and/or download them, stay up-to-date, be able to archive such tools for future, post-apocalypse use (I'm kidding, but I deeply believe in the idea of archival and am convinced such hardware will outlive the makers, and therefore also the websites), and even contribute to ameliorate the tools.