Post Reply 
Any HP 50g emacs/SDiag users?
04-15-2016, 12:32 AM
Post: #1
Any HP 50g emacs/SDiag users?
Hello,

This is my first post on this forum under my name. I made a couple of posts circa 2009 under the username "hpnewbie", but I lost access to the email for that account and perhaps I am not such a newbie any more anyway. I've lurked some on this forum for years though -- I think I will stay around now.

I'm posting to ask if anyone here uses emacs by Carsten Dominik and Peter Geelhoed on their 50g/49g+. I found out about this tool a couple of weeks ago, and think it, together with its helper libraries like SDiag, Nosy, and OT49, is a wonderful tool for editing programs on the calculator and getting a superior catalog experience.

There is one problem I am encountering with this tool, and I was wondering if anyone else could confirm it and perhaps if anyone could point me in the right direction to start debugging it (I have not done much SysRPL).

The "SDiag" (Stack Diagram) lookup tool hangs indefinitely on a number of commands, and the only way to get the calculator out of the hang seems to be to take a battery out. Commands which cause this behavior include ASSUME, ATICK, and SCATTER. Not all "not found" commands cause a hang, just some.

If anyone here uses Emacs and/or SDiag, would you mind trying one of these commands to see what happens for you?

Secondly, assuming that this is a bug and not just a misconfiguration on my part, could anyone point me in the right direction for debugging/fixing SysRPL programs like SDiag?

Any pointers would be appreciated. Thank you!
Find all posts by this user
Quote this message in a reply
04-15-2016, 12:50 AM
Post: #2
RE: Any HP 50g emacs/SDiag users?
I can't answer your specific questions, but these links may interest you:

HELP49: http://www.hpcalc.org/details.php?id=5962
When looking at SDIAG, I found this, and chose this one.

Prof. Rautenberg's Tools: http://www.math.fu-berlin.de/users/raut/WR49/index.htm
The author of OT49, he has provided a large set of similarly cool and powerful tools you will likely enjoy.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
04-15-2016, 01:05 AM
Post: #3
RE: Any HP 50g emacs/SDiag users?
Thank you for the reply.

I have another tool called Hlp49 by Bill Markwick, which is OK, but I really like the integrated autocomplete + built-in-CAS-help integration + comprehensive command list of emacs+sdiag. I will take a look at the help49 you linked to though.

The late Prof. Rautenberg has a lot of great programs available from his site. I use several of them.
Find all posts by this user
Quote this message in a reply
04-15-2016, 02:31 AM
Post: #4
RE: Any HP 50g emacs/SDiag users?
(04-15-2016 01:05 AM)Currell Berry Wrote:  I have another tool called Hlp49 by Bill Markwick, which is OK, but I really like the integrated autocomplete + built-in-CAS-help integration + comprehensive command list of emacs+sdiag. I will take a look at the help49 you linked to though.

HLP49 by Bill Markwick is in fact the one I intended to send you a link for; sorry for bad tip. It's not integrated into Emacs, but (since it stores content on an SD card) I found its more comprehensive help to be more useful, at least for for my needs. Emacs is more like a religion than an editor. I wasn't ready to commit my life... not judging, just not for me.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
04-15-2016, 02:52 AM
Post: #5
RE: Any HP 50g emacs/SDiag users?
Haha I hear you. I think the emacs for hp 50g has no relation to the desktop emacs besides being named in honor of it, but there is definitely a culture surrounding extensible text editors.

I do like hlp49. SDiag (emacs' catalog provider) stores its content on the SD card as well, I think SDiag actually might have a more extensive database (at least for the version of HLP49 I have from 2009). One thing it does is it shows you even commands which it doesn't have help for, so you can be aware a command exists even if the tool doesn't have specific documentation for it.

Thank you for the tip for HLP49 in any case, I do think it is a good tool!

I think I will look into the "Jazz" tool to see if that can debug SysRPL. I would like to figure out where the freeze occurs.
Find all posts by this user
Quote this message in a reply
04-15-2016, 04:00 PM
Post: #6
RE: Any HP 50g emacs/SDiag users?
(04-15-2016 12:32 AM)Currell Berry Wrote:  I'm posting to ask if anyone here uses emacs by Carsten Dominik and Peter Geelhoed on their 50g/49g+. I found out about this tool a couple of weeks ago, and think it, together with its helper libraries like SDiag, Nosy, and OT49, is a wonderful tool for editing programs on the calculator and getting a superior catalog experience.

Nosy is out-dated and does not handle the opcodes available for the emulated Saturn on the HP50G. Nosy also does not know how to handle opcodes that have been overwritten with bits that are parsed in a special way (passes control to the ARM layer for things like moving blocks of memory). The EC program (entries catalog) on Jazz makes use of the SDIAG files; so far I have not run into any issues using Jazz + SDIAG.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
04-18-2016, 06:09 PM
Post: #7
RE: Any HP 50g emacs/SDiag users?
For some reason the Jazz EC program does not work for me -- it takes me to a screen full of hexadecimal characters... perhaps I have extable installed incorrectly for Jazz or something. The other Jazz programs seem to work fine though. Han do you just learn to remember all the key assignments in Jazz? That is the one downside of Jazz that I see -- every program in it remaps basically the entire keyboard!

I think I'll mainly stick to UserRPL programming, so I'm not too concerned if Nosy properly disassembles all the 50g Armisms or not. I just want properly working autocomplete and lookup like emacs offers. I'm going to keep working on it till I can get it functioning. Thank you for your help!
Find all posts by this user
Quote this message in a reply
04-18-2016, 10:46 PM
Post: #8
RE: Any HP 50g emacs/SDiag users?
I patched SDiag to prevent the calculator from locking up on certain "Not Found" commands (it does not lock up when looking up commands anymore).

Attached is a modified version of the "emacs 2.11a" distribution containing emacs, extable2, and SDiag, along with documentation and sources. The only change to the code is that I inserted one "xKILL" in the diag routine after the "Not Found" window pops up, in order to ensure that UsrDiag and SysDiag exit cleanly.

This patch has the side effect of disabling part of the LDOC feature (which was new in 2.10). The unpatched SDiag library will attempt, after failing to find a command's documentation in the usual places, to look into the "L" subdirectory of the SDiag data directory to match up library documentation to the command. This patched version no longer does that.

As a work-around, you can note, when you pull up a command in the emacs autocomplete prompt, whether or not the command comes from an external library (emacs shows the library number next to the command if that is the case). Then you can either look up that library's documentation manually or using the EDB tool (which still integrates with the library documentation in the "L" directory).

(Note, the file (at 886 kb) is too big to upload directly to the forum, so I am posting a link instead).

http://cvberry.com/downloads/emacs_b2.11.tar.gz
Find all posts by this user
Quote this message in a reply
04-18-2016, 10:53 PM
Post: #9
RE: Any HP 50g emacs/SDiag users?
A couple of additional notes.

I found out another benefit of emacs+sdiag over Hlp49: SDiag includes documentation and stack diagrams for SysRPL as well as UserRPL. If you ever find yourself trying to work your way through some SysRPL code (as I was doing today!), then you will be very grateful to have one click lookup of commands.

I figured out how to step through SysRPL programs (including programs embedded in libraries). I was stuck on this for a while but it's really not that hard. Just enclose the command name you want to use in double angle brackets like so << UsrDiag >>, and the use either the built in DBUG debugger or the Jazz debugger SDB. SDB apparently supports a lot more code than DBUG, as DBUG can't debug programs which alter the "runstream" apparently. SDB is pretty good, but in my anecdotal experience couldn't go all the way through UsrDiag without crashing.

I still can't figure out how to call up the jazz assembly debugger "DB". You have to put a rompointer to the function you want on the stack it seems, and I don't know how to do that.

Thanks for reading!
Find all posts by this user
Quote this message in a reply
12-11-2018, 06:53 AM
Post: #10
RE: Any HP 50g emacs/SDiag users?
(04-18-2016 10:46 PM)Currell Berry Wrote:  I patched SDiag to prevent the calculator from locking up on certain "Not Found" commands (it does not lock up when looking up commands anymore).

Attached is a modified version of the "emacs 2.11a" distribution containing emacs, extable2, and SDiag, along with documentation and sources. The only change to the code is that I inserted one "xKILL" in the diag routine after the "Not Found" window pops up, in order to ensure that UsrDiag and SysDiag exit cleanly.

This patch has the side effect of disabling part of the LDOC feature (which was new in 2.10). The unpatched SDiag library will attempt, after failing to find a command's documentation in the usual places, to look into the "L" subdirectory of the SDiag data directory to match up library documentation to the command. This patched version no longer does that.

As a work-around, you can note, when you pull up a command in the emacs autocomplete prompt, whether or not the command comes from an external library (emacs shows the library number next to the command if that is the case). Then you can either look up that library's documentation manually or using the EDB tool (which still integrates with the library documentation in the "L" directory).

(Note, the file (at 886 kb) is too big to upload directly to the forum, so I am posting a link instead).

http://cvberry.com/downloads/emacs_b2.11.tar.gz

Hi Currell
The link is down. Any chance you could make it available?
Find all posts by this user
Quote this message in a reply
12-11-2018, 05:26 PM
Post: #11
RE: Any HP 50g emacs/SDiag users?
(12-11-2018 06:53 AM)Stevetuc Wrote:  Hi Currell
The link is down. Any chance you could make it available?

Looks like I forgot to copy the file when I moved to a new server. I put the file back up at its original URL http://cvberry.com/downloads/emacs_b2.11.tar.gz .
Find all posts by this user
Quote this message in a reply
12-11-2018, 05:32 PM
Post: #12
RE: Any HP 50g emacs/SDiag users?
(12-11-2018 05:26 PM)Currell Berry Wrote:  
(12-11-2018 06:53 AM)Stevetuc Wrote:  Hi Currell
The link is down. Any chance you could make it available?

Looks like I forgot to copy the file when I moved to a new server. I put the file back up at its original URL http://cvberry.com/downloads/emacs_b2.11.tar.gz .

Many thanks!
Steve
Find all posts by this user
Quote this message in a reply
Post Reply 




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