BleuLlama / TinyBasicPlus

A C implementation of Tiny Basic, with a focus on support for Arduino
401 stars 117 forks source link

Terminal freezes after multiple funtion calls #18

Open Volhout opened 8 years ago

Volhout commented 8 years ago

Compiled tiny basic 0.13 and uploaded to UNO. Arduino 1.0.3 linux. Seems to run fine, until i use funtions often. I.e. Dread() or rnd(). Then terminal freezes (refuses input chars, ctrl-c is not recognised anymore). When i make changes indicated in othe issue, and compile with 1.1.x arduino for linux, the terminal does not freeze, but outputs characters afte completing program with multiple fubtion calls. Example: make a simple basic program that reads digital inout 256 successive times.

Solution ( i dont know how to use github, commit and such, but found the solution to the problem)

The memory allocation reserves 1160 bytes for system variables. Change this to 1200 bytes, then the problems are gone.

Maybe this is due to compiling under linux.

I post this here so some may benefit.

Volhout commented 8 years ago

By the way, i also added a few lines of code in the command parser that recognise abreviated basic commands. For more efficient memory use on cost of readability.

I.e. 10 P."Hello world" Can be used in stead of 10 PRINT "Hello world"