Txt to Raw and Raw to Txt

General discussion about calculators, Swiss Micros or otherwise
User avatar
pica
Posts: 20
Joined: Fri Mar 30, 2018 9:36 am
Location: eSwatini

Re: Txt to Raw and Raw to Txt

Post by pica » Fri Sep 07, 2018 6:25 am

You can also use the PC version of free42. It will export/import a program as .raw, and copy/paste from the display as .txt. The .txt will have line numbers that you can strip using an editor like geany.

tgray
Posts: 16
Joined: Fri Jul 28, 2017 1:36 am

Re: Txt to Raw and Raw to Txt

Post by tgray » Sun Nov 25, 2018 2:38 am

So it's not perfect, but I finally got around to writing an encoder in Python to convert programs to raw files. Maybe I will add decoding to it at some point, though I hope Swiss Micros just enables text import/export of programs directly on the DM42. It is already built into Free42 after all.

I make no guarantees to the quality of the code. I did test it some on programs I've written as well as the 'stress.txt' program on the Free42 website.

https://github.com/tgray/dm42coder

Post Reply