VICE MONITOR and BRK

You need an actual VIC.

Moderator: Moderators

Post Reply
User avatar
beamrider
Vic 20 Scientist
Posts: 1447
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

VICE MONITOR and BRK

Post by beamrider »

Is there an easy way to get VICE to enter the monitor on BRK?

Something in my code is causing a RESET and AFAIK I don't have any BRKs...
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: VICE MONITOR and BRK

Post by Mike »

I suppose you mean a BASIC warm start, as if STOP/RESTORE had been pressed, with the single "READY." prompt in the top-left corner. You could install a custom BRK handler in your code and have that handler produce a register and stack dump:

http://sleepingelephant.com/ipw-web/bul ... php?t=4509

That being said, a common cause of this is a wild pointer address, which does shots into your program code. Up to the point, that the CPU executes some undocumented instructions, and then ends up at a "BRK" that's really the immediate field of a LDA #$00 instruction, or the like.
User avatar
beamrider
Vic 20 Scientist
Posts: 1447
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: VICE MONITOR and BRK

Post by beamrider »

Thanks Mike!

Yes, that's it exactly - it must be jumping to a random place..

That link looks exactly the ticket...
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: VICE MONITOR and BRK

Post by groepaz »

you could also place a breakpoint on the address of the kernal brk handler...or even the vector
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
Post Reply