Post Reply 
newRPL: [UPDATED April 27-2017] Firmware for testing available for download
06-03-2017, 06:40 PM
Post: #680
RE: newRPL: [UPDATED April 27-2017] Firmware for testing available for download
(05-29-2017 02:55 AM)Claudio L. Wrote:  
(05-28-2017 02:40 AM)smartin Wrote:  RPL programs can be stored in files on an SD card easily from the 50g using the command SDSTO, and when retrieving via SDRCL the program appears perfectly on the stack. But it doesn't appear as a simple ASCII/text file when examining the SD card from a PC, although there is a 'NRPL' in the header. Is there a preferred way to encode RPL program files on the PC that can be easily loaded on the 50g under newRPL?

Cheers,
Steve

SDSTO/SDRCL work with binary files, adding the NRPL header only. They don't decompile objects at all.
To work on programs on the PC, the best is to use any UTF-8 text editor, the text can be read like any other file, with SDOPENRD, SDREADTEXT and SDCLOSE, followed by STR->.
As long as the simulator has the same version of the core as the ROM on your calculator, files stored with SDSTO in a virtual SD card with the simulator should read just fine with SDRCL on real hardware.
But I'll put on the bug tracker that perhaps a command like SDTSTO should decompile (unless the object is already a string) and store in a plain text file, no headers of any kind. SDRCL should perhaps read the file as a string if it fails to detect the NRPL header, so we don't need a new command for that.
For the time being, it's easy to write a short routine that reads and compiles a plain text file.

Got it. But after playing around a bit (moving programs back and forth between a PC and the 50g), I found that having a command in newRPL to create a new file would be useful (analogous to SDCRDIR). I found the only way I could write a program file (ASCII) to the SD card from the 50g was if I already had an empty file to write to (which I had to create on the PC side). SDTSTO will certainly help address this issue, but still having a command in newRPL to create a new (empty) file may be useful.

-Steve
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL: [UPDATED April 27-2017] Firmware for testing available for download - smartin - 06-03-2017 06:40 PM



User(s) browsing this thread: 5 Guest(s)