Page 1 of 1

What is this screen?

Posted: Tue Oct 24, 2023 2:39 pm
by nulcow
I have this function:

Code: Select all

void (*jumpPtr)(void) = (void (*)())0x8001;
And before you ask how this works, I don't know either. All I know is that it's supposed to jump to $8001 in memory.

When I make a program that calls this function and run it in the emulator, it gives me this screen:
Screenshot 2023-10-24 at 10.35.07 AM.png
Screenshot 2023-10-24 at 10.35.07 AM.png (316.53 KiB) Viewed 3899 times
It only triggers sometimes and I can't figure out when. Sometimes the program will just exit normally without showing this screen. What does this screen actually do?

Re: What is this screen?

Posted: Wed Oct 25, 2023 5:27 pm
by JimmyDansbo
You are entering the monitor program that is stored in ROM.
This usually happens when your program "runs off into the wild"

If you just "call" address $8001 without knowing what is there, strange stuff is most certainly going to happen ;-)

Re: What is this screen?

Posted: Wed Oct 25, 2023 6:55 pm
by DragWx
You can think of the monitor as the "Oh no, the program crashed" screen, since that's when most people are going to see it. :P

The purpose of the monitor is to allow programmers to check/modify what's currently in RAM, whether that's program variables, data, or actual code, in order to help debug a program. You can go back to BASIC by typing an X and pressing enter, but it probably won't resume the program.