HP Forums
Outputting from notepad++ directly to hpemu48? (HP50g) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: Outputting from notepad++ directly to hpemu48? (HP50g) (/thread-6254.html)



Outputting from notepad++ directly to hpemu48? (HP50g) - chris b - 05-16-2016 02:33 AM

EDIT: Decided to figure it out for myself, came up with a very workable solution.

You can download a portable version here (self hosted): http://venerence.apollo.feralhosting.com/npp-hp50g.zip.

save files as a .s or .hpprgm for notepad++ to pick up the syntax highlighting.

alt+f1 will open up the emulator and pipe your program into the emulator. From there, hit the "CONV" softkey (either from the HOME directory variable or saved in the custom menu) to convert from ASCII to binary, and you can either evaluate it or store as a variable from there.

Please note that the header must have translation code 3 in it to work properly, so your header should look like this:
Code:
%%HP: T(3)A(D)F(.);

All the programs involved (emu48, notepad++, hp prime syntax) are under the GNU GPL, and *should* (in theory) be redistributable.

Quote:So currently, I have been developing in User RPL for the HP50g calculator. To this end, I have been using two major programs, Debug4x and Notepad++, with a language definition file for user RPL.

I would prefer to stick to one program for continuity, and I would like that program to be debug4x, but the editing environment is extremely buggy. It seems to randomly decide whether tabs are considered white space, predefined characters don't always display properly, and there are multiple visual bugs.

So I program in ascii in notepad++, and my code comes out something like this:
Code:
%%HP: T(0)A(D)F(.);
@
@
\<<
4 FIX @set to 4 decimal points
DEG RECT -105 SF @set degree mode and approximate mode
-42 SF @set dd/mm/yy
-56 SF @turn off beep
-95 CF @turn on RPN mode
-117 SF @turn on soft menu
HOME
500\->KEYTIME @set the delay between keystrokes lower
\<< 500\->KEYTIME \>> 'STARTUP' STO @add to startup
\>>

One feature I really miss though is that debug4x lets you compile ascii code directly into the emulator for testing, and I am looking for a way to do that with notepad++. At the moment I have to set up a dummy file, copy my code into debug4x, and export to the emulator. It would be nice if I could compile directly from notepad++.

Anyone have a clear idea how that might work?

EDIT: decided to do it myself, attached a working example below. Reply soon on how to use it.



RE: Outputting from notepad++ directly to hpemu48? (HP50g) - chris b - 05-16-2016 08:52 AM

Alright, decided to take the initiative and wrote up a way to do it. Technically this uses the HP prime markup, but it's startlingly similar to user RPL, so syntax highlighting is very usable (and customizable).

Programs used:
Notepad++ (license: GPl Enhanced)
HP Prime Markup for Notepad++ (license: none?)
DDE48 (license: GNU?)
Emu48 (License: GNU?)
Ascii to binary (license: none?)

And some scripts I wrote up for the purpose.

USAGE:
Translation header must be set to 3 (EX: %%HP: T(3)A(D)F(.)Wink

So, save your ascii program with the extension .s or .hpprgm (for notepad++ to detect syntax highlighting). Open it up with the portable notepad++ attached.

[Image: lQs7iBw.png]

[Image: G83d8Td.png]

To run, hit alt + f1, it'll open like this:

[Image: uWSWsRk.png]

click on CONV (in the soft menu) to convert to binary, then run with EVAL or save as a variable. You're done!

[Image: S3CABr8.png]


RE: Outputting from notepad++ directly to hpemu48? (HP50g) - Massimo Gnerucci - 05-16-2016 07:58 PM

You could also try a couple of Notepad++ plugins: NppExec and RunMe.


RE: Outputting from notepad++ directly to hpemu48? (HP50g) - RPL Calcs - 05-17-2016 11:54 PM

Cheers,

To create/edit objects to the HP's 48/49/50 ...

I still prefer the HPUserEdit because it is both simple and quite complete. I use it to create libraries and to write code in System RPL, too.

It is a single package (editor & Emu48). It features tab of special characters, commands tab, etc. Just install and use.

To use simply edit the object in HPUserEdit and hit [F9] to run it or [Ctrl] + [E] to send it to the emulator.

You can also send emulator objects to HPUserEdit:
- put the object in level 1 of the stack;
- run the command -> STR;
- in the menu bar of the emulator, select the "Edit" menu and the "Copy Stack" option;
- Then paste (Ctrl + V) in the HPUserEdit window.

HPUserEdit 5 - (multiple languages)
http://www.hpcalc.org/details.php?id=6600

HPUserEdit 6 - (Spanish)
http://www.hpcalc.org/details.php?id=7587

Language file to translate HPUserEdit 6 from Spanish into English.
http://www.hpcalc.org/details.php?id=7588

Best regards.

PS: I'm sorry for the errors of the electronic translation.

HPUserEdit image
http://nsa29.casimages.com/img/2012/06/05//120605113010642220.jpg