slviajero / tinybasic

A BASIC interpreter for Arduino, ESP, RP2040, STM32, Infineon XMC and POSIX with IoT and microcontroller features.
GNU General Public License v3.0
208 stars 32 forks source link

CLS command #39

Closed RonLinu closed 1 year ago

RonLinu commented 1 year ago

In the new version 1.4a, the CLS command does not send ASCII 0x0C to clear the terminal as it used to do in the previous version. Couldn't find the code to fix that so far. Is there any #define or modif to reactivate this functionality?

Thanks! Your project is quite impressive, I must say.

slviajero commented 1 year ago

Can you tell me your hardware configuration? Which system, display etc? I changed something there. Seems to be a side effect.

Am 07.12.2022 um 17:22 schrieb RonLinu @.***>:

In the new version 1.4a, the CLS command does not send ASCII 0x0C to clear the terminal as it used to do in the previous version. Couldn't find the code to fix that so far. Is there any #define or modif to reactivate this functionality?

Thanks! Your project is quite impressive, I must say.

— Reply to this email directly, view it on GitHub https://github.com/slviajero/tinybasic/issues/39, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSY56FCTNMBZF7VAK3EQULWMC2TFANCNFSM6AAAAAASXAQITE. You are receiving this because you are subscribed to this thread.

RonLinu commented 1 year ago

Hi, I use an Anduino Mega, compiled as BASICFULL. For the monitor, I use Minicom in VT102 mode or I use also your 'monitor.py' program where I added a test for 0x0C character to execute a 'clear' command in Python. Just tell me if you need more details.

slviajero commented 1 year ago

Ok, understood. I broke that part of the code to test some display functions and checked it in.

Look for this code

case TCLS: xc=od; od=2; outch(12); od=xc; nexttoken(); break;

and change it back to

case TCLS: outch(12); nexttoken(); break;

Background info, my changed code redirects the 12 always to output device stream 2 which is the display. On a system with a terminal, this is bad. Mostly, CLS is used for display systems and it seemed logical for me to do it like this.

Alternatively you can keep the code above and do

PUT 12

in BASIC.

Best, Stefan

Am 07.12.2022 um 17:55 schrieb RonLinu @.***>:

Hi, I use an Anduino Mega, compiled as BASICFULL. For the monitor, I use Minicom in VT102 mode or I use also your 'monitor.py' program where I added a test for 0x0C character to execute a 'clear' command in Python. Just tell me if you need more details.

— Reply to this email directly, view it on GitHub https://github.com/slviajero/tinybasic/issues/39#issuecomment-1341271916, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSY56ECJTCANYYJFYGD6WLWMC6PNANCNFSM6AAAAAASXAQITE. You are receiving this because you commented.

RonLinu commented 1 year ago

Thanks! Both solutions work.