![]() |
Forum Index : Microcontroller and PC projects : MMBasic for Windows: Weird mode 12 behaviour
Author | Message | ||||
LeoNicolas![]() Guru ![]() Joined: 07/10/2020 Location: CanadaPosts: 499 |
Hello everyone I'm trying to understand why page 0 stops rendering after a cls. I'm using the last version shared by matherp. Steps to reproduce: 1) Save in a file and run the following code: mode 7,12 font 1 page write 0 print @(100,0) "Hello page 0" print @(100,32) "Hello page 0 - "+str$(int(rnd()*100)) page write 1 print @(100,16) "Hello page 1" print @(100,48) "Hello page 1 - "+str$(int(rnd()*100)) It will print four lines with the Hello page X text. 2) Type CLS in the basic console 3) Run the code again Only the text from page 1 will be rendered. It's necessary to restart the MMBasic environment to make page 0 work again. Did I miss something? Edited 2023-11-26 13:46 by LeoNicolas |
||||
LeoNicolas![]() Guru ![]() Joined: 07/10/2020 Location: CanadaPosts: 499 |
I'm running MMBasic on Wine, I don't know if it could be the cause. Please, let me know if the problem is happening in your computers. The cls command can be inside the program as well. The same behaviour will manifest. The is a problem for my game because I can't clear the pages 0 and 1 before starting the stage. If I do it, I completely lose the page 0. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10063 |
Not near a computer for a few days but try "CLS 0" |
||||
LeoNicolas![]() Guru ![]() Joined: 07/10/2020 Location: CanadaPosts: 499 |
Thank you matherp. "cls 0" works fine but "cls 1" is not clearing the page 1. Edited 2023-11-27 04:31 by LeoNicolas |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1121 |
The number after CLS is a colour, not a page number. Visit Vegipete's *Mite Library for cool programs. |
||||
LeoNicolas![]() Guru ![]() Joined: 07/10/2020 Location: CanadaPosts: 499 |
Thank you vegipete I'd assumed wrong. |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |