Cannot BREAK while running MSX-BASIC-KUN

Par Code Witcher

Resident (43)

Portrait de Code Witcher

22-09-2021, 21:14

When I'm running a basic program compiled with MSX-BASIC-KUN the combination ctrl+stop does not work.
I've added on the program an inkey$="s" in order to make it stop by pressing the s key but I'd like to know if I'm doing something wrong why ctrl+stop(f8) does not work anymore while on an xbasic program.
Thanks.

{mod: moved topic to Development forum}

!login ou Inscrivez-vous pour poster

Par PingPong

Prophet (3760)

Portrait de PingPong

22-09-2021, 21:18

...obviously...

Par Code Witcher

Resident (43)

Portrait de Code Witcher

22-09-2021, 21:28

I didn't understand your comment, what is obvious? and what's the solution?

Par tfh

Prophet (2975)

Portrait de tfh

22-09-2021, 21:31

Code Witcher wrote:

I didn't understand your comment, what is obvious? and what's the solution?

My guess is that CTRL-Stop is part of the BASIC interpreter, and X-basic compiles your programm to run as machine-code. CTRL-Stop doesn't work for machine-code programs, unless you program is (like your "s" solution).

Par Code Witcher

Resident (43)

Portrait de Code Witcher

22-09-2021, 23:18

Makes sense! Thank you tfh.

Par NYYRIKKI

Enlighted (5875)

Portrait de NYYRIKKI

22-09-2021, 23:45

Yes... If (for debugging reasons) you need to break the execution, then you better use another break trick hidden in MSX-ROM... You can enable it by writing: POKE &HFBB0,1

When enabled, you can stop the program with key combination CTRL+SHIFT+GRAPH+CODE/KANA if you press it briefly. If you are in graphics mode and you press the combo for too long, the program will not return to text mode and then you will have to blindly write something like "SCREEN 0' " I know that pressing the combo only briefly might be a bit tricky if you work on emulator environment, but it works great on real machine.

Par PingPong

Prophet (3760)

Portrait de PingPong

23-09-2021, 20:51

didn't know... what the purpose of a similar feature? And how does it work? Is it checked on VDP interrupt routine?