bigmac wrote:
The BRCLR instruction for the HC9(S)08 actually requires a bit number, and not a bit mask...If you are defining MASSBIT specifically for the CTRLBYT resister, the definition should be (refer Table 4 of AN1831) -
MASSBIT equ 6
Ahh, this was just my misunderstanding of the CTRLBYT. I'm not real clear why you say I can just omit the BRCLR's though. I suppose because I'm only ever doing page erases and never mass erases?
bigmac wrote:
Do you load your new routine into RAM, and run it from there? If not, this would account for the operation hanging.
Currently, no I am not. As I recall, this was true of the erase functions for the
9S08 family, but I didn't realize it held true for the 908's. I take it, it's expressly because I'm writing my own erase routine? I mean, it works to call the ROM-resident version without copying it to RAM first.
Regardless, I'll set to work copying/calling it to/from RAM.
bigmac wrote:
the DELNUS subroutine is called within ERARNGE, using relative addressing. If you wish to continue using the ROM based DELNUS you will need to change the calls from BSR to JSR.
Yes, I'm continuing to use the DELNUS out of ROM and have already found the BSR/JSR problem. The compiler gave me errors for the relative addressing.
Thanks for all your help and source code!