[comp.sys.handhelds] HP-48 MLDL problems

bson@rice-chex.ai.mit.edu (Jan Brittenson) (04/05/91)

It seems there are a few problems with the MLDL 1.01 I posted.

   First, the ASC version doesn't seem to be correct. I'm not
surprised, because bin2asc insisted on crashing and dumping core, and
when I fixed that it insisted on swapping nybbles in bytes. All my q&d
fixes may have broken something else. So don't use the ASC version.
The reason I didn't try it myself is that I don't have enough memory
free to load it. The binary is just as safe, since the library has its
own CRC.

   Code objects don't work like they should. Instead of halting at the
object +10, it halts at the object +5, which is the size. Press the
right arrow 5 times to advance the PC to the first instruction. I
plead insanity.

   The last thing I worked on before I posted the library was a
function, bound to the SPC key, that would wait for another key and
then repeat it until that key was pressed a second time. It didn't
work, and I had lots of work coming up, so I simply uncommented the
SPC entry from the key scan dispatch table, reassembled the library,
gave it a brief test, and posted it. Unfortunately, it seems that
there is a bug causing the MLDB to sometimes enter such a repeat mode
- more specifically, it can start decrementing the PC. If this
happens, try to figure out which key to press to make it stop, then
exit.

   Nothing in the library seems to work on version Es - I will try and
figure out why.

   The documentation describes ON-C as an emergency exit. This will
result in an "Invalid Card Data" message when the calculator is turned
back on again, since the library contains a data area which is
normally cleared when it exists. ON-C will exit without clearing the
data area.  This is the reason I made the MLDB refuse to step a RESET
instruction in the first place. I will add a key sequence, which when
pressed, will have the same effect as ON-C (i.e. first clear the data
area, then execute a RESET).

   Two features requested for the MLDB are breakpoints, both in ROM
and RAM, and remote execution. When the operation of the UART has been
figured out, and I have some spare time, I will add an MLDB remote
server mode, which together with an Emacs mode will let you step ML
code in Gnu Emacs on your favorite unix workstation. Since the MLDB
server would be made startable from the Kermit server mode, one should
be able to both load and debug ML programs from within Gnu Emacs with
no need to even touch the calculator. Some thought should be put into
a uniform development environment, consisting of SAD-STAR-MLDB, where
one from a STAR buffer can assemble (M-x compile), load, and debug
programs, as well as disassemble/step ROM with SAD/MLDB. Most if this
exists today (e.g. STAR version 2 loads SAD-format symbol tables),
apart from the MLDB server mode, and mostly just needs to be tied
together in a reasonable fashion.

   Anyway, I've babbled far too much already; I was just going to
inform everyone about problems with the MLDL I posted. (Sometimes I
wish I could unplug the part of my brain that goes rampant and keeps
drowning me in much compelling ideas!)

						-- Jan Brittenson
						   bson@ai.mit.edu