Cannot BREAK while running MSX-BASIC-KUN

By Code Witcher

Resident (36)

Аватар пользователя 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

By PingPong

Prophet (3758)

Аватар пользователя PingPong

22-09-2021, 21:18

...obviously...

By Code Witcher

Resident (36)

Аватар пользователя Code Witcher

22-09-2021, 21:28

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

By tfh

Prophet (2970)

Аватар пользователя 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).

By Code Witcher

Resident (36)

Аватар пользователя Code Witcher

22-09-2021, 23:18

Makes sense! Thank you tfh.

By NYYRIKKI

Enlighted (5873)

Аватар пользователя 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.

By PingPong

Prophet (3758)

Аватар пользователя 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?