[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is this code exiting to the basic prompt?



> It never executes any instruction after the BPL instruction.

But it breaks if you replace the BPL with BRK?
If so, that gives us a clue ... must be some //c weirdness.

I haven't had a //c for very long, so I don't know much about it, but
the hardware & firmware support keyboard interrupts and buffering. This
buffering is enabled in various ways for port 2 - which is exacly what
you've been playing with. See the //c Ref Manual Vol 2 Appendix E.6.2.

See what happens if you do this before running the game:
 LDA $#00
 STA $C0AA

Supposedly that's what a hardware reset does, according to the manual,
Vol 1 p260. I'm also wondering what //c ROM revision you have. I'm in a
deathmarch rightnow (coding in Java, yay! ;-) but on the weekend I
could test it on my rev 4 //c.

Cheers,
Nick.