Trying to keep the vscode-hp42s-free42 plugin alive - help needed

Post here to share useful tips and tricks, to ask questions about using your DM42 or to report software-related problems
Post Reply
nephilim
Posts: 27
Joined: Sat Sep 12, 2020 10:09 pm

Trying to keep the vscode-hp42s-free42 plugin alive - help needed

Post by nephilim »

It seems that the hp42s-free42 VSCode plugin by J Heilingbrunner is no longer being maintained. The last update on Visual Studio marketplace happened almost a year ago (v1.0.6). The last activity on github dates back to April 2021 and includes a how-to for adding commands to the plugin. As I do like working with the plugin a lot I made an attempt to add some of the newer free42 commands. The problem is that I'm an engineer and no programmer :( I think I succeeded in adding the following commands:
NSTK
4STK
LNSTK
L4STK
DEPTH
ERRNO
ERRMSG
DROP

That means that I can add these commands in the plugin, encode them, get the same raw output as free42 and after decoding the raw get the same output as the initial input.

When trying to add DROPN the trouble starts, i.e., I have no educated guess how to handle the argument (stack level). My attempt works until the decoding stage, where a "F2 A1 01" is converted to "DROPN 01" instead of "DROPN 1".

Has anybody else worked on the plugin's source code and could share advice?

Another embarassing question: I also would like to add commands such as APPEND but fail to find them within free42 for the initial raw output.
Torsten
DM42, DM15L, HP35s, HP33s
Post Reply