0 Members and 1 Guest are viewing this topic.
I found a somewhat bug with this. If certain hooks run while crabcakes is doing its thing, the calculator will crash. Hooks are never going to expect that the extra ram page is in (05) and has meaningful data on it. Of course this is an easy fix if the hook developer knows about the problem, but some of the developers aren't going to hear about the problem, or are are long gone.So what I would think you should do is backup the hook flags on startup, clear the flags for running the program, and restore them when you are done. There are only 4 bytes worth of flags, so that's not really a huge memory issue. Although at first glance it looks like only 3 bytes $8A24-$8A26 are used for hooks, $8A2A is used for the USB hook. And while it's rare that this hook is active, it's the most likely to cause problems, so be sure to include it.
Crabcake just made it onto the ticalc news, so I'd better get on that hook bug. Penguin77, if you have a small segment of example code that crashes the calculator, I would be most greatful.
call crabCakeInstall ld a, 'A' bcall(_putC)
crabCakeInstall: ld hl, (flags + $34) ;iy + 34h ld (nameBuff), hl ld a, (flags + $36) ;iy + 36h ld (nameBuff+2), a ld a, (flags + $3A) ;iy + 3Ah ld (nameBuff+3), a xor a ld (iy + $34), a ld (iy + $35), a ld (iy + $36), a ld (iy + $3A), acrabCakeUninstall: ld hl, (nameBuff) ld (flags + $34), hl ld a, (nameBuff+2) ld (flags + $36), a ld a, (namebuff+3) ld (flags + $3A), a