Cannot BREAK while running MSX-BASIC-KUN

Door Code Witcher

Resident (43)

afbeelding van 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}

Aangemeld of registreer om reacties te plaatsen

Van PingPong

Prophet (3885)

afbeelding van PingPong

22-09-2021, 21:18

...obviously...

Van Code Witcher

Resident (43)

afbeelding van Code Witcher

22-09-2021, 21:28

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

Van tfh

Prophet (3160)

afbeelding van 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).

Van Code Witcher

Resident (43)

afbeelding van Code Witcher

22-09-2021, 23:18

Makes sense! Thank you tfh.

Van NYYRIKKI

Enlighted (5917)

afbeelding van 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.

Van PingPong

Prophet (3885)

afbeelding van 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?