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: 60
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.
DM42 (free42, C47), DM15L, HP15C CE, HP35s, HP33s
nephilim
Posts: 60
Joined: Sat Sep 12, 2020 10:09 pm

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

Post by nephilim »

I made some progress and added the following commands

NSTK
4STK
LNSTK
L4STK
DEPTH
ERRNO
ERRMSG
DROP
DROPN
DUP
DUPN
R↓N
R↑N
PICK
UNPICK
FUNC

My simple tests were successful but it's likely I missed something. I hope it's OK to post my version here. I have bumped the version number to 1.07. Please let me know if anything is not working as expected.
Attachments
vscode-hp42s-free42-1.0.7.vsix.zip
(121.97 KiB) Downloaded 136 times
DM42 (free42, C47), DM15L, HP15C CE, HP35s, HP33s
User avatar
ijabbott
Posts: 253
Joined: Fri Dec 15, 2017 2:34 pm
Location: GB-MAN

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

Post by ijabbott »

1.0.7 is a poor choice of version number. Better to use a suffix to distinguish it from the "official" version numbers.

(Even better - fork the repo on GitHub and submit a pull request!)
nephilim
Posts: 60
Joined: Sat Sep 12, 2020 10:09 pm

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

Post by nephilim »

That proves I'm a novice. Not sure how to do this on github but I can certainly change the version. What would you suggest? Thanks for the feedback.

EDIT: Working on it... trying to upload my changes to the fork on the weekend.
DM42 (free42, C47), DM15L, HP15C CE, HP35s, HP33s
User avatar
grubi
Posts: 3
Joined: Tue Mar 23, 2021 4:55 pm
Location: Austria

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

Post by grubi »

I'm also using the plugin since I own the DM42. I think it's a really great tool and has some clear advantages over the SM online tool (Syntax highlight and code completion with the specials symbols,...). Are there any news on the plugin supporting the new commands?
Kibabalu
Posts: 15
Joined: Sat Apr 03, 2021 2:36 pm

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

Post by Kibabalu »

Hello nephilim,

any progress regarding your efforts?
nephilim
Posts: 60
Joined: Sat Sep 12, 2020 10:09 pm

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

Post by nephilim »

I created a fork, added a few more functions on my local machine but never figured out how to sync this with the repository.
DM42 (free42, C47), DM15L, HP15C CE, HP35s, HP33s
Post Reply