Finally I inspected the identifier window of the simulator.
In my code, I have the following:
previou
Code: Select all
STRING_PTR: .DS $02 ;pointer to current output message string
STRING_INDEX: .DS $01 ;index into input buffer
LINE_CNT: .DS $01 ;clear screen line count
CMD_INDEX: .DS $02 ;index into command string list
SELECTED_CMD: .DS $02 ;pointer to slected command routineSo I saved, closed, re-opened, and re-assembled. I checked the identifier window, and everything was fixed! Put the code in ROM, and all the weird crashes stopped.
Any idea what happened here? Is it a bug, or could I have done something strange? BTW, the two identifiers had been in use before the weirdness, so adding them wasn't the trigger.